QCrypt in Toulouse: Key Distribution
These are notes for the third session of the Quantum Cryptography Workgroup in Toulouse. More info can be found here.
In the previous two sessions we have introduced the fundamental ideas underlying (quantum) cryptography and developed helpful mathematical tools. We now want to distribute actual keys. First classically, then quantumly.
Definition. A key distribution protocol is a protocol that lets Alice and Bob agree on an
-bit key . It is
-correct if the protocol succeeds with probability at least , that is, if Alice and Bob have derived keys according to the protocol then . -secure if an eavesdropper Eve is almost ignorant about the key, that is .
Such a protocol may work only under specific assumptions on the communication channels that Bob and Alice have access to. Generally, we will distinguish between the following types of communication channels.
- Classical channel
- Classical authenticated channel
- Classical secret channel
- Classical secret and authenticated channel
- Quantum channel
A classical toy protocol
As a warmup, let us consider a purely classical protocol in a toy model. We assume that Alice and Bob have access to a classical authenticated channel (CAC) and want to establish a key over a classical channel to which Eve has limited access in the following sense. If Alice sends a bit
- Bob correctly receives
- Eve receives
with probability and with probability .
The induced channel Alice
Recall the definition of an
Definition. A
-strong seeded extractor is a function such that for any qc state with ,
Now consider the following protocol.
Protocol 1 -- Key distribution over a special channel.
- Alice chooses
uniformly at random and sends the bits over the channel. - Alice picks random seed
and applies an -strong seeded extractor to , computing . - Alice sends
over the CAC. - Bob computes
.
Clearly the protocol is
It is also not hard to see that the protocol is
We can determine what the constants
Assuming
so we must choose
Remark. Of course the same protocol works for other restrictions on the channel, for example if Eve receives all sent bits correctly but only has limited memory.
The CAC assumption
Before we introduce a key distribution algorithm that works without additional restrictions on potential eavesdroppers, we need to address the assumption that Alice and Bob have access to a classical authenticated channel.
There are generally two approaches to implementing an authenticated channel: Message Authentication Codes (MACs) and Digital Signatures. However, both approaches have drawbacks in a quantum key distribution context. MACs use private key cryptography --- so Alice and Bob already need to have a shared private key in advance! Digital Signatures, on the other hand, do not require an established private key, but make use of computational assumptions that generally no longer hold in the quantum era.
Does this mean that the CAC assumption is too strong? The answer is nuanced. Let us take a look at both approaches individually.
MACs
The idea behind message authentication codes is that based on a shared private key, Alice generates a tag for her message. With the same key, Bob can verify the validity of the tag for a given message. Formally, a message authentication code is a pair of functions
, which takes a message and a key, and returns a tag. , which takes a message, a key, and a claimed tag for the message. It then returns whether the tag is valid for the message.
Both functions are required to run in polynomial time.
A MAC is correct if
It is secure if, informally speaking, it is impossible for an adversary to generate a new pair of a message and a corresponding valid tag, even if he has access to arbitrarily many valid (message, tag) pairs (except with negligible probability).
Example. An example of a one-time MAC[1] can be constructed using a 2-universal family of hash functions. Given such a family
,
- The key is an element
. . .
Obviously this scheme is correct. Moreover it is secure by the 2-universality of
For maximal security, one would choose
Under the assumption that one-way functions exist[2], one can find secure MACs that use shorter keys or allow reusing a key arbitrarily many times.
In the context of key distribution algorithms, however, the conceptual problem that Alice and Bob need to already share a private key remains.
Digital Signatures
As opposed to MACs, digital signatures make use of public-key cryptography. The idea is that Alice generates a pair
, which takes a message and a private key, and outputs a signature. , which takes a message, a public key, and a claimed signature and outputs whether the signature is valid.
Both functions are required to run in polynomial time,
The scheme is correct if
Security is defined similarly as for MACs.
Example. A common digital signature scheme[3] is based on RSA. Here we choose two large primes
and let . We then choose a positive integer and compute a such that . The public key is , the private key is .
We then let
where
is an embedding of the message space into .
Of course, the above algorithm is no longer secure in a post-quantum setting. An obvious idea is to base the signature scheme on a post-quantum cryptographic algorithm like LWE instead. However, these types of algorithms are exactly what quantum key distribution is supposed to replace!
A slightly more convincing argument for digital signatures is that keys generated by a quantum key distribution protocol enjoy everlasting security, even if the authentication scheme underlying the CAC is broken afterwards. It suffices for the CAC to remain authenticated for the duration of the protocol, which is at most on the order of seconds. The signature scheme used to implement it may hence not necessarily need to be provably secure as long as it is "strong enough".
The BB-84 quantum key distribution protocol
As an example of an actual quantum key distribution protocol, we look at the well-known BB84 protocol, proposed by Bennett and Brassard in 1984.
Protocol 2 -- BB-84.
- Fix a large integer
and let . - Alice chooses strings
and uniformly at random. She sends Bob each bit by encoding as a quantum state according to as . - Bob chooses a string
uniformly at random, and measures the th received qubit in the basis corresponding to . This yields a string . - Bob tells Alice over the CAC that he has received and measured all the qubits.
- Alice and Bob exchange their basis strings
over the CAC. - Alice and Bob discard all bits
of and respectively where , yielding strings and - Alice and Bob check for eavesdroppers:
a. Alice picks a random subsetand tells Bob over the CAC.
b. Alice and Bob exchangeand over the CAC. They compute the number of errors .
c. If, Alice and Bob abort the protocol. Otherwise they proceed with the strings and . - Alice and Bob perform privacy amplification: Alice picks a random seed
and computes . She then sends to Bob, who computes .
Consider the following example run of the protocol.
+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+
|
+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+
|
+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+
| Sent |
+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+
|
+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+
| Measured |
+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+
|
+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+------------------+
It is not hard to see that the protocol is correct. Clearly, when
Security of BB-84
The security of BB-84 is intuitively clear: If Eve tries to measure Alice's qubit in a basis that does not agree with the one that Alice used for the encoding, she will introduce an error in Bob's measurement with probability
In this sense, the general idea mirrors our toy protocol.
Formalising this idea is more involved, in particular because Eve might apply more involved attacks like entangling her system with the sent qubits. In fact it is so difficult that it took more than 20 years to give a proof that does not only work asymptotically. We will show security asymptotically in a restricted case.
To simplify the analysis, we first adapt the protocol somewhat. We assume that Alice and Bob share an EPR pair, and Alice measures her part of the state in some choice of basis to obtain the random string
Protocol 3 -- Purified BB-84
- Fix a large integer
and let - Alice prepares
EPR pairs and sends the second qubit to Bob respectively. - Alice chooses a string
uniformly at random. She then measures the first qubit of the th EPR pair in the or basis depending on to obtain a random string . - Bob chooses a string
uniformly at random, and measures the second qubit of the th EPR pair in the basis corresponding to . This yields a string . - Bob tells Alice over the CAC that he has measured all the qubits.
- Alice and Bob exchange their basis strings
over the CAC. - Alice and Bob discard all bits
of and respectively where , yielding strings and - Alice and Bob check for eavesdroppers:
a. Alice picks a random subsetand tells Bob over the CAC.
b. Alice and Bob exchangeand over the CAC. They compute the error rate , where .
c. Ifis too large, Alice and Bob abort the protocol. - Alice and Bob perform privacy amplification on the remaining bits.
Note that the use of entangled states is equivalent to the original approach. Moreover, the weakened requirements on the error rate make Protocol 3 generally less secure than Protocol 2. If we can prove security for this modified protocol, then the original protocol must also be secure.
Next, we significantly increase the power of an eavesdropper. We assume that it is Eve who initially prepares a state
If
Any possible attack (excluding side-channel attacks) can be modeled as Eve simply distributing a specific
We will show that despite this additional power given to Eve, the protocol is still secure, assuming
To show that Protocol 3 is secure, it suffices to show that it is able to detect whether
- After receiving
from Eve, Alice and Bob jointly measure their qubit pairs using the POVM . If for some more than of the pairs are found not to be in state , Alice and Bob abort the protocol.
Such a step would also make step 7 of Protocol 3 redundant. Of course this hypothetical step 0 is impossible to implement, because Alice and Bob can only perform local measurements on their respective systems. We argue that step 7 is essentially equivalent to step 0.
Lemma 1. Let
be a tripartite state, where and are systems of a single qubit. Then the probability that respective measurements of systems and in the computational basis result in matching outcomes is exactly , where
Similarly, the probability that the outcomes match when measuring in the Hadamard basis is , where
*Proof.*
The probability of matching measurement outcomes in the computational basis is given by $$ P_{\text{match}} = \braket{00 | \rho_{AB} | 00} + \braket{11 | \rho_{AB} | 11} = \operatorname{Tr} ((\ket{00}\bra{00} + \ket{11}\bra{11})\rho_{AB}) $$ and we have $$ \ket{\Psi^+}\bra{\Psi^+} + \ket{\Psi^-}\bra{\Psi^-} $$ $$ = \frac{1}{2}(\ket{00}\bra{00} + \ket{00}\bra{11} + \ket{11}\bra{00} + \ket{11}\bra{11} + \ket{00}\bra{00} - \ket{00}\bra{11} - \ket{11}\bra{00} + \ket{11}\bra{11}) $$ $$ = \ket{00}\bra{00} + \ket{11}\bra{11}. $$ Completely analogous, in the Hadamard basis we have $$ P_{\text{match}} = \operatorname{Tr}((\ket{++}\bra{++} + \ket{--}\bra{--})\rho_{AB}) $$ and $$ \ket{\Psi^+}\bra{\Psi^+} + \ket{\Phi^+}\bra{\Phi^+} = \ket{++}\bra{++} + \ket{--}\bra{--}. $$
Now consider an arbitrary
The probability that the POVM in step 0 measures
In other words
However, this does not yet prove that step 0 and step 7 are essentially equivalent. This is because step 7 only tests a subset
Lemma 2 (Tomamichel & Leverrier). Let
and consider binary random variables . Let be a uniformly random subset of of size . Then for any , it holds that
We will let
which vanishes as
It follows that step 7 implies that the error rate on the whole qubit string is sufficiently low, which by our previous observations implies that the overlap of
Information Reconciliation
Until now, we assumed that all communication is error-free. Of course this is not the case, in particular not in the quantum case. Do our protocols break in the presence of errors?
The answer is no, because we can perform error correction. In fact, since we distribute classical bitstrings, we may view the quantum protocol as a lossy classical channel and simply do classical error correction afterwards. There are many performant classical error correction codes.
The general idea is that Alice sends a message
Definition. An information reconciliation protocol for
, lets Bob recover an estimate of given .
- It is
-correct if . - It leaks
bits if the total length of the messages exchanged over the channel is .
In the context of key distribution it is important to limit the number of bits a protocol leaks. This is because any leaked bits reduce the min-entropy of the key. Concretely, we have
so if we leak
An important class of information reconciliation protocols are built on linear codes.
Definition. An
-ary linear code is a dimensional subspace of .
A linear code
Protocol 4 -- Information Reconciliation through Linear Codes.
Let
be a parity-check matrix. Assume Alice has sent a string that Bob received as .
- Alice sends
over the public channel. - Bob computes
and the syndrome of . - Based on the syndrome
and the parity-check matrix , Bob determines an estimate of . - Bob computes
.
If
The correctness completely depends on the chosen code.
Example.
Consider the
binary linear code given by the parity-check matrix
where Bob's error-estimation is based on the following table.
+----------+--------------+
| Syndrome |Error Estimate|
+----------+--------------+
|00 |000 |
+----------+--------------+
|01 |001 |
+----------+--------------+
|10 |100 |
+----------+--------------+
|11 |010 |
+----------+--------------+Then Bob can correct any error of at most one bit-flip. Consequently, the code leaks
bits and is -correct for
where is the probability of a single bit-flip occurring (assuming uncorrelated errors).
There is a theoretical minimum to the number of bits leaked for optimal information reconciliation. Suppose
The efficiency of information reconciliation protocols is usually given in terms of a constant
bits.
Examples of codes that are widely in use are LDPC codes, for which