Well i promised when i wrote about quantum entanglement a few weeks ago, that i would write another article in the same field soon(ish), so here i am to deliver on my word.
To start off with, lets quickly discuss normal cryptography. The only 100% safe method of sending data between two persons is a so called “one time pad protocol“, in which two persons, Alice and Bob, each have the same sequence of 0’s and 1’s (their one-time pad), lets say it’s 01110110. Alice now has an 8bit message she wants to send to Bob (lets say 10101010), then she simply adds her two numbers together (without carrying the terms), and the outcome from that is COMPLETELY random, however! if Bob takes this random number, and again adds the one-time pad to it, he’ll get the original message! This is 100% secure and if a 3rd person (Eve) is listening, she can only intercept the random message and gets no information. Check out the picture on top to see how Alice adds the one time pad to the message, gets a random message out, and then Bob adds the code again to retain the original message.
However! The big problem is, how the hell do you get the one-time pad to Alice and Bob without someone intercepting it? There is no 100% secure way to do this! And this is actually where the quantum stuff comes in, so in a sense, it’s not really quantum cryptography, but more like quantum key distribution.
So here is the basic idea, Alice wants to send a random sequence of 0’s and 1’s to Bob, and be 100% sure that Eve did not listen in on them. To do this, she sends a single photon (particle of light) that can be in one of two basis (0 and 1, so one photon=one bit), and Bob can only measure in one of them. To get slightly technical, the polarization of the light is either in the + basis (horizontal/vertical) or the x basis (+ or - 45 degrees). You can think of the lightwave as a rope being shaken in only one direction, say it’s being shaken up and down, then it would be vertically polarized (we’ll use the | sign for that), shaken left right would be horizontal (-), and then you can imagine you can shake it + and - 45° ( / and \ )as well. Check out the picture for a visual depiction of it, you can see the horizontal/vertical and one of the 45° angle ones too.
So lets see at what happens in some different situations. If Alice sends through either | or - polarized light, and Bob measures in that basis (the + basis), he will measure the exact same polarization as Alice sent out. If however he measures in the wrong basis, the +-45° (x basis), then the outcome is random! There is 50% chance of him measuring +45 and 50% measuring -45.
Ok now that all those things are out of the way! Lets get down to business, here is the protocol Alice and Bob would use to send a one-time pad between each other (called BB84):
1) Alice prepares a random polarization (-, |, \ or /) and sends it off to Bob.
2) Bob chooses a basis to measure the photon in at random (Alice has not told him anything about the photon she sent!).
3) Repeat the process however many times you want (remember, one photon=one bit).
4) Bob calls Alice and tells her which basis he measured in, and she tells him if it was wrong or right, and they both get rid of all the wrong bits (~50%).
So now all they need to do is assign numerical values to each polarization, say Horizontal=0, Vertical=1, and +45°=0,-45°=1. Then they both have a long number of 0’s and 1’s that are identical. Ok so this shows how they could transfer the code between themselves, but how could they possibly know if they’ve been eavesdropped? The easiest way to explain it is to look at a table explaining how each step of the way, assuming Eve is indeed listening. I could’ve made one myself, but the first google image result is actually perfect, so I’m kind of jacking that one (taken from this article).

So as you can see, Alice sends out in some polarization, and Bob measures either in the + basis (R in the picture) or x basis (D in the picture), this time however! Eve is right in the middle, measuring the photon before Bob gets it, and resending whatever she measured on to Bob (in order to avoid detection). So in #1,2 and 5, Alice and Bob agree that they used the same basis, but #3 and #4 they didn’t, so those two are thrown away. In #1 and #5, Eve was lucky! She measured in the correct basis, so she simply sends the same message along for Bob to detect, and they have no idea she did this. However! In #2 Eve measured in the wrong basis! So she’ll measure it and send it along to Bob, in the wrong basis (not knowing if she measured in the right basis or not), so now if you remember our discussion from before, there is now a 50% chance of Bob measuring the wrong result (compared to Alice) at his end! So now there is an error in the code, and if Alice and Bob simply compare a small percentage of their code, they can see if there are any errors (that is, if someone was listening).
I will be making a smaller followup post on this in the coming days, where i will discuss how you can enhance the security of this key distribution protocol, using the weirdness of quantum entanglement, which i talked about a few weeks ago.
July 11th, 2008 at 12:13 pm
You mixed up the key and message in your first example.
July 12th, 2008 at 11:41 am
I assume you mean in the picture? I didn’t think too much about the order as the result would be the same (A+B = B+A). If it’s something else you mean i’d really appreciate if you’d pinpoint it so i can fix it, i read it through again and can’t seem to find the error.