BB84 Demo

For a good background on the algorithm, see Jamie Ford's tutorial on cryptography and BB84.

The object of this demo is not to explain the algorithm in depth so much as to allow you to play with it, to tweak various parameters, and so on. The algorithm is presented in stages, and at any time you can use the "Back" button on your browser to return to an earlier state, review the decision you made, and choose an alternate path if you like.

Alice and Bob are going to try to agree on some number of bits of data, for use as a shared secret key. They will communicate on two channels, a quantum channel and a public channel. Eve may or may not be eavesdropping on either channel.

In this simplified model, messages sent on the quantum channel are in the form of photons which are polarized either horizontal or vertical, and (independently) either left-circular or right-circular. Measuring the rectilinear polarization randomizes the circular polarization and vice versa, regardless of who takes the measurement. In addition, there may be some noise on the channel, which also randomizes photon polarization.

Messages on the public channel are assumed to be unalterable and signed by the senders.

If we don't have to worry about eavesdropping, the algorithm is a bit simpler. Do you want eavesdropping?

  1. Nah, skip it for now.
  2. Yes, please.

In any case, how many photons would you like Alice to send Bob?

Also read Jamie Ford's more detailed description of quantum cryptography and BB84.

Last modified: Wednesday, 6 February 2008
Fred Henle <>

Valid XHTML 1.0!