HomeQuantum PhysicsDecoy-State QKD: PNS Attack Detection

Decoy-State QKD: Exposing Photon-Number-Splitting Attacks

Interactive decoy-state quantum key distribution simulator: weak coherent pulses at multiple real mean-photon-numbers (Poisson-distributed), a live per-intensity photon-number histogram and Gain/Yield comparison chart, and a photon-number-splitting eavesdropper whose attack stays hidden from single-intensity monitoring but is exposed the instant decoy statistics are compared.

Quantum Physics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
decoy-state-qkd ↗ Open standalone

Real BB84 implementations run on weak coherent laser pulses whose photon number per pulse follows a genuine Poisson distribution rather than a guaranteed single photon — meaning a fraction of pulses carry two or more photons that an eavesdropper can silently tap without introducing any measurable error, the photon-number-splitting (PNS) attack that plain QBER monitoring cannot catch. This simulator implements the real countermeasure: pulses are sent at multiple real mean-photon-numbers (a signal intensity, a weaker decoy intensity, and vacuum), each pulse's photon count drawn from the actual Poisson formula, with the resulting Gain and Yield statistics tracked live per intensity. Toggle the PNS eavesdropper to see her calibrated attack keep the signal-intensity statistics looking perfectly honest while the decoy-intensity Gain and the decoy-formula-estimated single-photon yield Y₁ collapse in real time — the live, physically grounded exposure of an attack that a single fixed intensity would never reveal.

⚙ Under the hood

Simulate decoy-state QKD to detect photon-number-splitting attacks using real Poisson-distributed pulse counts and statistical comparisons.

quantumquantum cryptographyquantum key distributiondecoy statephoton-number-splittingBB84Poisson distributionphysicssimulation

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)