 We transmit an ever-increasing amount of data all over the world. The immense value of our personal information, commercial records and government secrets makes them valuable targets for eavesdroppers. Don't worry, this is not an advert for a VPN. I am going to explain a working technology which uses quantum physics to encrypt digital information. Imagine that Alice wanted to secretly send Bob the purple colour in my channel logo. Colours on a computer screen are represented by three bytes, one for each of red, green and blue. Three bytes of eight bits each means a sequence of 24 ones and zeros. One way Alice and Bob can keep it secret is with a technique called a one-time pad. Alice takes a digital key which she has shared with Bob beforehand. This key is just a binary number, also composed of 24 bits, but they are chosen completely at random. They deliberately have no informational value whatsoever. Now Alice performs what is called the exclusive OR operation, XOR for short, to each of the bits in turn. Put simply, if both bits are the same then the result is zero. If both bits are different, the result is one. In effect, the key has been used to flip some of the bits of the original information, the colour purple. The information has now been encoded. Any eavesdropper who intercepts it does not know which of the bits have been flipped and so cannot decode the message. But for Bob who has the key, it's very straightforward to flip back only the correct bits. Even a slow computer can do or undo the XOR operation very easily. The one-time pad is a very good encryption method because there is no mathematical or logical way to decode the message other than just knowing the random key. The downside is that the people communicating, Alice and Bob in my example, must have shared the key beforehand. If you wanted to browse a website securely, you would have to physically go there first to share a key. In fact, you would probably also want to keep going regularly and sharing new keys just in case a hacker did get their hands on an old one. That is impractical, so websites which begin with HTTPS and other internet services use what is called public key cryptography. In this case, Alice and Bob have a pair of keys. One is private that each of them keeps individually and the other is public which they can share. The approach is named after the fact that even if the whole world knows their public keys, Alice and Bob can still communicate amongst themselves securely. Naturally, it is much more mathematically complicated than the one-time pad. Public key cryptography is secure for now, but there are problems on the horizon. For each of the current methods in use, some flaw with the mathematics may be discovered which breaks it. This will be done by a major group of researchers working for years, not some hacker in their bedroom, but this has happened before. More ominously, it is very likely that quantum computers in the future will be able to break public key methods. So we're back to the one-time pad. How can we distribute the keys securely without physically having to go somewhere? Quantum physics also has the answer. Light is made up of photons which have a polarization. This is the direction in which the electric field oscillates. The polarization can be measured at the level of individual photons relative to some axis or direction. If you measure in the vertical direction, you can tell whether a given photon is oscillating up and down or side to side. This is binary so Alice and Bob could communicate their one-time key by, for example, calling the side to side zero and the up and down one. Before I go into the finer details, here is how Alice and Bob make sure that the key they exchange is secure. The polarization is a fundamentally quantum mechanical property, which means that a photon can be in a superposition of the two mutually exclusive outcomes, oscillating up and down and side to side simultaneously. If there is an eavesdropper, they will need to intercept each photon in turn to measure it. By making the measurement, they will collapse the quantum state of the photon. It is that collapse from a superposition of both states to just one or the other, which tells Alice and Bob that an eavesdropper is present. If that's the case, they will throw away the key and try again later, or call a police, or do whatever is necessary until the eavesdropper is gone. When there is no eavesdropper, Alice and Bob can be sure that only they, and no one else in the universe, knows the key. The simplest approach to quantum key distribution was that of Bennett and Brassard from 1984, or BB84 for short. As I mentioned, Alice can send out photons with a given polarization corresponding to 1s and 0s, and Bob can measure them. It's actually quite easy to create photons with a given polarization. Many sunglasses or optical filters work by letting through light of one polarization and filtering out all the rest. Every time a photon goes through your polarizing sunglasses, you are effectively measuring it in a quantum mechanical sense. There is more sophisticated and precise equipment to do this too, of course, but it's relatively cheap. Making the quantum state of a photon into a superposition of vertical and horizontal polarizations is also quite easy. Simply turn the emitter of photons 45 degrees on its side. Relative to Bob's vertically aligned measurement system, each photon is now in a combination of both possible outcomes. This is because quantum mechanics fundamentally only allows a measurement to give specific results. Another word for this is discrete in the mathematical sense, or quantized. This is what gives quantum physics its name. If Alice's emitter is at 45 degrees clockwise to the vertical, each photon has a 50% chance of being measured horizontally and 50% vertically. Of course, Bob can also tilt his measurement equipment by 45 degrees clockwise, and then whatever Alice sends, he would measure correctly 100% of the time. In the original BB-84 paper, having your equipment in the vertical orientation is referred to as the rectilinear basis. In that case, a vertical photon corresponds to a 1 and a horizontal photon to a 0. Tilting the equipment by 45 degrees is referred to as the diagonal basis. Where a photon which is oriented like a backslash is a 1, that is like a forward slash, is a 0. The idea now is that Alice picks a basis at random and sends the data bits, the 1s or 0s, accordingly. Bob also picks a basis at random and measures. On average, half the time they will both pick the same basis, the same alignment, and whatever bit Alice sent, Bob for sure has accurately received it. If the two bases are different, then the measurement is useless, because whatever Alice sent, Bob would get the wrong answer half the time. At this point, they don't know which of the bits of data are accurate and which are garbage. They now share the sending and measurement bases publicly. This means that anyone can possibly intercept the information. But that's okay. These are just the bases, not the bits themselves, so it doesn't matter if the whole world knows what they are. Only Alice and Bob know the bits themselves, which can now be used as the one-time key. However, let's now imagine there is an eavesdropper who has measured and re-sent the photons. Because the eavesdropper doesn't know which basis was used to send out the photons, they will inevitably use the wrong one at some point and mess up the communication between Alice and Bob. Let's say for instance that Alice sent out the backslash photon in the diagonal basis. The eavesdropper by chance measures on the rectilinear basis and sends out a vertical photon. Bob measures in the diagonal and gets a forward slash. In other words, Alice sent out a one and Bob got a zero because of the eavesdropper. Alice and Bob select some of the bits they think they've shared successfully and compare them publicly. If any of them don't match up, they know an eavesdropper was present. One trick that eavesdropper could imagine is somehow duplicating the photons which Alice sends. Let's say there was some device that could make perfect copies of photons passing through it. Then, the eavesdropper could siphon off the copied photons and measure them without Bob knowing. However, there is what's called the no-cloning theorem in quantum mechanics which strictly prohibits this. As a result, an eavesdropper cannot measure the photons without disturbing them. Either Alice and Bob successfully share their one-time key or they know that someone out there is listening. The BB-84 approach has been successfully demonstrated in a lab and even used to communicate with a satellite. In particular, a team in China made a secure link to the satellite in one part of its orbit and then a team in Austria did so later on in the orbit. The fact that it is possible to communicate in this way through space means that it can be done between parties anywhere on Earth. Communication in this way through fiber optics is also possible. This opens the possibility of a quantum internet where keys could be distributed all over the world. The nature of this method means that even if you had a network with multiple bad actors out there to spy on you, it would always be possible to at least detect them. The worst they could do is a denial of service attack, stopping you from communicating, but they could not secretly read your messages. A more elegant way to distribute a key is the method of Eckert from 1991 or E91 for short. This uses pairs of photons which are what is called entangled. In short, this means that measuring one affects the other, even if they are many kilometers apart. In E91, Alice and Bob each receive one of a pair of photons in what is called the Bell-Singlet state. Alice can get a result of zero or one at random with equal probability, but whatever she measures Bob will get the opposite as long as he measures in the same basis or same orientation. This is a rather complicated quantum effect, but it has been shown that a measurement Alice makes on her photon affects the photon of Bob or vice versa. Strange as it would seem, the act of measuring one photon seems to pop the polarization of the other into being. According to our best understanding, the outcome of the first measurement is also totally random and cannot be predicted until it is made. As before, Alice and Bob will measure their photons either in the rectilinear or diagonal bases at random. Some of the time, they will measure in the same basis, and some of the time in different ones. They share their measurement bases after the fact and use the times when they happen to measure in the same basis to set up a one-time key. The key is random due to the quantum nature of entangled photons. If an eavesdropper intercepted and resent the photon going to Bob, it would no longer be entangled with the one going to Alice, which can be detected. I won't go into the math, but each of them actually has three or more ways to orient their measuring devices. They use the times when the bases were not aligned to calculate how correlated the measurements are. If they are not correlated in a certain way, the photons are not arriving entangled, and hence there is an eavesdropper. This method has also been shown to work in the lab and over long distances. Everything I've said can apply to other subatomic particles like electrons or even molecules, but photons are the most practical choice. Photons are easy to generate with a commercial laser and also easy to detect. They automatically move at the speed of light. They can travel both in a vacuum and in the atmosphere. If you are familiar with quantum physics, the principles behind the methods I described should be straightforward. If you aren't, I recommend the textbook by Griffiths and Schroeter. If you would like a full explanation from me, I'm afraid you will need to hire me to give a 20 lecture course on the subject because it can get quite involved. Thank you for watching.