  Several attacks have been proposed on quantum key distribution systems with
gated single-photon detectors. The attacks involve triggering the detectors
outside the center of the detector gate, and/or using bright illumination to
exploit classical photodiode mode of the detectors. Hence a secure detection
scheme requires two features: The detection events must take place in the
middle of the gate, and the detector must be single-photon sensitive. Here we
present a technique called bit-mapped gating, which is an elegant way to force
the detections in the middle of the detector gate by coupling detection time
and quantum bit error rate. We also discuss how to guarantee single-photon
sensitivity by directly measuring detector parameters. Bit-mapped gating also
provides a simple way to measure the detector blinding parameter in security
proofs for quantum key distribution systems with detector efficiency mismatch,
which up until now has remained a theoretical, unmeasurable quantity. Thus if
single-photon sensitivity can be guaranteed within the gates, a detection
scheme with bit-mapped gating satisfies the assumptions of the current security
proofs.
