K072 / Advanced and next-generation cryptography
BB84 quantum key distribution
A QKD protocol in which two parties prepare and measure quantum states to establish a classical secret key unknown to third parties.
CRYPTOGRAPHY LAB / K072
Cryptography Lab · BB84 quantum key distribution
Run real computations and inspect intermediate states step by step.
Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.
BB84 basis sifting only (no quantum measurement)
See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.Output
Previous state
- Definition and overview
- A QKD protocol in which two parties prepare and measure quantum states to establish a classical secret key unknown to third parties. Source document ↗
- Classification and reversibility
- Key distribution protocol sharing classical secret keys between parties, not encryption/hash/encoding. Source document ↗
- Key or secret requirements
- Final output is classical secret key unknown to third parties. Source document ↗
- Operating principle and structure
- After quantum-state exchange, disclose bases rather than bit values over authenticated classical channel; sift matching bases. Source document ↗
- Key size, block size and parameters
- Implementations set target key length and QBER threshold (e.g. key_length=256, security_threshold=0.11). Source document ↗
- Security strength and recommendation
- NSA does not recommend QKD/quantum cryptography for national-security systems until limitations overcome. Source document ↗
- Known attacks and vulnerabilities
- Photon-number splitting (PNS) attacks exploit multiphoton pulses. Source document ↗
- Standards and certification
- Research on security proofs for certification and standardization ongoing. Source document ↗
- Typical uses
- Secure exchange/distribution of OTP or symmetric-encryption secret keys. Source document ↗
- Implementations, libraries and tools
- Python bb84_crypto and other public implementations/tools. Source document ↗
- Decryption or decoding
- BB84 itself is not decrypted; use distributed key to decrypt symmetric ciphertext. Source document ↗
- Advantages
- Can be designed under physical laws so eavesdropper cannot know secret key. Source document ↗
- Limitations and cautions
- Commercial implementation vulnerabilities and practical limitations may remain. Source document ↗
- Distinguishing encryption, encoding and hashing
- BB84 is QKD, not encryption/encoding/hash; actual encryption uses OTP/AES etc. Source document ↗
Practical examples
Example
Alice/Bob exchange quantum states, compare/sift bases, obtain same session key through error correction/privacy amplification. Use key in OTP/AES; BB84 is distribution, not message encryption.
Procedure
Prepare/send quantum states, measure, disclose/sift bases over authenticated classical channel, estimate QBER, error correction, privacy amplification, then use distributed key for OTP/AES encryption/decryption.
Scenario
Inter-organizational links with quantum and authenticated classical channels distribute session keys then send OTP/AES-protected data. Commercial deployment presupposes vulnerability checks and authentication.
Pitfalls and alternatives
Distinguish from encryption/encoding/hash. Beware unauthenticated classical channel, wrong QBER threshold and multiphoton/PNS implementation risks. Apply error correction, privacy amplification and implementation certification; supplement with PQC/hybrid if needed.
References
- BB84 Quantum Key Distribution – QAGORA ↗
- BB84, Precisely: How Quantum Key Distribution Works | QuSafe.ai ↗
- API Reference — QKDpy v0.8.0 — Quantum Key Distribution library ↗
- National Security Agency/Central Security Service > Cybersecurity > Quantum Key Distribution (QKD) and Quantum Cryptography QC ↗
- Implementation Security of Quantum Cryptography - Introduction, challenges, solutions ↗
- A rigorous and complete security proof of decoy-state BB84 quantum key distribution ↗
- Quantum key distribution: a survey on current vulnerability trends and potential implementation risks ↗
- bb84-crypto v1.0.0 ↗
- 1 Quantum cryptography: BB84 quantum key distribution ↗