Andrew Hoyer
 

about

experiments:

(sudoku solver)

(simple fractals)

(cloth simulation)

(numbers to words)

(particle systems)

(quantum cryptography)

(something a day)

(drip sessions)

photos (flickr)

work

 

flickr (dolinski)

facebook

twitter

linkedin

email

 

Getting off the hook:

Any downloadable material on this site is provided as is. If something bad happens, Andrew Hoyer will in no way take any responsibility (though he would most definitely send his heart felt remorse). © 2010 Andrew Hoyer

 
Wikipedia Affiliate Button

Quantum Cryptography:

 

This article/guide/tutorial (or whatever you choose to call it), was written as a project for a cryptography course in the winter semester of 2009 (January-April). As such it is very likely that it will become out of date as the technologies and theories involved in quantum cryptography continue to progress. Please take this article/guide/tutorial as-is and be sure to check other more recent resources (particularly when looking at the ongoing concerns section).

 

The world as it stands today is in a golden age of cryptography as nearly everyone has access to some form of secure encryption. This is mainly due to the spread of public key cryptographic systems through the internet. As has been seen in history even the most secure encryption systems eventually meet their end. Should the day come that the current popular systems no longer provide adequate security, scientists and cryptographers will most likely look towards the science of quantum mechanics and its ability to provide its users with a method of perfect security.

Below I've described the BB84 protocol for Quantum Cryptography (as developed by Charles Bennett and Gilles Brassard in 1984).

The Scenario:

Lets say there are two people, Alice and Bob, who want to communicate some very important information, Alice's grandmother'sf top secret cake recipe, making sure that absolutely no one else can find out the recipe. We should also note that Alice and Bob have an enemy, Eve, and she desperately wants to get her hands on the recipe so as to start up a large chain of cake shops.

Alice and Bob know that Eve is a very determined individual, so no matter how they communicate, Eve will definitely be listening in (phone lines can be tapped, letters and emails can be intercepted, carrier pigeons can be captured... etc). Luckily, Alice is a bit of a cryptography buff and she really wants to try her hand at using a one time pad to encrypt the recipe, this way even if Eve gets her hands on the message it'll be impossible for her to decrypt it.

But with using a one time pad comes the problem of distributing the key to Bob so that he, unlike Eve, will easily be able to decipher the message. In other words Alice is stuck in a catch 22 situation, she would have to share her secret key with Bob in order to share the secret recipe. To solve this Alice plans on implementing a Quantum Cryptographic system.

She knows that Quantum Cryptography isn't exactly what the name suggests, as it isn't actually used to encrypt anything. Rather it is just a solution to the key distribution problem. So really it is more accurate to call Quantum Cryptography Quantum Key Distribution (QKD).

The basis for Alice's QKD system revolves around tiny indivisible units of light that obey the laws of quantum mechanics.

The Quantum World:

I know that quantum mechanics has a stigma of being very difficult to understand, but don't worry we're not going to be getting into the real wacky stuff. All you need to know are a couple properties of light.

Light can be thought of as both a particle and a wave, each obeying a set of physical laws. When light is treated as a wave, there are sets of classical physics equations that govern how it behaves. When looked at as a particle, light acts much stranger as it moves to the statistical approach of quantum mechanics for its explanation. These particles are known as photons.

Though photons have many interesting properties, we're only interested in a couple:

  1. They have a unique property called polarization (or sometimes orientation), for the sake of simplicity we will assume there are only 4 different ways light can be polarized.
  2. Just the act of observing a photon has the potential to change its polarization. This is crucial to the functioning of quantum cryptographic systems (we'll see why later).
Polarization: Horizontal Up-Down Diagonal Vertical Down-Up Diagonal
Symbol:

Above you can see the 4 different orientations we'll be using. Next we need to have a way of categorizing the different types of photons. For that we're going to use what are called polarization filters. A filter takes the incoming photons and filters them according to their orientation:

Filter: Horizontal Up-Down Diagonal Vertical Down-Up Diagonal
Symbol:

So a horizontal filter only lets through horizontal photons, a vertical filter only vertical photons and so on.

Next we'll look at how to detect them. For that we have two different types of detectors, Rectilinear which detect vertical and horizontal photons, and Diagonal which detect Up-Down and Down-Up photons:

Detector Type: Rectilinear Diagonal
Symbol:

This is where the second property of photons comes into play. We already stated that a rectilinear detector detects horizontal and vertical photons, but what would happen if either of the diagonal photons were to hit the rectilinear detector? Well as it turns out the diagonal photon will turn into a horizontal or vertical photon. So this means no matter what hits the detector, something is always going to be detected. This same idea applies to the diagonal detector (it will flip horizontal and vertical photons to one of the diagonals).

Input   Filter   Output  
+ =
+ =

How it works:

The Setup:

For Alice and Bob to pull this off they're going to need quite a bit of special hardware. Lets make a list:

The Algorithm:

Lets go through a quick overview of how this whole process is going to work. Don't worry if you don't understand everything right away, hopefully when we look closer at each step you'll understand how it all fits together.

  1. Alice, using her photon emitter, sends a random sequence of 0's and 1's by switching between her 4 different polarization filters making sure to note the polarization of each one she sends. This initial string of photons is generally very large. For example, a 250 character message, Alice should initially transmit around 4000 bits, 8 bits/character (assuming ASCII characters) x 250 characters x 2 (because as we'll see, half of these bits will be lost).
  2. On the other end, Bob has no idea what types of photons Alice is sending, so he is forced to switch randomly between his two detectors. With every photon he writes down which detector he used as well as the 0 or 1 result.
  3. Once Bob is finished detecting Alice's photons, he phones Alice (fully aware that Eve may be listening) and tells her which detectors he used on each photon. Alice either confirms or denies whether or not Bob used the right detector for a given photon. Both make sure to note which ones he measured incorrectly.
  4. They now remove all of the bits for which Bob used the wrong detector. They should now have exactly the same bit sequence, and thus a long one time pad key.

Thats pretty much it. Again I understand that some of these steps may seem a little fuzzy or unclear. Next we'll go through each step and see what is going on.

An Example (with details):

I understand that the above algorithm is a little high and dry, so lets go through it step by step and explain in more detail what is actually going on.

Just a couple notes before we start:

 

Step 1:

The first step of the whole process is for Alice to generate her set of random bits and encode them using her different polarization filters making sure to stick with the convention that her and Bob decided upon earlier (that being that 1 is encoded as horizontal or up-down and 0 is encoded as vertical or down-up ), sending this sequence through the fiber-optic cable to Bob.

This step may seem rather weird at first, why would Alice send a completely random sequence to Bob? The whole idea of Quantum Cryptography is to generate a very large random key, so it is obvious that for the key to be random at the end, it needs to be random at the beginning. If you want, you can generate another random sequence for Alice.

Step 2:

Now its Bob's time to shine. Remember, Bob has no idea what polarization of photons Alice is sending down the line, so he has to randomly switch between his two photon detectors making sure to record which detector he used and what bit he detected. His results should look something like this:

Again this is where quantum mechanics comes into play. Because Bob has no idea what the polarization of each photon is, he has a 50% chance of using the proper detector, but either way he's going to record a result. For example, say Bob uses a rectilinear detector for the first photon, if that photon happens to be a horizontal or a vertical then he is going to properly record the bit that Alice was trying to send. But if he used a diagonal detector, there would be a 50% chance that he'd record the bit Alice was intending. Remember this same idea applies for if he were trying to detect either of the diagonal photons.

If you want you can generate Alice's sequence again, or you could always generate Bob's half.

Step 3:

When Bob is done receiving Alice's transmission, he calls Alice over the phone. Together they go over the whole transmission comparing the detectors that Bob used to what he should have, taking note of which ones he got wrong (outlined in red).

The important thing to remember in this step is that Bob and Alice only talk about which detectors were used properly. This means Alice can't say anything about the random bits or photons she sent, and bob can't say anything about which bits he recorded. If they do let slip some of the bits or types of photons then this whole process has been a waste as you can count on Eve listening in on the phone call, trying to get any information she can.

If you want you can generate a whole new set of data, or a new sequence for Alice, or a new sequence for Bob.

Step 4:

The last thing that Alice and Bob have to do is assemble their final key. To do this they must ignore any bits for which bob used the wrong detector.

Above you can see that Alice and Bob have just dropped the incorrect bits. When all the bits they agreed upon are put together they have their key:

Below I've encrypted the recipe using the key generated above (in combination with an extended Vigenere square). For ease of comparison, I've added a space between every character.

Original Recipe:

I n g r e d i e n t s : 3 c u p s f l o u r , 2 c u p s s u g a r , 2 t s p b a k i n g s o d a , 1 t s p s a l t , 6 T b s p c o c o a p o w d e r , 2 T b s p v i n e g a r , 3 / 4 c u p o i l , 2 t s p v a n i l l a e x t r a c t , 2 c u p s w a t e r . I n s t r u c t i o n s : 1 ) P r e h e a t o v e n t o 3 5 0 F . 2 ) M i x w e t a n d d r y i n g r e d i e n t s s e p a r a t e l y 4 ) M i x w e t i n t o d r y . 5 ) B a k e f o r 3 0 m i n u t e s .

Encrypted Recipe:

Decrypted Recipe:

 
 

One last time. If you want to, you can you can generate a completely new set of data, or a new sequence for Alice, or a new sequence for Bob just to see how everything changes.

Why it works:

Lets go ahead and look at some of the crucial components of this process and see if there is a way for Eve to get Alice and Bobs key. If we make the assumption that the computers that Alice and Bob use are completely secure, then there are only two areas that Eve can attack:

Alice and Bob's transmission:

I know when I first started learning about Quantum Cryptography I thought to myself, 'Why couldn't Eve just "tap" Alice and Bobs fiber optic cable and read all the photons that Alice is sending to Bob?' Unfortunately for Eve, this is a lot more difficult than it sounds.

One of the key properties of this entire set up is that measuring the polarization of a photon has the potential to change its polarization. So this means that if Eve manages to tap the line and starts taking readings of Alice's photons she might end up changing them. This in turn means that the photons which Bob detects may be different from the ones that Alice sent. Below is an example of what this scenario would look like:

The above table gives lots of information. First off, I've done the usual removing of bits for which Bob used the wrong detector. Next thing to notice is that I've also highlighted the detectors for which Eve used the wrong detector and thus accidently switched one of Alice's photons. Lastly, I've also highlighted the bits for which Alice and Bob did not agree upon (because of Eves meddling).

Lets look at this scenario with a bit of statistics. Because Eve has no idea what orientation of photons Alice is sending, she follows the same procedure as Bob of randomly switching between her detectors. In doing so she is statistically going to get about 50% right and 50% wrong. Bob is going to do the exact same thing, and it turn is also bound to choose the correct detector 50% of the time. Combining these results, on average if Eve measures every single photon that Alice sends, she will inadvertently mess up about 25% of Alice and Bob's final secret key.

So really, all Alice and Bob have to do to ensure the security of their key, is check some of their final bits (and discard them). If a bit does match, then they know Eve is listening in and would abandon the key.

Alice and Bob's Comparison:

For the sake of an example, lets assume that in this scenario Eve did not try to "tap" Alice and Bob's photon transmission and detection. Instead she is just going to listen in when they compare their results and try to learn something about their final key.

So after Alice and Bob finish they're transmission they phone each other. Eve then compiles the table we see below.

Not exactly a lot there... Sure she knows which detectors they used for their key, but what she doesn't know is which photons they detected. This means if she wants to find out the key, she would have to try every possible combination of 0 or 1 for every bit. To put this in perspective, if the final key was say 2000 bits longs this means she would have to check 2^2000 possibilities, a number so large that even Google's calculator can't compute it...

Ongoing Concerns:

Quantum Cryptography as it stands today is not perfect. In this last section I would like to talk about some of the problems that prevent Quantum Cryptography from stepping into public use.

Hardware:

As you can see from the setup of the example above, QKD depends heavily on hardware components. This is probably the largest limiting factor of the system as a whole as it relies on the proper transmission and detection of individual photons. This is no small feat as photons are sensitive particles and if not treated carefully, can change polarization or sometimes disappear.

Other cryptographic systems:

Perhaps the most influential reason of why Quantum Cryptography isn't further developed, is that many of the encryption systems in place today seem to be doing the job just fine.

Conclusion:

Quantum Cryptography today, if nothing else, is an interesting experiment bridging two sciences. As such it is bound to grow and evolve with time (like any other science), sometimes going in the right direction and other times, not. What ultimately matters is that it is at least something different from the mathematics based cryptographic systems that are prevalent today. Yes, the quantum cryptographic process I've described above has limitations in its physical implementation, but out weighing those limitations is the soundness of the theory of security embedded in quantum mechanics and as such it is the biggest step we have to the holy grail of 100% perfectly secure communications.

Try it out:

Below you can encrypt some text using a key generated with quantum cryptography.

Plain Text:
 
Key:
 
Cipher Text:

Note:

 

References and Further Readings:

References:

 

Further Readings:

Supported Browsers
safari firefox chrome ie opera
any any any 7? any