Among all the methods of encryption ever devised, only one-time pad encryption has been mathematically proven to be absolutely secure if used correctly. The key, consisting of a truly random sequence of bits or characters, should be as long as the message to be encrypted and used only once. The message is encrypted by a modular addition with the key and decrypted by a modular subtraction. In case of binary keys and messages, modular addition and subtraction are equivalent to XOR operations.
Quantum key distribution (QKD) was proposed in the 1980s for the safe delivery of one-time pad. In QKD, each bit of key information is carried by a single photon, which is the elementary particle of light and cannot be divided further. Any attempt of measuring or copying a photon inevitably induces some change in the photon’s state due to Heisenberg’s uncertainty principle and the no cloning theorem of quantum mechanics. The ability to detect any eavesdropping attempt on the optical signal in the transmission channel constitutes the most remarkable feature of QKD.