You’ve probably heard about the rise of quantum computers and how they’ll expose all of our secrets and data. Current implementations are seemingly distant from a quantum computer sufficiently powerful to break modern day encryption, requiring a vast number of qubits to facilitate quantum error correction which protects quantum information from errors due to noise and decoherence. Nevertheless, certain data, for example, government secrets, must be kept secure for years to come and so preparation for a post-quantum computer world is of paramount importance. Current methods will not suffice. $$\newline$$

Modern Encryption

A current encryption method, RSA, utilizes trap door functions - functions that are easy to compute in one direction, however, are difficult to compute in the opposite direction. The RSA algorithm takes advantage of the fact that prime factorization is difficult. Briefly, RSA works by taking two distinct large prime numbers p and q - which are probabilistically tested to be prime - and multiplying them together to create a number, n.

$$n = pq$$

Then a number, e, is chosen - a large value is chosen as choosing a small value may reduce the secrecy of the cipher - that is relatively prime to the totient (phi).

\begin{aligned} \phi (n) &= \phi (pq) \newline \phi (pq) &= (p-1)(q-1) \newline gcd(e, \phi (n)) &= 1, \ 1 < e < \phi(n). \end{aligned}

The number pair (pq, e) is then used as the public key which can be given to anyone. The public key is used to encrypt the plaintext data, M, giving the ciphertext C according to the following equation,

$$C = M^{e} \ mod \ pq.$$

The ciphertext must be decrypted using the private key (pq, d), also a number pair. The value of d must satisfy the following congruence relation and hence can be computed,

$$de \equiv 1(mod \ \phi(n)).$$

As was shown, the RSA algorithm makes use of mathematics to create an encryption system perhaps quantum cryptography can exploit properties of unique implementation to create something better. $$\newline$$

Quantum Cryptography

Quantum cryptography allows for a random key to be distributed securely between two parties even when they share no initial information. Still, the parties must make use of a classical medium of communication that itself is susceptible to eavesdropping, however, it must be passive eavesdropping and the eavesdropper is assumed to not be able to modify the data flowing between parties in the classical channel. If this wasn’t the case, the two true parties must have shared some secret information initially to combat this. $$\newline$$

Polarised Photons

The property of photons of light, that is polarisation, can be used to encode information. Let us consider a single photon, initially unpolarised, through use of a polarising filter the polarisation of the photon can be changed. Quantum cryptography makes use of light polarised rectilinearly (horizontally or vertically) and diagonally (both diagonals) and this is what lets us encode information in the photon. We can assign a photon with a horizontal or 45° diagonal polarisation to zero and a vertical or 135° diagonal polarisation the number one, both in binary. Now that we have bit representations to work with we can use the unique properties of this implementation to create a one-time pad. $$\newline$$

How does quantum cryptography work?

Conforming to the usual naming convention of Alice and Bob, consider a situation in which Alice needs to communicate securely with Bob. Firstly Alice will send a stream of photons, applying a filter - either rectilinear or diagonal - at random to each photon. When receiving these photons Bob measures them also using either filter, selected randomly and independent of Alice’s sequence. Probability says that Bob will use the correct filter for half of the incoming photons - as he has two choices, which are ‘randomly’ selected, for each photon. It should be noted that Bob will likely not have received every photon because in practice the transmission and detection of photons aren’t perfect, though, this doesn’t matter and those bits can just be discarded. Alice and Bob now use a classic communication channel, say, telephone. Bob tells Alice the filter he used for each photon and Alice confirms which measurements were correct leaving Bob with bits that have been transmitted, detected and measured correctly, assuming there was no eavesdropping. In the case that the quantum channel had an eavesdropper Alice and Bob will know because measuring the photon disturbs its quantum state and thus its encoded information. To solve this problem Alice and Bob take a subset of the bits that have been transferred successfully and ensure they have the same values - either zero or one. If their values differ they know that there has been an eavesdropper who interfered with the process and thus can discard everything and restart the process. In theory, the eavesdropper using a man in the middle attack could have successfully guessed the correct filter to use for each photon but this becomes increasingly less likely the greater the number of photons in the quantum transmission. Also, when selecting a subset of the successful data, Alice and Bob could happen to choose bits that the eavesdropper guessed and forwarded correctly. Again, the likelihood of this decreases as the number of photons increases and as the size of the subset increases. If Alice and Bob determine that their subset values are equal then they can conclude with high probability that there has not been any substantial eavesdropping. Alice and Bob will discard the subset values and the remaining bits are used as a one-time pad (OTP) and secure communication can proceed facilitated by quantum cryptography. The whole process is demonstrated in the following diagram. This was just a small introduction to quantum cryptography and I'm by no means an expert or anything close, so if there are any mistakes in this post, please let me know! In the future, I may decide to delve into the mathematics behind quantum cryptography and break out my old linear algebra textbook but for the time being, I have just stuck with trying to articulate the core concept, which evidently does not require mathematical ability. I mainly decided to write this to explore my own thoughts and articulate my own understanding of quantum cryptography. Writing is a great way to do this.