Security proof for quantum-key-distribution systems with threshold detectors | Synapse