BB84 Quantum Key Distribution

Introduction


Thisย example protocol[1] implements the task of Quantum Key Distributionย (QKD). The protocol enables two parties to establish a classical secret key by preparing and measuring qubits. The output of the protocol is a classical secret key which is completely unknown to any third party, namely an eavesdropper.

Outline


The protocol shares a classical key between two parties, Alice and Bob. The BB84 quantum key distribution protocol consists of the following steps:

  • Distribution:ย This step involves preparation, exchange and measurement of quantum states. For each round of the distribution phase, Alice randomly chooses a basis (a pair of orthogonal states) out of two available bases (X and Z). She then randomly chooses one of the two states and prepares the corresponding quantum state in the chosen basis. She sends the prepared state to Bob. Upon receiving the state, Bob announces that he received the state and randomly chooses to measure in the either of the two available bases (X or Z). The outcomes of the measurements give Bob a string of classical bits. The two parties repeat the above procedure $n$ times so that at the end of the distribution phase each of them holds an $n$-bit string.
  • Sifting:ย Alice and Bob publicly announce their choices of basis and compare them. They discard the rounds in which Bob measured in a different basis than the one prepared by Alice.
  • Parameter estimation:ย Alice and Bob use a fraction of the remaining rounds (in which both measured in the same basis) in order to estimate the quantum bit error rate (QBER).
  • Error correction:ย Alice and Bob choose a classical error correcting code and publicly communicate in order to correct their string of bits. At the end of this phase Alice and Bob hold the same bit-string.
  • Privacy amplification:ย Alice and Bob use an extractor on the previously established string to generate a smaller but completely secret string of bits, which is the final key.

Assumptions


  • Network:ย we assume the existence of an authenticated public classical channel between Alice and Bob.
  • Timing:ย we assume that the network is synchronous.
  • Adversarial model:ย coherent attacks

Requirements


  • Relevant Network Parameters: transmission error $\\\epsilon_T$, measurement error $\\\epsilon_M$
  • Benchmark values:
    • Minimum number of rounds ranging from $\\\mathcal{O}(10^2)$ to $\\\mathcal{O}(10^5)$ depending on the network parameters $\\\epsilon_T,\\\epsilon_M$, for commonly used security parameters.
    • $QBER \\\leq 0.11$, taking a depolarizing model as benchmark. Parameters satisfying $ \\\epsilon_T+\\\epsilon_M\\\leq 0.11$ are sufficient to asymptotically get positive secret key rate.
  • requires random number generator.

Notation


  • $n$ number of total rounds of the protocol.
  • $\\\ell$ size of the secret key.
  • $X_i, Y_i$ bits of input of Alice and Bob, respectively, that define the measurement basis.
  • $A_i,B_i$ bits of output of Alice and Bob, respectively.
  • $Z_1^n$ is a shorthand notation for the string $Z_1,\\\ldots, Z_n$.
  • $K_A,K_B$ final key of Alice and Bob, respectively.
  • $Q_X$ is the quantum bit error rate QBER in the $X$ basis.
  • $Q_Z$ is the quantum bit error rate QBER in the $Z$ basis estimated prior to the protocol.
  • $H$ is the Hadamard gate. $H^{0} = I, H^{1} = H$.
  • $\\\gamma$ is the probability that Alice (Bob) prepares (measures) a qubit in the $X$ basis.
  • $\\\epsilon_{\\\rm EC}$, $\\\epsilonโ€™_{\\\rm EC}$ are the error probabilities of the error correction protocol.
  • $\\\epsilon_{\\\rm PA}$ is the error probability of the privacy amplification protocol.
  • $\\\epsilon_{\\\rm PE}$ is the error probability of the parameter estimation.

Properties


The protocol implements $(n,\\\epsilon_{\\\rm corr},\\\epsilon_{\\\rm sec},\\\ell)$-QKD, which means that it generates an $\\\epsilon_{\\\rm corr}$-correct $\\\epsilon_{\\\rm sec}$-secret key of length $\\\ell$ in $n$ rounds. The security parameters of this protocol are given by $\\\epsilon_{\\\rm corr}=\\\epsilon_{\\\rm EC},\\\epsilon_{\\\rm sec}= \\\epsilon_{\\\rm PA}+\\\epsilon_{\\\rm PE},$ and the amount of key $\\\ell$ that is generated is given by
${\\\rm EC}^2 \\\& -\\\log(\\\frac{8}{{\\\epsilonโ€™}{\\\rm EC}^2}+\\\frac{2}{2-\\\epsilon\'{\\\rm EC}})-\\\log (\\\frac{1}{\\\epsilon{\\\rm EC}})- 2\\\log(\\\frac{1}{2\\\epsilon_{\\\rm PA}}) $
where $\\\nu = \\\sqrt{ \\\frac{(1+\\\gamma^2n)((1-\\\gamma)^2+\\\gamma^2)}{(1-\\\gamma)^2\\\gamma^4n^2}\\\log(\\\frac{1}{\\\epsilon_{\\\rm PE}}})$ and $h(\\\cdot)$ is the binary entropy function.

In the above equation for key length, the parametersย ฯตEC$and$ฯตECโ€ฒฯตECโ€‹$and$ฯตECโ€ฒโ€‹ย are error probabilities of the classical error correction subroutine. At the end of the error correction step, if the protocol does not abort, then Alice and Bob share equal strings of bits with probability at least $1-\\\epsilon_{\\\rm EC}$. The parameterย ฯตECโ€ฒฯตECโ€ฒโ€‹ย is related with the completeness of the error correction subroutine, namely that for an honest implementation, the error correction protocol aborts with probability at mostย ฯตECโ€ฒ+ฯตECฯตECโ€ฒโ€‹+ฯตECโ€‹. The parameter $\\\epsilon_{\\\rm PA}$ is the error probability of the privacy amplification subroutine andย ฯตPEฯตPEโ€‹ย is the error probability of the parameter estimation subroutine used to estimate $Q_X$ (see Quantum Key Distribution for the precise security definition).

Technical Description


  • Input:$n, \\\gamma, \\\epsilon_{\\\rm PA},\\\epsilon_{\\\rm PE},\\\epsilon_{\\\rm EC},\\\epsilonโ€™_{\\\rm EC},Q_Z$
  • Output:$K_A, K_B$ย 1.ย Distribution and measurement
  1. For $i=1,โ€ฆ,n$
    1. Alice chooses random bits $X_i\\\in{0,1}$ and $A_i\\\in_R{0,1}$ such that $P(X_i=1)=\\\gamma$
    2. Alice prepares $H^{X_i}|A_i\\\rangle$ and sends it to Bob
    3. Bob announces receiving a state
    4. Bob chooses bit $Y_i\\\in_R{0,1}$ such that $P(Y_i=1)=\\\gamma$
    5. Bob measures $H^{X_i}|A_i\\\rangle$ in basis ${H^{Y_i}|0\\\rangle, H^{Y_i}|1\\\rangle}$ with outcome $B_i$ โ€At this stage Alice holds strings $X_1^n, A_1^n$ and Bob $Y_1^n, B_1^n$, all of length $n$.โ€

2.ย Sifting

  1. Alice and Bob publicly announce $X_1^n, Y_1^n$
  2. For $i=1,โ€ฆ,n$
    1. If $X_i=Y_i$
    • $A_1^{nโ€™} = A_1^{nโ€™}.$append$(A_i)$
    • $B_1^{nโ€™} = B_1^{nโ€™}.$append$(B_i)$
    • $X_1^{nโ€™} = X_1^{nโ€™}.$append$(X_i)$
    • $Y_1^{nโ€™} = Y_1^{nโ€™}.$append$(Y_i)$ โ€Now Alice holds strings $X_1^{nโ€™}, A_1^{nโ€™}$ and Bob $Y_1^{nโ€™}, B_1^{nโ€™}$, all of length $nโ€™\\\leq n$.โ€

3.ย Parameter estimation

  1. Set size$Q$ = 0
  2. For $i=1,โ€ฆ,nโ€™$
    1. If $X_i = Y_i = 1$
    • Alice and Bob publicly announce $A_i, B_i$
    • Alice and Bob compute $Q_i = 1 โ€“ \\\delta_{A_iB_i}$, where $\\\delta_{A_iB_i}$ is the Kronecker delta
    1. size$Q$ += 1;
  3. Both Alice and Bob, each, compute $Q_X = \\\frac{1}{\\\text{size}Q} \\\sum_{i=1}^{nโ€™}Q_i$
    4.ย Error correction

$C(\\\cdot,\\\cdot)$ is an error correction subroutine (see [ [9]]) determined by the previously estimated value of $Q_Z$ and with error parameters $\\\epsilon\’{\\\rm EC}$ and $\\\epsilon{\\\rm EC}$

  1. Both Alice and Bob run $C(A_1^{nโ€™},B_1^{nโ€™})$.
  2. Bob obtains $\\\tilde{B}_1^{nโ€™}$ย 5.ย Privacy amplification

$PA(\\\cdot,\\\cdot)$ is a privacy amplification subroutine (see [ [10]]) determined by the size $\\\ell$, computed from equation for key length $\\\ell$ (see Quantum Key Distribution 1. Properties|Properties), and with secrecy parameter $\\\epsilon_{\\\rm PA}$

  1. Alice and Bob run $PA(A_1^{nโ€™},\\\tilde{B}_1^{nโ€™})$ and obtain secret keys $K_A, K_B$;

Experimental Implementations


A simulation code for benchmarking the QKD protocol is availableย here. Hardware parameter analysis can be found in the followingย preprint.

Related Codes


Description Link
imulation code for benchmarking the QKD protocol Link

Further Information


  1. BB(1984) introduces the BB84 protocol, as the name says, by Charles Bennett and Gilles Brassard.
  2. TL(2017) The derivation of the key length in BB84 Quantum Key Distribution#Properties|Properties, combines the techniques developed in this article and minimum leakage error correcting codes.
  3. GL03 gives an extended analysis of the BB84 in the finite regime.
  4. Sifting: the BB84 protocol can also be described in a symmetric way. This means that the inputs $0$ and $1$ are chosen with the same probability. In that case only $1/2$ of the generated bits are discarded during the sifting process. Indeed, in the symmetric protocol, Alice and Bob measure in the same basis in about half of the rounds.
  5. LCA05 the asymmetric protocol was introduced to make this more efficient protocol presented in this article.
  6. A post-processing of the key using 2-way classical communication, denoted Advantage distillation, can increase the QBER tolerance up to $18.9%$ (3).
  7. We remark that in BB84 Quantum Key Distribution Pseudo Code, the QBER in the $Z$ basis is not estimated during the protocol. Instead Alice and Bob make use of a previous estimate for the value of $Q_Z$ and the error correction step, Step 4 in the pseudo-code, will make sure that this estimation is correct. Indeed, if the real QBER is higher than the estimated value $Q_Z$, BB84 Quantum Key Distribution will abort in the Step 4 with very high probability.
  8. The BB84 can be equivalently implemented by distributing EPR pairs and Alice and Bob making measurements in the $Z$ and $X$ basis, however this required a entanglement distribution network stage.
  9. Secret-Key Reconciliation by Public Discussion
  10. Security of Quantum Key Distribution

References


  1. Bennett, Charles H., and Gilles Brassard. โ€˜Quantum Cryptography: Public Key Distribution and Coin Tossingโ€™. Theoretical Computer Science 560 (December 2014): 7โ€“11.ย https://doi.org/10.1016/j.tcs.2014.05.025.
  2. Tomamichel, Marco, and Anthony Leverrier. โ€˜A Largely Self-Contained and Complete Security Proof for Quantum Key Distributionโ€™. Quantum 1 (July 2017): 14.ย https://doi.org/10.22331/q-2017-07-14-14.
  3. Gottesman, Daniel, and Hoi-Kwong Lo. โ€˜Proof of Security of Quantum Key Distribution with Two-Way Classical Communicationsโ€™.ย ย  2002. https://dl.acm.org/doi/10.1109/TIT.2002.807289.
  4. Lo, Hoi-Kwong, H. F. Chau, and M. Ardehali. โ€˜Efficient Quantum Key Distribution Scheme and a Proof of Its Unconditional Securityโ€™. J. Cryptol. 18, no. 2 (April 2005): 133โ€“65.ย https://doi.org/10.1007/s00145-004-0142-y.
  5. Brassard, Gilles, and Louis Salvail. โ€˜Secret-Key Reconciliation by Public Discussionโ€™. In Advances in Cryptology โ€” EUROCRYPT โ€™93, edited by Tor Helleseth, 410โ€“23. Berlin, Heidelberg: Springer Berlin Heidelberg, 1994.
  6. Metger, T., Renner, R. Security of quantum key distribution from generalised entropy accumulation. Nat Commun 14, 5272 (2023). https://doi.org/10.1038/s41467-023-40920-8

Leave a Reply

Your email address will not be published. Required fields are marked *