|
27 | 27 | "source": [
|
28 | 28 | "## Experimental CV-QKD\n",
|
29 | 29 | "Following the experimental results of the continuous variable protocol outlined in \\cite{jain2022practical}, we give pseudocode replicating the\n",
|
30 |
| - "privacy amplification step of their experiment using our extractor library \\texttt{extlib}. This example can be easily adapted to any explicit QKD protocol. \n", |
| 30 | + "privacy amplification step of their experiment using our extractor library \\texttt{cryptomite}. This example can be easily adapted to any explicit QKD protocol. \n", |
31 | 31 | "In this protocol, the quantum information is encoded into the amplitude and phase quadratures of the optical field. \n",
|
32 | 32 | "Alice encodes random bits, which she generates with a quantum random number generator (QRNG), by modulating the optical signal field to obtain coherent states.\n",
|
33 | 33 | "The QRNG used to generate random bits is based on \\cite{gabriel2010generator}, which consists of homodyne measurements of the vacuum state. \n",
|
|
44 | 44 | "\n",
|
45 | 45 | "The experimental implementation uses the $\\Toeplitz$ extractor for privacy amplification, with a raw key input length \n",
|
46 | 46 | "of $n = 1.738 \\times 10^9$, an output of $m = 41378264$ and therefore, a required seed length of $d = 1.738 \\times 10^9 + 41378263$.\n",
|
47 |
| - "This privacy amplification step can be performed easily using our randomness extractor library \\texttt{extlib} as follows in Fig. \\ref{fig:pa}. \n" |
| 47 | + "This privacy amplification step can be performed easily using our randomness extractor library \\texttt{cryptomite} as follows in Fig. \\ref{fig:pa}. \n" |
48 | 48 | ]
|
49 | 49 | },
|
50 | 50 | {
|
|
54 | 54 | "metadata": {},
|
55 | 55 | "outputs": [],
|
56 | 56 | "source": [
|
57 |
| - "import extlib\n", |
| 57 | + "import cryptomite\n", |
58 | 58 | "def privacy_amplification(seed_bits, raw_key_bits, n = 1.738 * 10**9, m = 41378264):\n",
|
59 | 59 | " \"\"\" Perform privacy amplification for Practical \n",
|
60 | 60 | " CV-QKD with composable security.\n",
|
|
79 | 79 | " \"\"\"\n",
|
80 | 80 | " assert len(seed_bits) == n + m - 1\n",
|
81 | 81 | " assert len(raw_key_bits) == n\n",
|
82 |
| - " toeplitz = extlib.Toeplitz(n, m)\n", |
| 82 | + " toeplitz = cryptomite.Toeplitz(n, m)\n", |
83 | 83 | " return toeplitz.extract(seed_bits, raw_key_bits)"
|
84 | 84 | ]
|
85 | 85 | },
|
|
96 | 96 | "\n",
|
97 | 97 | "Since the QRNG generating the seed bits is device-dependent the quality of the seed relies on the correct characterization and perfect modelling of the device.\n",
|
98 | 98 | "This opens the possibility that the seed bits may only be somewhat random.\n",
|
99 |
| - "In this case, a shared secret key can still be generated, but each user must use the Toeplitz two-source (as opposed to seeded) randomness extractor extension from \\texttt{extlib} and adjust their output length accordingly. \n", |
| 99 | + "In this case, a shared secret key can still be generated, but each user must use the Toeplitz two-source (as opposed to seeded) randomness extractor extension from \\texttt{cryptomite} and adjust their output length accordingly. \n", |
100 | 100 | "Below we show an example of this when considering the QRNG generated seed bits have a min-entropy rate of 0.99 (as opposed to 1 if it had been perfectly random). \n",
|
101 | 101 | "Let $\\boldsymbol{x}, \\boldsymbol{y}$ be the raw key bits and seed bits respectively, then the output length is adjusted to $m' = \\frac{1}{3} (41378264 - 2 (k_1 - n) + 2)$, where $k_1 = 0.99 \\times n$ is the seed min-entropy.\n",
|
102 | 102 | "\n",
|
|
108 | 108 | " \\State $m \\gets 41378264$ \\Comment{original output length}\n",
|
109 | 109 | " \\State $k_1 \\gets 0.99 \\times n$ \\Comment{calculate seed min-entropy} \n",
|
110 | 110 | " \\State $m' \\gets \\frac{1}{3} (41378264 - 2 (k_1 - n) + 2)$ \\Comment{new output length, given by \\eqref{eq:toeplits-q-2-params}}\n",
|
111 |
| - " \\State \\textbf{return} \\texttt{extlib.Toeplitz(n, m).extract($\\bm{x}, \\bm{y}$)}\n", |
| 111 | + " \\State \\textbf{return} \\texttt{cryptomite.Toeplitz(n, m).extract($\\bm{x}, \\bm{y}$)}\n", |
112 | 112 | " \\EndFunction\n",
|
113 | 113 | "\\end{algorithmic}\n",
|
114 | 114 | "\\end{algorithm}\n",
|
|
128 | 128 | " \\State $l \\gets \\max( 1 , \\Bigl\\lceil \\frac{\\log(m-r) - \\log(t-r)}{\\log(r) - log(r-1)} \\Bigr \\rceil)$ \n",
|
129 | 129 | " \\Comment{number of iterations of the weak design}\n",
|
130 | 130 | " \\State $d \\gets (l+1)\\times t^2$ \\Comment{seed length}\n",
|
131 |
| - " \\State \\textbf{return} \\texttt{extlib.Trevisan(n, d, m).extract($\\bm{x}, \\bm{y}$)}\n", |
| 131 | + " \\State \\textbf{return} \\texttt{cryptomite.Trevisan(n, d, m).extract($\\bm{x}, \\bm{y}$)}\n", |
132 | 132 | " \\EndFunction\n",
|
133 | 133 | "\\end{algorithmic}\n",
|
134 | 134 | "\\end{algorithm}"
|
|
0 commit comments