add elliptic curve parameters (wip)
bellesmarta belles.mm@gmail.com
Fri, 09 May 2025 16:02:30 +0200
4 files changed,
69 insertions(+),
32 deletions(-)
M
v2/bibliography/bibtex.bib
→
v2/bibliography/bibtex.bib
@@ -332,4 +332,43 @@ volume = {2045},
isbn = {978-3-540-42070-5}, journal = {Lecture Notes in Computer Science}, doi = {10.1007/3-540-44987-6_10} -}+} + +%BLS12-377 +@inproceedings{bowe20zexe, + author = {Sean Bowe and Alessandro Chiesa and Matthew Green and Ian Miers and Pratyush Mishra and Howard Wu}, + title = {{ZEXE:} Enabling Decentralized Private Computation}, + booktitle = {2020 {IEEE} Symposium on Security and Privacy, {SP} 2020, San Francisco, CA, USA, May 18-21, 2020}, + pages = {947--964}, + publisher = {{IEEE}}, + year = {2020}, + url = {https://doi.org/10.1109/SP40000.2020.00050}, + doi = {10.1109/SP40000.2020.00050}, + timestamp = {Mon, 03 Mar 2025 21:22:33 +0100}, + biburl = {https://dblp.org/rec/conf/sp/BoweC0MMW20.bib}, + bibsource = {dblp computer science bibliography, https://dblp.org} +} + +%BW6-761 +@InProceedings{elhousni20optimized, + author="El Housni, Youssef and Guillevic, Aurore", + editor="Krenn, Stephan + and Shulman, Haya + and Vaudenay, Serge", + title="Optimized and Secure Pairing-Friendly Elliptic Curves Suitable for One Layer Proof Composition", + booktitle="Cryptology and Network Security", + year="2020", + publisher="Springer International Publishing", + address="Cham", + pages="259--279", + isbn="978-3-030-65411-5" +} + +%BN254 +@misc{jancar20bn256, + author = {Jancar, Jan}, + title = {Standard curve database: {BN254}}, + url = {https://neuromancer.sk/std/bn/bn254}, + year = 2020 +} +
M
v2/build/preamble-macros.tex
→
v2/build/preamble-macros.tex
@@ -109,8 +109,8 @@ \newcommand{\usedSequencers}{\vocstyle{usedSequencers}}
\newcommand{\votes}{\vocstyle{votes}} \newcommand{\voteRewrites}{\vocstyle{voteRewrites}} - - +% misc +\newcommand{\davinci}{DAVINCI\xspace} % draft watermark %\ifdraft{\SetWatermarkScale{4}}{\SetWatermarkScale{0}}
M
v2/sections/cryptographic-primitives.tex
→
v2/sections/cryptographic-primitives.tex
@@ -23,40 +23,38 @@
\subsection{Elliptic curves} \label{sec:cryptographic-primitives:elliptic-curves} -\martai{Curves BLS12-377, BW6-761 (Brezing–Weng pairing-friendly outer curve to BLS12-377), and BN256.} +\davinci uses BW6-761 \cite{elhousni20optimized}, BLS12-377 \cite{bowe20zexe}, and BN254 \cite{jancar20bn256} curves. Below, we give the details of these curves. -% https://eprint.iacr.org/2021/1359.pdf -% ElHouseni & Guillevic són els originals de la chain -% https://eprint.iacr.org/2020/351.pdf - -% BLS12-377 curve: a Barreto–Lynn–Scott curve over a 377-bit prime field -% BW6-761 curve: a Brezing–Weng curve of embedding degree 6 over a 761-bit prime field -% Abans crec que en comptes de BW es feia amb la CP, però que BW és més eficient +\paragraph{Parameters.} -Vocdoni uses the BLS12-377, xxx, and xxx elliptic curves. More precisely, let -\[\begin{array}{lll} - & q = ,\\ - \\ - & p = . -\end{array}\] -Note that both are prime numbers, with bit-lengths $xxx$ and $xxx$, respectively. The curve BLS12-377 is the curve over $\mathbb{F}_q$ defined by the equation -\[E: Y^2 = aX^3 + b.\] -We have that $E(\mathbb{F}_q)$ has different subgroups $\G_1, \G_2$ such that $\#\G_1 = \#\G_2 = p$. This curve is pairing-friendly (with embedding degree $k = 12$), so pairings are efficiently computable. More precisely, we make use of the bilinear group -\[\mathbb{B}=\left( p, \G_1, \G_2, \G_T, e: \G_1\times\G_2 \rightarrow \G_T \right).\] +\begin{itemize} + \item[$\bullet$] $p = \tt{0x122e824fb83ce0ad187c94004faff3eb926186a81d14688528275ef8087be41707ba638e584e9190}$ + \item[] \hspace{0.53cm} $\tt{3cebaff25b423048689c8ed12f9fd9071dcd3dc73ebff2e98a116c25667a8f8160cf8aeeaf0a437e69}$ + \item[] \hspace{0.53cm} $\tt{13e6870000082f49d00000000008b}$ (761-bit prime). + \item[$\bullet$] $q = \tt{0x01ae3a4617c510eac63b05c06ca1493b1a22d9f300f5138f1ef3622fba094800170b5d4430000000}$ + \item[] \hspace{0.52cm} $\tt{8508c00000000001}$ (377-bit prime). + \item[$\bullet$] $r = \tt{0x12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001}$ (253-bit prime). + \item[$\bullet$] $s = \tt{0x2523648240000001ba344d80000000086121000000000013a700000000000013}$ (254-bit prime). + \item[$\bullet$] $t = \tt{\hspace{0.04cm}0x2523648240000001ba344d8000000007ff9f800000000010a10000000000000d}$ (254-bit prime). +\end{itemize} -By instantiating the zk-SNARK with the bilinear group $\mathbb{B}$, we are able to prove statements about satisfiability of arithmetic circuits over $\mathbb{F}_p$, the so-called \emph{scalar field} of $E$. +\paragraph{Elliptic curve groups.} +\begin{itemize} + \item BW6-761 curve: $E_1/\F_p$ defined by equation $E_1: y^2 = x^3 - 1$, with subgroups $\G_1, \G_2$ of prime order $q$, and an efficiently computable pairing \(e:\G_1\times\G_2 \rightarrow \G_T,\) where $\G_T \subset \F_{q^{6}}$ and has order $q$ as well. + \item BLS12-377 curve: $E_2/\F_q$ defined by equation \(E_2: y^2 = x^3 + 1,\) with subgroups $\G_1, \G_2$ of prime order $r$, and an efficiently computable pairing \(e:\G_1\times\G_2 \rightarrow \G_T,\) where $\G_T \subset \F_{q^{12}}$ and has order $r$ as well. + \item BN254 curve: $E_3/\F_s$ defined by equation \( E_3: y^2 = x^3 + 3\), where with subgroups $\G_1, \G_2$ of prime order $t$, and an efficiently computable pairing \(e:\G_1\times\G_2 \rightarrow \G_T,\) where $\G_T \subset \F_{q^{12}}$ and has order $t$ as well. +\end{itemize} -Furthermore, we are interested in proving certain operations with the zk-SNARK, like the correct verification of XXX. Note that XXX is an element of a certain elliptic curve $J$, but is represented as two coordinates in the base field $\F_s$ of $J$. Therefore, the verification can be best represented as arithmetic constraints modulo $s$. While it is possible to represent any NP statement using arithmetic modulo $p$ to plug it into the zk-SNARK, this incurs into a significant efficiency loss if not done carefully. The natural thing is to set $s=p$. Therefore, the signature scheme must be instantiated with an elliptic curve over $\mathbb{F}_p$. For this, let -\[d = -\frac{xxx}{xxx} \bmod{p}.\] -Vocdoni uses the XXX curve, defined by the equation -\[J : -X^2+Y^2 = 1 + dX^2Y^2,\] -over $\mathbb{F}_p$. In particular, it uses a subgroup $\mathbb{J}$ of order -\[\begin{array}{lll} - & t = ,\\ -\end{array}\] -which is a $xxx$-bit prime. +\paragraph{Finite fields.} +\begin{itemize} + \item $\F_p$: base field of the BW6-761 curve. + \item $\F_q$: scalar field of $\G_1, \G_2, \G_T$ and base field of the BLS12-377 curve. + \item $\F_r$: scalar field of XXX. + \item $\F_s$: scalar field of XXX. + \item $\F_t$: scalar field of XXX. +\end{itemize} -The primes and groups defined here will be used through the rest of the document. +%The primes and groups defined here will be used through the rest of the document. \subsection{Hash functions} \label{sec:cryptographic-primitives:hash}