You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 00-main.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -297,7 +297,7 @@ \section*{Preface}
297
297
298
298
%$ $
299
299
300
-
This book is available both as an \href{https://arxiv.org/abs/2503.05136}{\textbf{arXiv PDF}} and on an \href{https://fhetextbook.github.io} {\textbf{auto-generated website}} (powered by \href{https://www.kodymirus.cz/overleaf-html-sample/main.html}{make4ht}). We provide a Python demo FHE library (TFHE, BFV, BGV, CKKS) for educational purposes, which is available at \href{https://github.com/fhetextbook/fhe-textbook}{\texttt{https://github.com/fhetextbook/fhe-textbook}}.
300
+
This book is available both as an \href{https://arxiv.org/abs/2503.05136}{\textbf{arXiv PDF}} and on an \href{https://fhetextbook.github.io} {\textbf{auto-generated dynamic website}} (powered by \href{https://www.kodymirus.cz/overleaf-html-sample/main.html}{make4ht}). We provide a Python Demo FHE library (TFHE, BFV, BGV, CKKS) for educational purposes, which is available at \href{https://github.com/fhetextbook/fhe-textbook}{\texttt{https://github.com/fhetextbook/fhe-textbook}}.
301
301
Please report any errors regarding the book draft on the \href{https://github.com/fhetextbook/fhe-textbook/issues}{\textbf{Issues Board}}.
- Please post any bugs or errors regarding the draft to the Issues board or create a pull request.
6
8
7
-
## Python Demo FHE Library Quickstart
9
+
## Python FHE Demo Library Quickstart
8
10
9
11
We implemented this library for educational purposes. Because it is written in pure Python and does not use an RNS-optimized backend, computations are relatively slow. For this reason, the default parameters are intentionally small—for example, the ring dimension / polynomial modulus degree ($N$) and ciphertext modulus ($Q$) are set to small values (e.g., $N=4$, $Q = 2^{30}$).
Copy file name to clipboardExpand all lines: c03-glwe-mult-plain.tex
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -102,13 +102,11 @@ \subsection{Gadget Decomposition for Noise Suppression}
102
102
103
103
$= \textsf{GLWE}_{S, \sigma}\left(\left(\Lambda_1\cdot\dfrac{q}{\beta} + \Lambda_2\cdot\dfrac{q}{\beta^2} + \cdots + \Lambda_l\cdot\dfrac{q}{\beta^l}\right)\cdot\Delta M + E_{\textit{all}} \right)$\textcolor{red}{ $\rhd$ where $E_{\textit{all}} = \sum\limits_{i=1}^l \Lambda_iE_i$}
104
104
105
-
$= \textsf{GLWE}_{S, \sigma}\left(\Lambda\cdot\Delta M + E_{\textit{all}}\right)$
106
-
107
-
$= \Lambda\cdot\textsf{GLWE}_{S, \sigma}( \Delta M + E_{\textit{all}})$
105
+
$= \textsf{GLWE}_{S, \sigma}\left(\Lambda\cdot\Delta M + E_{\textit{all}}\right)$\textcolor{red}{ $\rhd$ whose decryption is $\Lambda\cdot M$}
108
106
109
107
$$
110
108
111
-
While the computation results are the same, as we decompose $\Lambda$ into smaller plaintext polynomials $\Lambda_1, \Lambda_2, \cdots, \Lambda_l$, the noise generated by each of $l$ plaintext-to-ciphertext multiplications becomes smaller. Given the noise of each GLWE ciphertext in the GLev ciphertext is $E_i$, the final noise of the ciphertext-to-plaintext multiplication is $E_{\textit{all}} = \sum\limits_{i=1}^{l}\Lambda_i\cdot E_i$, which is much smaller than $\Lambda\cdot E$, because
109
+
While the decrypted results are the same, as we decompose $\Lambda$ into smaller plaintext polynomials $\Lambda_1, \Lambda_2, \cdots, \Lambda_l$, the noise generated by each of $l$ plaintext-to-ciphertext multiplications becomes smaller. Given the noise of each GLWE ciphertext in the GLev ciphertext is $E_i$, the final noise of the ciphertext-to-plaintext multiplication is $E_{\textit{all}} = \sum\limits_{i=1}^{l}\Lambda_i\cdot E_i$, which is much smaller than $\Lambda\cdot E$, because
112
110
the coefficients of each decomposed polynomial $\Lambda_i$ are significantly smaller than those of $\Lambda$ (i.e.,
113
111
$\|\Lambda_i\|_\infty\le\beta/2$, whereas $\|\Lambda\|_\infty$ can be as large as $q/2$). This is visually depicted in~\autoref{fig:decomp2}.
114
112
@@ -119,6 +117,7 @@ \subsection{Gadget Decomposition for Noise Suppression}
119
117
\label{fig:decomp2}
120
118
\end{figure}
121
119
122
-
However, we cannot use this decomposition technique to the resulting ciphertext again, because the output of this algorithm is a GLWE ciphertext and converting it into a GLev ciphertext without decrypting it costs much noise and computation time (as we need to multiply the GLWE ciphertext by $\dfrac{q}{\beta}, \dfrac{q}{\beta^2}, \cdots, \dfrac{q}{\beta^l})$.
123
120
124
-
As a more efficient technique to re-initialize the noise $E$, we will describe TFHE's noise bootstrapping technique in \autoref{subsec:tfhe-noise-bootstrapping}.
121
+
122
+
123
+
Meanwhile, for the technique to repeatedly re-initialize the noise $E$ of regular ciphertexts, we will describe TFHE's noise bootstrapping technique in \autoref{subsec:tfhe-noise-bootstrapping}.
We provide our Python demo FHE library (TFHE, BFV, CKKS, BGV) for educational purposes. The source code and the manual are available at \href{https://github.com/fhetextbook/fhe-textbook}{\texttt{https://github.com/fhetextbook/fhe-textbook}}.
1
+
We provide our Python Demo FHE library (TFHE, BFV, CKKS, BGV) for educational purposes. The source code and the manual are available at \href{https://github.com/fhetextbook/fhe-textbook}{\texttt{https://github.com/fhetextbook/fhe-textbook}}.
0 commit comments