Home Knowledge Center White Papers and Articles

Magic of Quantum Cryptography

This article is a flight high into the unknown vistas of quantum mechanics and a little bit of cryptography. Both subjects are thoroughly fascinating, no doubt but there's a little similarity to rocket science. So wear your seatbelts tight and expect some amount of air sickness. But don't worry; I am also in the same flight as you! Here we go!

"Facts are stranger than fiction" we have heard. Here also we are up against facts; it's just that it may take somewhere close to a decade to see the widespread use of quantum computing and quantum cryptography.

First things first. What is meant by "quantum computing" ?

Imagine that you have two versions of a question. To answer both questions using an ordinary computer, you would have to input the first version and wait for the answer, then input the second version and wait for the answer. In other words, an ordinary computer can address only one question at a time, and if there are several questions it has to address them sequentially. However with a quantum computer, the two questions could be combined as a superposition of two states and inputted simultaneously - the machine itself would enter a superposition of two states, one for each question. Or according to the many worlds interpretation, the machine would enter two different universes, and answer each version of the question in a different universe. Regardless of the interpretation, the quantum computer can address two questions at the same time by exploiting the laws of quantum physics.

To get some idea of the power of a quantum computer, we can compare its performance with that of a traditional computer by seeing what happens when each is used to tackle a particular problem. For example, the two types of computer could tackle the problem of finding a number whose square and cube together use all the digits from 0 to 9 once and only once. If we test in an iterative manner, it will take us a few iterations to arrive at the answer. It ultimately turns out that the answer is 69, because 69^2 = 4,761 and 69^3 = 328509. It is clear that this process of time-consuming, because a traditional computer can test only one number at a time. If a computer takes one second to test each number, then it would have taken 69 seconds to find the answer. In contrast, a quantum computer would find the answer in just 1 second!

We represent the numbers in a special way to exploit the power of a quantum computer. One way to represent the numbers is in terms of spinning particles - many fundamental particles possess an inherent spin, and they can either spin eastwards or westwards (clockwise or anticlockwise) . When a particle is spinning clockwise it represents 1 and when it is spinning anticlockwise it represents a 0. Hence a sequence of spinning particles represents a sequence of 1's and 0's, or a binary number. Since quantum physics is all about superposition of states, we can represent a n-bit number as n spinning particles. All the particles could be spinning either westwards or eastwards at the same time, we need only one n-bit number to represent the 2^n numbers that we would require in a traditional computer. You get the idea, right?

A little more physics here. The superposition is achieved as follows. Imagine that we can observe one of the particles, and it is spinning westwards. To change its spin, we would fire a sufficiently powerful pulse of energy, enough to kick the particle into spinning eastwards. If we were to fire a weaker pulse, then sometimes we would be lucky and the particle would change its spin, and sometimes we would be unlucky and the particle would keep its westward spin. So far the particle has been clear in view all along, and we have been able to follow its progress. However if the particle is spinning westwards and put in a box out of our view, and we fire a weak pulse of energy at it, then we have no idea whether its spin has been changed. The particle enters a superposition of eastward and westward spins, just as the cat entered a superposition of being dead and alive (Remember our Schrodinger's cat and the cyanide vial). By taking n such westward spinning particles, placing them in a box, and firing weak pulses of energy at them, then all n particles enter a superposition. There is a fifty percent chance of the particle spinning westward and a fifty percent chance of the particle spinning eastward after the application of the weak force.

With all n particles in a superposition, they effectively represent all possible combinations of eastward and westward spins. The particles simultaneously represent 2^n different states, or 2^n different numbers ! In our example, the arithmetic operator inputs n particles, while they are still in a superposition of states, into the quantum computer, which then performs its calculations as if it were testing all 2^n numbers simultaneously. After 1 second, the computer outputs the number, 69 which fulfils the requested criterion. The arithmetic operator gets 2^n computations for the price of one quantum computation.

I agree, quantum computers defy common sense. For that matter, Einstein's relativity theory and bending of light, space and time is also enigmatic!

Because a quantum computer deals in 1's and 0's that are in a quantum superposition, they are called quantum bits, or qubits (pronounced as 'cubits'). If it were possible to achieve the appropriate superposition of 250 particles, then a quantum computer could perform 10^75 simultaneous computations, completing them in one second! Oops!

But there is a caveat here. A superposition exists only when it is not being observed, but an observation in the most general sense includes anything external to the superposition. A single stray atom interacting with one of the spinning particles would cause the superposition to collapse into a single state and cause the quantum computation to fail.

Thank God, I have successfully explained quantum computers. Now for the next part. If quantum computers become real, then it will destroy our privacy in the digital world, destroy electronic commerce and demolish the concept of national security. Do you see why? The operations needed to break today's encrypted communications using a traditional computer is somewhere close to the age of the universe.

But in a quantum computer, it will take - hold your breath- a second ! But all is not bad with quantum physics. To solve this problem, quantum cryptography comes to our rescue. What is quantum cryptography? Don't worry, it's not half as spooky as quantum computing. So relax, the flight is going to land in a few hours.

Now for some optics. We all know that light is very much an electromagnetic wave with oscillating electric and magnetic fields.

Framework comes here

Unpolarised or natural light has the fields represented by arrows in the figure oscillating in all directions. Sunglasses help us avoid the glare because they remove the oscillations in the horizontal plane thus avoiding glare. This is commonplace physics. There is nothing quantum about it.

Now how do we use polarized light to achieve quantum cryptography?

We can apply superposition to the orientations of the individual photons (Remember wave particle duality of light?) so that we can represent 1's and 0's with respect to their orientations.

Framework comes here

Here also we apply a principle similar to applying a weak force to the spinning particles such that the resulting state is a probability function. A calcite crystal can be used as a filter to detect a vertically polarized photon. Now if we polarize a photon diagonally, then it is similar to applying a weak force. There is a fifty percent probability of detecting that photon as a vertically polarized photon(in which case it will represent a 1) and a fifty percent probability of detecting it in the horizontal plane(in which case it will represent a 0).

Using this property, Alice and Bob can communicate the bits of the secret key. We call this cryptography because the photons cannot be eavesdropped by Eve. This is thanks to the Heisenberg's uncertainty principle . If we observe the state of a photon, then the property of the photon changes irrevocably. So only Bob can detect the photons sent by Alice. If Eve detects it in the middle, Bob will invariably know it.

Here we land on earth. Hope you had a nice flight.

Girish Venkatachalam is a senior software engineer at MindTree Consulting.
He can be contacted at girishv@mindtree.com