[LinkedIn post] Quantum key distribution (QKD)
I am excited to share my project simulating Quantum Key Distribution (QKD) protocols in Python!
While One-Time Pad (OTP) encryption offers perfect theoretical security, the challenge lies in securely exchanging the secret key. My simulations explore how quantum mechanics provides solutions:
- No Protocol: demonstrates the vulnerability of basic key exchange – an eavesdropper (Eve) can silently intercept the key.
- BB84 Protocol: simulates the classic prepare-and-measure approach. Alice sends qubits; Bob measures. They publicly reconcile bases and check a subset for errors (Quantum Bit Error Rate - QBER). A high QBER indicates Eve’s presence, prompting them to discard the key.
- E91 Protocol: uses entanglement. A source distributes entangled pairs. Alice & Bob measure independently with random settings. They use specific measurement outcomes to perform a Bell test (CHSH inequality). Violation confirms quantum correlations and security; failure indicates eavesdropping. The key is derived from results where compatible bases were used.
The core difference lies in how the key is exchanged and how eavesdropping is detected using quantum principles – either through introduced errors (BB84) or disturbed correlations (E91).
You can explore the Python code & simulations on GitHub here and the mathematical details on my website here.
#QuantumCryptography #QKD #BB84 #E91 #Python #Simulation #QuantumComputing #Cybersecurity #Cryptography #Physics #QuantumMechanics #Encryption
You can access the original post on LinkedIn here.