BB84 protocol (source code)

= BB84 protocol
{c}
{wiki=BB84}

The BB84 protocol encodes random classical bits in independently chosen computational and Hadamard bases. Sender and receiver publicly compare bases and retain only positions where their bases agree; disturbance of a test sample detects eavesdropping.