diff --git a/templates/index.html b/templates/index.html index 99d78c8..6f31eba 100644 --- a/templates/index.html +++ b/templates/index.html @@ -181,5 +181,44 @@ + + + diff --git a/whitepaper/Dissertation.pdf b/whitepaper/Dissertation.pdf index fe19471..a91f5a5 100644 Binary files a/whitepaper/Dissertation.pdf and b/whitepaper/Dissertation.pdf differ diff --git a/whitepaper/Dissertation.tex b/whitepaper/Dissertation.tex index ffe0f76..aacf029 100644 --- a/whitepaper/Dissertation.tex +++ b/whitepaper/Dissertation.tex @@ -1,3 +1,5 @@ +% !TeX document-id = {551c9545-e493-4534-9812-732e4f9d41b0} +% !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape] \documentclass[12pt,a4paper]{report} \usepackage{Bath-CS-Dissertation} @@ -5,6 +7,7 @@ \usepackage{amssymb} \usepackage{amsthm} \usepackage{tikz} +\usepackage{minted} \DeclareMathOperator{\lcm}{lcm} \DeclareMathOperator{\id}{id} @@ -546,7 +549,33 @@ The size of the proof of zero communication is, in total, $3290 + 1744 + 2243$ c \subsubsection{Time complexity} -It is generally remarked that Paillier performs considerably slower than RSA on all key sizes. %todo cite +It is remarked that Paillier encryption performs considerably slower than RSA on all key sizes. \cite{paillier1999public} provides a table of theoretic results, suggesting that Paillier encryption can be over 1,000 times slower than RSA for the same key size. + +\cite{paillier1999public} also remarks that the choice of the public parameter $g$ can improve the time complexity. The selection of $g = n + 1$ is optimal in this regard, as binomial theorem allows the modular exponentiation $g^m \mod n^2$ to be reduced to the computation $1 + gm \mod n^2$. + +These results are backed experimentally by my implementation. The following benchmarking code was executed. + +\begin{minted}{javascript} + console.log("Warming up") + + for (let i = 0n; i < 100n; i++) { + keyPair.pubKey.encrypt(i); + } + + console.log("Benching") + + performance.mark("start") + for (let i = 0n; i < 250n; i++) { + keyPair.pubKey.encrypt(i); + } + performance.mark("end") + + console.log(performance.measure("duration", "start", "end").duration) +\end{minted} + +Performing 250 Paillier encrypts required 49,100ms. On the other hand, performing 250 RSA encrypts required 60ms. This is a difference of over 1,000 times. + +Decryption is remarked as being optimisable to constant time through application of Chinese Remainder Theorem. \subsection{Quantum resistance}