[MUSIC] So let's study this protocol, which is often referenceed as BB84 protocol. After the first letters are the names of its inventors. The protocol has multiple steps. On the first step, both Alice and Bob generate long enough random sequences of zeroes and ones. To do this they can use measurements of single photons polarized along the vector plot. If you send such fault onto a vertically arranged polarizer, it passes with probability one half and reflects with the same probability. So when the photon passes, we can assign this result the number one, and when it reflects, number 0. This is one of many possible ways to generate a truly random bit. So Alice and Bob generate as many random bits as they want, say 3,000. Actually, Alice needs two random sequences of this length. Let's name them A1 and A2. And the random sequence of Bob we will name B1. Please note that random sequences of Alice and Bob are indipendent. Nobody except Alice has access to her random sequences and so is with Bob's sequence also. On the next step, Alice and Bob begin interaction. They choose a channel through which Alice can send photons to Bob. It is important that this channel does not alter the photon polarization. So Alice takes a bit from her random sequence A1 generated on the step one. If this bit is 0, then she creates a photon polarized in the 01 by this. The polarization of this photon is defined by the corresponding bit of the sequence A2. Is the bit from A2 sequences one? Then she polarized it the photon vertically, otherwise horizontally. But f the bit in the sequence A1 is 1, then L is creates a photon polarized in the other mark by this. Then if the beat from A2 sequence is one, then she polarizes photon along the vector plus. Otherwise she polarizes it along vector minus. Good. Now, for each photon generated by Alice it is random in two senses. First its basis is random, second its value in this basis is also random. Heat generated photon Alice sends to Bob via that communication channel. When Bob receives a photon from Alice, he does not know its polarization. So he takes 1 bit from his random segments B1. If the bit is 0, then Bob measures the photon in the 01 basis. If the bit is 1 then Bob measures this photon in the other mark basis. Now, if the corresponding bits in the A1 and B1 sequences appear to be equal. Then for the photon which was generated using this bit, Bob guesses the right measurement basis. And he obtains the correct bit for the seconds A2 generated by Alice. For those bits that differ in A1 and B1, Bob obtains completely random result for the measured bit. But at this step Bob does not know which bits are correct and we shall not, so he carefully saves all his measurement results. On the step three, Alice calls Bob using some open and insecure communication channel. And she says, here, here A1 segments. The only requirement for this channel is that Alice and Bob must be sure that they are talking to each other and not to Eve. Eve may only eavesdrop this channel. Now when Bob has A1 sequence, he knows which photons he measured, in correct basis. He then returns Alice the numbers of photons which he measured correctly. But not the result of the measurement. After this step, both Alice and Bob share some bits from the A2 sequence, and they both know. Which these are? So now they have this shared secret key, composite all these bits. Now all this would be unnecessary if there was no Eve. But Eve exists, and we suppose that she controls both channels. That's what used for photons transfer, and for afterwards conversation. What kind of Eve possibly do? First of all, Eve good intercept the photons sent by Alice. But there's no way Eve could intercept just a part of a photo. Photons are indivisible, so when Eve receives a photon, Bob receives nothing and thus Alice and Bob will soon find out that some photos sent by Alice were lost. If this situation happens, they will agree that they have an intruder and they key has not generated. To avoid that Eve when she intercepts a photon must send some photons to Bob, so Alice and Bob would not notice the intrusion. The question is what to send? If Eve could duplicate the photon, then she might send the exact copy of the photon she received. But it's not possible thanks to no cloning theorem. So the best thing she can do is to measure the photon and send Bob the same photon as she just measured. And the problem with that, as you might guess. Guess is Eve doesn't know which basis to choose. She does not know the basis chosen by Alice to polarize the photon, and she doesn't know the basis that Bob will choose for his measurement. So let's count the odds. If for some fault on Bob does not guess the basis chosen by Alice, right? Then on the step three, this photon will be eliminated from consideration by Alice and Bob, no matter what Eve did with this forum. So we need to consider only the photons for which Alice and Bob have chosen the same biases. For each such situation, there are two possibilities. First, Eve guesses the basis correctly and 2nd Eve chooses the incorrect basis. In the first case, which has the probability one half. Eve wins for this photon and she has exactly the same random bit as Alice and Bob. In the second situation, the probability of which is also one half. Eve also can win, if she randomly obtains the same bit encoded by Alice, the probability of this is one half. And both also randomly obtains the correct bit from the photon encoded by Eve. This is also one half. So the whole probability for Eve to invisibly intrude and obtain the correct bit is one half plus one half in the power three, which is five eighths. Looks good for Eve, it is even bigger than one half. But Eve has this probability for each single bit. And as you remember, there are many bits in this transform. In our example, there were 10,000 bits. And the probability top 10 every bit correctly becomes for Eve extremely small. It is like five eights in the power of 5000. This is the approximate number of bits for which Alice and Bob will have measurements in the same basis. So the next and final step of the algorithm is this. Alice and Bob now have some shared secret key, but they don't know yet. If it is similar because they don't know if Eve interfered or not. So they decide to randomly choose some bits of their shared key and compare them over the open insecure channel. This is the final check. Which easily reveals the actions of Eve. The more beats Alice and Bob choose to check, the less is probability for Eve to be undetected. This probability is five eights in the power n, where n is the number of checks. This is just 10 checks. The probability of Eves detection becomes 99%. The bits that were chosen for this check are of course removed from their shared key. If Eve were detected some bits of the shared key appear to be different at Alice and Bob, then Alice and Bob agree that the key was not generate. And they have to repeat the whole procedure again. But if the check has passed, then Alice and Bob can be sure, that they now have, an identical share of key, which nobody else has.