Quantum cryptography is a form of cryptography which relies on the principles of quantum mechanics to secure data and detect eavesdropping. Like all forms of cryptography, quantum cryptography is potentially breakable, but it is theoretically extremely reliable, which could make it suitable for very sensitive data. Unfortunately, it also requires the possession of some very specialized equipment, which could hinder the spread of quantum cryptography.
Cryptography involves the exchange of coded messages. The sender and the recipient have the ability to decode the messages, thereby determining the content. The key and the message are generally sent separately, as one is useless without the other. In the case of quantum cryptography, or quantum key distribution (QKD) as it is sometimes known, quantum mechanics are involved in the generation of the key to make it private and secure.
Quantum mechanics is an extremely complex field, but the important thing to know about it in relationship to cryptography is that the observation of something causes a fundamental change in it, which is key to the way in which quantum cryptography works. The system involves the transmission of photons which are sent through polarized filters, and the reception of the polarized photons on the other side, with the use of a corresponding set of filters to decode the message. Photons make an excellent tool for cryptography, since they can be assigned a value of 1 or 0 depending on their alignment, creating binary data.
Sender A would start the exchange of data by sending a series of randomly polarized photons which could be polarized rectilinearly, causing either a vertical or horizontal orientation, or diagonally, in which case the photon would slant one way or the other. These photons would arrive at recipient B, who would use a randomly assigned series of rectilinear or diagonal filters to receive the message. If B used the same filter that A did for a particular photon, the alignment would match, but if he or she did not, the alignment would be different. Next, the two would exchange information about the filters they used, discarding photons which did not match and keeping those that did to generate a key.
When the two exchange information to generate a shared key, they may be disclosing the filters that they use, but they do not disclose the alignment of the protons involved. This means that this public information cannot be used to decode the message, since an eavesdropper would lack a critical part of the key. More critically, the exchange of information would also reveal the presence of an eavesdropper, C. If C wants to eavesdrop to obtain the key, he or she will need to intercept and observe the protons, thereby altering them and alerting A and B to the presence of an eavesdropper. The two can simply repeat the process to generate a new key.