# Device-Independent Quantum Key Distribution

This example protocol implements the task of Quantum Key Distribution (QKD) without relying on any particular description of the underlying hardware system. The protocol enables two parties to establish a classical secret key by distributing an entangled quantum state and checking for the violation of a Bell inequality in order to certify the security. The output of the protocol is a classical secret key which is completely unknown to any third party, namely an eavesdropper.

## Assumptions

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

## Outline

A DIQKD protocol is composed by the following steps:

• The first phase of the protocol is called distribution. For each round of this phase:
• Alice uses the source to prepare a maximally entangled state and send half of the state to Bob.
• Upon receiving the state, Bob announces that he received it, and they both use their respective devices to measure the quantum systems. They record their output in a string of bits.
• The second phase is when Alice and Bob publicly exchange classical information in order to perform error correction, where they correct their strings generating the raw keys, and parameter estimation, where they estimate the parameters of interest. At the end of this phase Alice and Bob are supposed to share the same $n$ -bit string and have an estimate of how much knowledge an eavesdropper might have about their raw key.
• In the final phase, Alice and Bob perform privacy amplification, where the not fully secure $n$ -bit strings are mapped into smaller strings $K_{A}$ and $K_{B}$ , which represents the final keys of Alice and Bob respectively.

## Requirements

• Network Stage: Entanglement Distribution
• Relevant Network Parameters: transmission error $\epsilon _{T}$ , measurement error $\epsilon _{M}$ (see Entanglement Distribution).
• Benchmark values:
• Minimum number of rounds ranging from ${\mathcal {O}}(10^{6})$ to ${\mathcal {O}}(10^{12})$ depending on the network parameters$\epsilon _{T},\epsilon _{M}$ , for commonly used security parameters.
• $QBER\leq 0.071$ , taking a depolarizing model as benchmark. Parameters satisfying $\epsilon _{T}+\epsilon _{M}\leq 0.071$ are sufficient to asymptotically get positive secret key rate.
• Distribution of Bell pairs, and measurement in three different bases (two basis on Alice's side and three basis on Bob's side).
• Requires random number generator.

## Notation

• $n$ expected number of rounds
• The total number of rounds $n$ is divided in to $m$ blocks of size upper-bounded by $s_{\max }$ .
• $l$ final key length
• $\gamma$ fraction of test rounds
• $Q$ quantum bit error rate
• $\beta$ CHSH violation
• $\omega _{exp}$ expected winning probability on the CHSH game in an honest implementation
• $\delta _{est}$ width of the statistical interval for the Bell test
• $\delta _{con}$ confidence interval for the Bell test
• $\epsilon _{s}$ smoothing parameter
• $\epsilon _{EC},\epsilon '_{EC}$ error probabilities of the error correction protocol
• $\epsilon _{EA}$ error probability of Bell violation estimation.
• $\epsilon _{con}$ error probability of Bell violation estimation.
• $\epsilon _{PA}$ error probability of the privacy amplification protocol
• ${\mbox{leak}}_{EC}$ leakage in the error correction protocol
• For any registers $(Z_{i})_{i\in \mathbb {N} }$ , we use $Z_{j}^{k},\ (j\leq k)$ as a shorthand notation for the string $Z_{j},\ldots ,Z_{k}$ .

## Properties

Either the protocol (see Pseudocode) aborts with probability higher than $1-(\epsilon _{EA}+\epsilon _{EC})$ , or it generates a
$(2\epsilon _{EC}+\epsilon _{PA}+\epsilon _{s})$ -correct-and-secret key of length 
{\begin{aligned}l\geq {\frac {n}{\bar {s}}}\eta _{opt}-{\frac {n}{\bar {s}}}h(\omega _{exp}-\delta _{est})-{\sqrt {\frac {n}{\bar {s}}}}\nu _{1}-{\mbox{leak}}_{EC}-3\log {\Bigg (}1-{\sqrt {1-{\Bigg (}{\frac {\epsilon _{s}}{4(\epsilon _{EA}+\epsilon _{EC})}}{\Bigg )}^{2}}}{\Bigg )}+2\log {\Bigg (}{\frac {1}{2\epsilon _{PA}}}{\Bigg )},\end{aligned}} where ${\mbox{leak}}_{EC}$ is the leakage due to error correction step and the functions ${\bar {s}}$ , $\eta _{opt}$ , $\nu _{1}$ and $\nu _{2}$ are specified below. The security parameters of the error correction protocol, $\epsilon _{EC}$ and $\epsilon '_{EC}$ , mean that if the error correction step of the protocol (see below) does not abort, then $K_{A}=K_{B}$ with probability at least $1-\epsilon _{EC}$ , and for an honest implementation, the error correction protocol aborts with probability at most $\epsilon '_{EC}+\epsilon _{EC}$ .

• ${\bar {s}}={\frac {1-(1-\gamma )^{\left\lceil {\frac {1}{\gamma }}\right\rceil }}{\gamma }}$ • $\eta _{opt}=\max _{{\frac {3}{4}}<{\frac {{p}_{t}(1)}{1-(1-\gamma )^{s_{max}}}}<{\frac {2+{\sqrt {2}}}{4}}}{\Bigg (}F_{\min }({\vec {p}},{\vec {p}}_{t})-{\frac {1}{\sqrt {m}}}\nu _{2}{\Bigg )}$ • $F_{\min }({\vec {p}},{\vec {p}}_{t})={\frac {d}{d{p}(1)}}g({\vec {p}}){\Big |}_{{\vec {p}}_{t}}\cdot {p}(1)+{\Bigg (}g({\vec {p}}_{t})-{\frac {d}{d{p}(1)}}g({\vec {p}})|_{{\vec {p}}_{t}}\cdot {p}_{t}(1){\Bigg )}$ • $g({\vec {p}})={s}{\Bigg (}1-h{\Bigg (}{\frac {1}{2}}+{\frac {1}{2}}{\sqrt {16{\frac {{p}(1)}{1-(1-\gamma )^{s_{max}}}}{\Bigg (}{\frac {{p}(1)}{1-(1-\gamma )^{s_{max}}}}-1{\Bigg )}+3}}{\Bigg )}{\Bigg )}$ • $\nu _{2}=2{\Bigg (}\log(1+6\cdot 2^{s_{\max }}})+\left\lceil {\frac {d}{d{p}(1)}}g({\vec {p}}){\big |}_{{\vec {p}}_{t}}\right\rceil {\Bigg )}{\sqrt {1-2\log \epsilon _{s}}$ • $\nu _{1}=2{\Big (}\log 7+\left\lceil {\frac {|h'(\omega _{exp}+\delta _{est})|}{1-(1-\gamma )^{s_{\max }}}}\right\rceil {\Big )}{\sqrt {1-2\log \epsilon _{s}}}$ ## Protocol Description

• Input: $n,\delta$ • Output: $K_{A},K_{B}$ 1. Distribution and measurement

1. For every block $j\in [m]$ 1. Set $i=0$ and $C_{j}=\bot$ .
2. While $i\leq s_{max}$ 1. Set $i=i+1$ 2. Alice and Bob choose a random bit $T_{i}\in \{0,1\}$ such that $P(T_{i}=1)=\gamma$ .
3. If $T_{i}=0$ then Alice and Bob choose inputs $(X_{i},Y_{i})=(0,2)$ .
4. Else they choose $X_{i},Y_{i}\in \{0,1\}$ .
5. Alice and Bob use their devices with the respective inputs and record their outputs, $A_{i}$ and $B_{i}$ respectively.
6. If $T_{i}=1$ they set $i=s_{max}+1$ .

At this point Alice holds strings $X_{1}^{n},A_{1}^{n}$ and Bob $Y_{1}^{n},B_{1}^{n}$ , all of length $n$ .

2. Error Correction

Alice and Bob apply the error correction protocol $EC$ (see ) , communicating script $O_{EC}$ in the process.

1. If $EC$ aborts, they abort the protocol
2. Else they obtain raw keys ${\tilde {A}}_{1}^{n}$ and ${\tilde {B}}_{1}^{n}$ .

3. Parameter estimation

1. Using $B_{1}^{n}$ and ${\tilde {B}}_{1}^{n}$ , Bob sets $C_{i}$ 1. If $T_{i}=1$ and $A_{i}\oplus B_{i}=X_{i}\cdot Y_{i}$ then $C_{i}=1$ 2. If $T_{i}=1$ and $A_{i}\oplus B_{i}\neq X_{i}\cdot Y_{i}$ then $C_{i}=0$ 3. If $T_{i}=0$ then $C_{i}=\bot$ 2. Bob aborts If $\sum _{j}C_{j} , i.e., if they do not achieve the expected violation.

For the summation in 3.2 we use the convention that $\forall x\in \{0,1,\bot \},\ x+\bot =\bot +x=x$ , that is $\bot$ acts as $0$ with respect to the addition.

4. Privacy amplification

$PA(\cdot ,\cdot )$ is a privacy amplification subroutine (see )

1. Alice and Bob run $PA(A_{1}^{n'},{\tilde {B}}_{1}^{n'})$ and obtain secret keys $K_{A},K_{B}$ ;

## Further Information

1. Acín et al. (2007) gives the first security proof of device-independent QKD against collective attacks.
2. Vazirani and Vidick (2014) gives the first security proof of device-independent QKD against coherent attacks.
3. Arnon-Friedman et al. (2018) & Arnon-Friedman et al. (2019) simplify and tighten security proofs of device-independent QKD against coherent attacks.
4. Tan et al. (2019) shows that post-processing of the key using 2-way classical communication, denoted advantage distillation, can increase the QBER tolerance up to $9.1\%$ .
5. Secret-Key Reconciliation by Public Discussion
6. Security of Quantum Key Distribution
7. Towards a realization of device-independent quantum key distribution
contributed by Gláucia Murta