# Quantum Key Distribution (QKD) source: https://developer.mastercard.com/blog/quantum_key_distribution/index.md Authors: John Beric. Overview This blog post is the third in a three-part series on Public Key Encryption (PKE), the threat posed to it by Quantum Computing and how these threats will be addressed. In this post we will discuss the possible application of Quantum Key Distribution (QKD) to solve the threat to PKE posed by Quantum Computing and at the end provide a short primer on how QKD actually works. Can QKD deal with the threat of quantum computers breaking RSA/ECC? Quantum Key distribution is a pre-1970s approach to the problem of bootstrapping a secure communication channel (we covered this in the first blog post in the series). It suffers from all the disadvantages of the pre-1970 techniques and has some more disadvantages unique to itself: No spontaneity: it can only service closed pre-defined user groups. Cost: significant physical hardware investment is required, e.g. a geostationary satellite or dedicated fibre optic cables between each pair of members of the user group plus mandatory appropriate terminating equipment at each user. There is a need to agree a cryptographic key without QKD to bootstrap the QKD secure communication bootstrapping process (two bootstrap processes seems one too many to me!?) Geographical reach and Resilience: as far as I know fibre optic mediated QKD is limited to a range of 200km. If an attacker is permanently camped on a QKD dedicated fibre optic cable manipulating exchanged data, the QKD process will detect this but if the eavesdropper creates sufficient "noise", users will not be able to boot strap a secure communication at all. Loosely, if the threat QKD is supposed to defend against is applied, QKD detects it but does not overcome it. The flip side if there is no "noise" on the QKD channel, security of the exchange process is guaranteed by virtue of quantum mechanics physics. However, the physical equipment at each endpoint may have side channel vulnerabilities and other failings that need to be mitigated. QKD as instantiated today seems to be restricted to closed user groups - it cannot outperform public key cryptography in the context of our Zoom example say (again from the first blog post in this series) or similar where the service requires open access without any additional hardware beyond a phone/tablet/PC with a telecoms contract and an appropriate software application. No doubt there will be technology improvements, costs will decrease, and flexibility will increase. In my opinion, properly developed QKD could support a cryptographic technology known as One Time Pad, this technique correctly implemented provides provable unbreakable secure communications, albeit point to point. One Time Pad relies on a secret exchange of a random number sequence with more digits than characters in any message that is to be exchanged between Alice and Bob. The random number sequence acts as a "one time use" secret key to mask data (using the computer operation called XOR). The random numbers must only be used once. Operationally it is very cumbersome and problematic to do the random number exchange efficiently, and it is prone to error where random digit sequences get re-used, this undermines security. QKD with high data rates would be the most convenient instantiation of One Time Pad possible -- however the endpoints would have to be properly secured. One Time Pad is something that I would have thought governments would use and maybe they do, using secure physical transport to establish the secret One Time Pad. However, many national security agencies have publicly remarked that they do not see QKD as an appropriate tool for One Time Pad nor indeed appropriate for key distribution. In the context of government communications, QKD is still immature technology. How QKD works Recall, traditionally it is Alice and Bob who wish to send information between each other securely. As elementary background to the physics of QKD, we need to note that light comes in minuscule lumps called photons and we have equipment that can capture single photons and measure the properties of these single photons. Most of us will have experienced the sunlight glare reflected off a water surface. This is due to a phenomenon called polarisation. Light polarisation has an orientation that can be anything from up and down (called Vertical polarisation represented by V), to sideways back and forward (called Horizontal polarisation represented by H) and every direction in between. The polarisation orientation of photons can be set and measured using polaroid filters. For QKD differently polarised photons encoding 0s or 1s in an agreed way are sent from Alice to Bob either along dedicated fibre optic cable specially installed for the purpose or as pulses sent through the air between towers within line of sight of each other or beamed down from satellites. Clearly geo-stationary satellites would be preferred to enable continuous operation. For QKD, two pairs of polarisation direction are used, the first pair is H (Horizontal) and V (Vertical) making up the "+ pair", and the second pair is +D (+ Diagonal) and -D (- Diagonal) making the "x pair". So, there are 4 possible polarisation states: H, V, +D, -D. They are sometimes represented by lines: ---, \|, /, \\ but we'll stick with the letters. We will use an encoding on the polarisation directions H, V, +D, -D, to transmit 0 or 1 in the following way: H =1, V =0, +D =0 and -D =1. For QKD Alice prepares a sequence of polarised photons to encode a series of 0s or 1s, e.g. she sends: H, +D, -D, V, V, V, H, H, +D, V, +D, -D, -D, V 1 0 1 0 0 0 1 1 0 1 0 1 1 1 If we try to send a horizontally polarised photon ( H ) through a single vertically polarised filter ( V ) it will be blocked (this of course is how polaroid sunglasses work) and we will have in effect performed a measurement. On the other hand, if a horizontally polarised photon ( H ) is sent through a pair of filters in a + orientation then it is neither blocked nor corrupted i.e. ( H ) sent to + filters comes out as ( H ) unchanged and still encodes 1. Now we come to quantum magic, if either a horizontally polarised ( H ) or vertically polarised ( V ) photon is sent through polaroid filters in an x configuration, the photon will not be blocked as we might expect, but instead will go through the misaligned filter and will randomly assign itself to either a +D with a 50% chance or to a -D polarisation with a 50% chance, all memory of the initial orientation be it either horizontally/vertically polarised will be lost. Summarising: V -\> + -\> V Similarly: -D -\> x -\> -D But -D -\> + becomes H with 50% chance or V with 50% chance +D -\> + becomes H with 50% chance or V with 50% chance V -\> x becomes -D with 50% chance or +D with 50% chance H -\> x becomes -D with 50% chance or +D with 50% chance The final piece of the quantum magic knowledge necessary for QKD is known as the no cloning theorem; given a photon with an unknown polarisation state it is impossible to clone it. This is intuitively plausible; how can I copy something unknown? It is not possible to record and make a copy of a string of photons where the actor trying to record the photons does not already know their polarisation. For QKD Alice prepares a random sequence of either horizontal/vertically (H or V) polarised light particles (photons) or either +450 or -450 diagonally (+D or -D) polarised photons this process is like tossing two coins repeatedly and recording the results, one coin determines + or x orientation and the second coin determines 0 or 1 (if + on first coin then H or V, if x on first coin +D or -D). Alice ends up with a train of H, +D, -D, V, V, V, H, H, +D, V, +D, -D, -D, V... polarised photons representing a sequence of 0s and 1s. Alice sends this train to Bob, as Bob receives the photons, he will guess photon by photon whether it is an H versus V or a +D versus -D polarised photon, and he will send the photon though + polaroid filters or a x polaroid filters according to his guess. If he passes a received H photon though the H/V (+) polaroid filter he will measure H exactly as what Alice sent correctly and similarly for the other three choices V sent to H/V (+), +D sent to +D/-D (x), -D sent to +D/-D (x). If he sends a H photon though a +D/-D (x), 50% of the time it will come out as +D (=+450) and 50% of the time it will come out as -D (=-450). After the measurements are completed, Alice reveals the filter choice sequence Bob should have used, this is like the reveal in a "game of battleships". The "game of battleships" reveal is executed using a public channel which has an authentication capability, secrecy is not required but Bob needs to trust what he is told by Alice as to the sequence of filters that should have been used. On average Bob should have got half of them right. (please note, do not miss the irony for QKD to work, we need a secret key in place using one of the other pre 1970s techniques before we run the protocol, so we can authenticate our game of battleships). In this run of the protocol Bob correctly guessed which channel to use 8 times. Interpreting the correct hits, we get 0 1 0 0 0 1 0 1 0 and this would then be the start of a cryptographic key for use between Alice and Bob. There are two levels of eavesdropping. Someone only eavesdropping the "battleships" conversation will know the filters (+ or x) that should have been used for which photon by Bob but knowledge of this does not leak whether a 0 or 1 was encoded on any given photon; this is because independently of the + or x set of filters, if you haven't intercepted and measured the photon, it has a 50:50 chance of being zero or one and no information has leaked. In this instance the eavesdropper could not have arbitrarily cloned the photons sent by Alice for later examination since this is forbidden by the no cloning theorem, as far as the attacker is concerned the photons have unknown polarisation state. The next level of eavesdropping is that of intercepting the photons from Alice guessing the polarisation type + or x and then forwarding the value they measure to Bob. Since the eavesdropper does not know the correct sequence of filters to apply, the act of interception will corrupt the photon train polarisation values, Some H and V polarised photons from Alice will be corrupted to +D and -D photons and vice versa. When Alice and Bob come to the "battleships" reconciliation, Bob will get matches where he shouldn't and not get matches where he should. If the eavesdropper is sampling every photon then this will prevent Alice and Bob agreeing a key, so security is obtained by default in that no data is exchanged.