Curriculum / Quantum Cryptography / Quantum Cryptography Capstone

Lesson 21 of 21ProjectPro+300 XP

Quantum Cryptography Capstone

Build a complete quantum-secure communication system with QKD and post-quantum fallback.

Quantum Cryptography Capstone

Build a complete quantum-secure communication system that demonstrates the key components from this track. You will implement four checkpoints, each adding a layer to the security stack.

System Overview

You are building Alice and Bob's end-to-end quantum-secure messaging system:

  1. 1.Checkpoint 1: BB84 QKD, Simulate the BB84 key distribution protocol and extract a sifted key
  2. 2.Checkpoint 2: Privacy Amplification, Compress the sifted key using a hash function to eliminate any partial information Eve may hold
  3. 3.Checkpoint 3: OTP Encryption, Encrypt and decrypt a secret message using the quantum-generated key
  4. 4.Checkpoint 4: Eavesdropping Detection, Simulate Eve's intercept-resend attack and show that it increases the QBER above the detection threshold

What You'll Demonstrate

When complete, your system will show:

  • BB84 produces a sifted key where matching-basis rounds agree
  • Privacy amplification produces a final key of appropriate length
  • OTP encryption with the quantum key produces an unreadable ciphertext
  • Eve's intercept-resend attack produces QBER near 25%, triggering abort

This integrates quantum physics (qubits, superposition, measurement), classical cryptography (XOR, hash functions), and protocol engineering (QBER threshold, privacy amplification) into a single working system.

Technical Requirements

  • N_QUBITS = 100: number of qubits Alice sends
  • DETECTION_SAMPLE = 20: bits compared for eavesdropping detection
  • PRIVACY_AMP_BITS = 16: final key length after privacy amplification
  • QBER threshold: abort if QBER > 0.11 (11%)
  • All quantum operations use the provided helper functions
End-to-End Security

This capstone demonstrates the only known end-to-end information-theoretically secure communication system: QKD for key distribution + OTP for encryption. Neither component alone provides full security, OTP needs secure key distribution; QKD provides keys but not encryption. Together they achieve unconditional security from physics, not computational hardness.

How this lesson works

A multi-step project that combines several concepts into one larger build, checked checkpoint by checkpoint as you go.

Part of: Quantum Cryptography

Master quantum key distribution, the threat quantum computers pose to classical cryptography, and post-quantum cryptographic standards.

This lesson is part of Pro

Unlock Quantum Cryptography and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.