arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
add explanation of ec choices + remove commitment section + update hash section + add signature section + updated mt to mermaid drawing + add new bibliography
bellesmarta belles.mm@gmail.com
Thu, 05 Jun 2025 00:48:41 +0200
commit

ed3f56af804899d3f4b6643e15a94bb969323815

parent

7e0d3d031c80321f1a67132c67a501aeee0c5e18

M v2/bibliography/bibtex.bib → v2/bibliography/bibtex.bib

@@ -5,12 +5,64 @@ url = {http://www.bitcoin.org/bitcoin.pdf},

year = 2009 } +@article{wood2014ethereum, + title={Ethereum: A secure decentralised generalised transaction ledger}, + author={Wood, Gavin and others}, + journal={Ethereum project yellow paper}, + volume={151}, + number={2014}, + pages={1--32}, + year={2014} +} + @inproceedings{grassi21poseidon, title={Poseidon: A New Hash Function for Zero-Knowledge Proof Systems}, author={Grassi, Lorenzo and Khovratovich, Dmitry and Rechberger, Christian and Roy, Arnab and Schofnegger, Markus}, booktitle={30th USENIX Security Symposium (USENIX Security 21)}, pages={519--535}, year={2021} +} + +@InProceedings{albrecht16mimc, + author="Albrecht, Martin + and Grassi, Lorenzo + and Rechberger, Christian + and Roy, Arnab + and Tiessen, Tyge", + editor="Cheon, Jung Hee + and Takagi, Tsuyoshi", + title="MiMC: Efficient Encryption and Cryptographic Hashing with Minimal Multiplicative Complexity", + booktitle="Advances in Cryptology -- ASIACRYPT 2016", + year="2016", + publisher="Springer Berlin Heidelberg", + address="Berlin, Heidelberg", + pages="191--219", + isbn="978-3-662-53887-6" +} + +@misc{bertoni11keccak, + author = {Bertoni, Guido and Daemen, Joan and Peeters, Michal and Van Assche, Gilles}, + title = {The {KECCAK SHA-3} submission}, + url = {https://keccak.team/files/Keccak-submission-3.pdf}, + year = 2011 +} + +@article{johnson01ecdsa, + author = {Johnson, Don and Menezes, Alfred and Vanstone, Scott}, + title = {The Elliptic Curve Digital Signature Algorithm ({ECDSA})}, + year = {2001}, + issue_date = {August 2001}, + publisher = {Springer-Verlag}, + address = {Berlin, Heidelberg}, + volume = {1}, + number = {1}, + issn = {1615-5262}, + url = {https://doi.org/10.1007/s102070100002}, + doi = {10.1007/s102070100002}, + journal = {Int. J. Inf. Secur.}, + month = aug, + pages = {36–63}, + numpages = {28} } @article{gabizon2019plonk,
M v2/build/main.tex → v2/build/main.tex

@@ -31,9 +31,9 @@ \end{abstract}

\martai{Change Vocdoni to DAVINCI.} -\martai{We should decide which kind of document we want: an specification (e.g. include technical details such as the sets each element belongs to), a whitepaper (e.g. include the vision and mission), or an academic paper (e.g. include an extensive state of the art section).} - \martai{Mention that the spec can be tailored to the needs of the specific vote. So, here we present some default configuration, but some of the pieces can be changed (specially the cryptographic schemes or curves). For this reason, we tried to make this document modular (like the code), to facilitate the changes and the analysis of the consequences.} + +\martai{Separate the roles of the sequencers from key generators?} \setcounter{tocdepth}{3} \makeatletter
M v2/build/preamble-macros.tex → v2/build/preamble-macros.tex

@@ -119,9 +119,13 @@ \newcommand{\hlget}[1]{\hyperlink{\detokenize{#1}}{#1}}

% Cryptographic primitives \newcommand{\methodstyle}[1]{{\sf{#1}}\xspace} -\newcommand{\Hash}{\methodstyle{Hash}} +\newcommand{\Keccak}{\methodstyle{Hash_1}} +\newcommand{\Poseidon}{\methodstyle{Hash_2}} +\newcommand{\Mimc}{\methodstyle{Hash_3}} \newcommand{\Enc}{\methodstyle{Enc}} \newcommand{\Dec}{\methodstyle{Dec}} +\newcommand{\SSign}{\methodstyle{S.Sign}} +\newcommand{\SVer}{\methodstyle{S.Verify}} \newcommand{\GenerateShares}{\methodstyle{GenerateShares}} \newcommand{\VerifyShare}{\methodstyle{VerifyShare}} \newcommand{\DerivePublicKey}{\methodstyle{DerivePublicKey}}
A v2/figures/mt-state-drawio.drawio

@@ -0,0 +1,718 @@

+<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0" scale="1" border="0" version="27.0.9" pages="2"> + <diagram name="Page-1" id="oUAoi1-TfJVtmyUlhwCi"> + <mxGraphModel dx="1383" dy="1869" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="0" /> + <mxCell id="1" parent="0" /> + <mxCell id="ZugXrchefKqxSvf9OSXH-40" value="" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1"> + <mxGeometry x="20" width="960" height="360" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-1" value="root" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="520" y="20" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-2" value="processID" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="40" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-3" value="censusRoot" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="160" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-4" value="ballotMode" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="280" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-5" value="EPK" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="400" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-7" value="results add" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="520" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-8" value="results sub" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="640" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-9" value="encrypted ballots [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="760" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-10" value="commitments [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="880" y="280" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-11" value="nullifiers [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="760" y="200" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-12" value="addresses [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="880" y="200" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-14" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.129;entryY=0.976;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-2" target="ZugXrchefKqxSvf9OSXH-15"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="70" y="280" as="sourcePoint" /> + <mxPoint x="330" y="240" as="targetPoint" /> + <Array as="points"> + <mxPoint x="80" y="250" /> + <mxPoint x="210" y="250" /> + <mxPoint x="350" y="250" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-15" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="340" y="200" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-16" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="ZugXrchefKqxSvf9OSXH-15"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="200" y="280" as="sourcePoint" /> + <mxPoint x="460" y="240" as="targetPoint" /> + <Array as="points"> + <mxPoint x="200" y="260" /> + <mxPoint x="340" y="260" /> + <mxPoint x="360" y="260" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-17" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.374;entryY=1.002;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="ZugXrchefKqxSvf9OSXH-15"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="320" y="280" as="sourcePoint" /> + <mxPoint x="480" y="240" as="targetPoint" /> + <Array as="points"> + <mxPoint x="320" y="270" /> + <mxPoint x="370" y="270" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-18" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.617;entryY=1.012;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-5" target="ZugXrchefKqxSvf9OSXH-15"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="330" y="280" as="sourcePoint" /> + <mxPoint x="380" y="240" as="targetPoint" /> + <Array as="points"> + <mxPoint x="440" y="270" /> + <mxPoint x="390" y="270" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-19" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-7" target="ZugXrchefKqxSvf9OSXH-15"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="230" y="280" as="sourcePoint" /> + <mxPoint x="390" y="240" as="targetPoint" /> + <Array as="points"> + <mxPoint x="560" y="260" /> + <mxPoint x="400" y="260" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-20" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.877;entryY=0.995;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-8" target="ZugXrchefKqxSvf9OSXH-15"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="640" y="260" as="sourcePoint" /> + <mxPoint x="400" y="240" as="targetPoint" /> + <Array as="points"> + <mxPoint x="680" y="250" /> + <mxPoint x="410" y="250" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-22" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="ZugXrchefKqxSvf9OSXH-11"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="800" y="280" as="sourcePoint" /> + <mxPoint x="850" y="230" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-23" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="919.5699999999999" y="280" as="sourcePoint" /> + <mxPoint x="919.5699999999999" y="240" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-25" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="380" y="200" as="sourcePoint" /> + <mxPoint x="430" y="160" as="targetPoint" /> + <Array as="points"> + <mxPoint x="380" y="180" /> + <mxPoint x="430" y="180" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-26" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="800" y="200" as="sourcePoint" /> + <mxPoint x="720" y="160" as="targetPoint" /> + <Array as="points"> + <mxPoint x="800" y="180" /> + <mxPoint x="720" y="180" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-27" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="920" y="200" as="sourcePoint" /> + <mxPoint x="840" y="160" as="targetPoint" /> + <Array as="points"> + <mxPoint x="920" y="180" /> + <mxPoint x="840" y="180" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-28" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="390" y="120" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-29" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="680" y="120" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-30" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="800" y="120" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-31" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" edge="1" parent="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="500" y="139.57" as="sourcePoint" /> + <mxPoint x="640" y="139.57" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-33" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="559.57" y="90" as="sourcePoint" /> + <mxPoint x="559.57" y="60" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-34" value="0x0" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="50" y="320" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-35" value="0x1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="170" y="320" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-36" value="0x2" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="290" y="320" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-37" value="0x3" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="410" y="320" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-38" value="0x4" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="530" y="320" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-39" value="0x5" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> + <mxGeometry x="650" y="320" width="60" height="30" as="geometry" /> + </mxCell> + <mxCell id="ZugXrchefKqxSvf9OSXH-41" value="state MT structure" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1" vertex="1" parent="1"> + <mxGeometry x="30" y="10" width="120" height="30" as="geometry" /> + </mxCell> + </root> + </mxGraphModel> + </diagram> + <diagram name="Copy of Page-1" id="IuNJlO7Yu6gslcnrkaAP"> + <mxGraphModel dx="2883" dy="2623" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="Mhd92hIq7de9pidu9jlM-0" /> + <mxCell id="Mhd92hIq7de9pidu9jlM-1" parent="Mhd92hIq7de9pidu9jlM-0" /> + <mxCell id="Mhd92hIq7de9pidu9jlM-3" value="root" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontStyle=1" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="880" y="-200" width="80" height="40" as="geometry" /> + </mxCell> + <mxCell id="Mhd92hIq7de9pidu9jlM-4" value="processID" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="40" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="Mhd92hIq7de9pidu9jlM-5" value="censusRoot" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="160" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="Mhd92hIq7de9pidu9jlM-6" value="ballotMode" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="280" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="Mhd92hIq7de9pidu9jlM-7" value="EPK" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="399" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="Mhd92hIq7de9pidu9jlM-8" value="results add" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="520" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="Mhd92hIq7de9pidu9jlM-9" value="results sub" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="640" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="69IrlhlLYIJc4Z5VFMfy-7" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="640" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="69IrlhlLYIJc4Z5VFMfy-9" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="339.69" y="180" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-5" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="Mhd92hIq7de9pidu9jlM-9" target="69IrlhlLYIJc4Z5VFMfy-7"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="679" y="290" as="sourcePoint" /> + <mxPoint x="679.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-8" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-18" target="69IrlhlLYIJc4Z5VFMfy-9"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="319.38" y="240" as="sourcePoint" /> + <mxPoint x="370" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="320" y="230" /> + <mxPoint x="350" y="230" /> + <mxPoint x="370" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-9" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.628;entryY=0.989;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="69IrlhlLYIJc4Z5VFMfy-9"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="440" y="240" as="sourcePoint" /> + <mxPoint x="390" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="440" y="230" /> + <mxPoint x="390" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-12" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="520" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-13" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-12"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="560" y="290" as="sourcePoint" /> + <mxPoint x="559.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-14" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="40" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-15" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-14"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="80" y="290" as="sourcePoint" /> + <mxPoint x="79.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-16" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="160" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-17" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-16"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="200" y="290" as="sourcePoint" /> + <mxPoint x="199.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-18" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="280" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-19" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-18"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="320" y="290" as="sourcePoint" /> + <mxPoint x="319.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-20" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="399" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-21" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-20"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="439" y="290" as="sourcePoint" /> + <mxPoint x="438.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-22" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="99.69" y="180" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-23" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-22"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="80" y="240" as="sourcePoint" /> + <mxPoint x="130" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="80" y="230" /> + <mxPoint x="110" y="230" /> + <mxPoint x="130" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-24" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.628;entryY=0.989;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-22"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="200" y="240" as="sourcePoint" /> + <mxPoint x="150" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="200" y="230" /> + <mxPoint x="150" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-25" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="579.69" y="180" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-26" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-25"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="560" y="240" as="sourcePoint" /> + <mxPoint x="610" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="560" y="230" /> + <mxPoint x="590" y="230" /> + <mxPoint x="610" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-27" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.628;entryY=0.989;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-25"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="680" y="240" as="sourcePoint" /> + <mxPoint x="630" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="680" y="230" /> + <mxPoint x="630" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-28" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="220" y="120" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-29" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-28"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="140" y="180" as="sourcePoint" /> + <mxPoint x="190" y="160" as="targetPoint" /> + <Array as="points"> + <mxPoint x="140" y="170" /> + <mxPoint x="170" y="170" /> + <mxPoint x="190" y="170" /> + <mxPoint x="250" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-30" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.625;entryY=1.005;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-28"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="380" y="180" as="sourcePoint" /> + <mxPoint x="329.9300000000003" y="149.67000000000007" as="targetPoint" /> + <Array as="points"> + <mxPoint x="380" y="170" /> + <mxPoint x="270" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-31" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="700" y="120" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-32" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-31"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="620" y="180" as="sourcePoint" /> + <mxPoint x="670" y="160" as="targetPoint" /> + <Array as="points"> + <mxPoint x="620" y="170" /> + <mxPoint x="650" y="170" /> + <mxPoint x="670" y="170" /> + <mxPoint x="730" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-33" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.625;entryY=1.005;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-31"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="860" y="180" as="sourcePoint" /> + <mxPoint x="809.9300000000003" y="149.67000000000007" as="targetPoint" /> + <Array as="points"> + <mxPoint x="860" y="170" /> + <mxPoint x="750" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-36" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="880" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-37" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-36"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="920" y="290" as="sourcePoint" /> + <mxPoint x="919.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-38" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="760" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-39" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-38"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="800" y="290" as="sourcePoint" /> + <mxPoint x="799.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-40" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="819.69" y="180" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-41" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-40"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="800" y="240" as="sourcePoint" /> + <mxPoint x="850" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="800" y="230" /> + <mxPoint x="830" y="230" /> + <mxPoint x="850" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-42" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.628;entryY=0.989;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-40"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="920" y="240" as="sourcePoint" /> + <mxPoint x="870" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="920" y="230" /> + <mxPoint x="870" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-44" value="encrypted ballot" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1000" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-45" value="commitment" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1520" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-48" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1000" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-49" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-48"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1040" y="290" as="sourcePoint" /> + <mxPoint x="1039.38" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-50" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1059.69" y="180" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-51" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-50"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1040" y="240" as="sourcePoint" /> + <mxPoint x="1090" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1040" y="230" /> + <mxPoint x="1070" y="230" /> + <mxPoint x="1090" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-52" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.628;entryY=0.989;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-50"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1160" y="270" as="sourcePoint" /> + <mxPoint x="1110" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1160" y="230" /> + <mxPoint x="1110" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-57" value="encrypted ballot" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1399" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-61" value="encrypted ballot" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="760" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-62" value="commitment" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="880" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-63" value="" style="endArrow=none;dashed=1;html=1;rounded=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1100" y="304.74" as="sourcePoint" /> + <mxPoint x="1380" y="305" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-64" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1399" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-66" value="leaf content" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="-70" y="290" width="70" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-67" value="&lt;b&gt;leaf index&lt;/b&gt;" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="-70" y="330" width="70" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-69" value="commitment" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1640" y="290" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-70" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1340" y="180" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-71" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.628;entryY=0.989;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-70"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1440.31" y="240" as="sourcePoint" /> + <mxPoint x="1390.31" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1440.31" y="230" /> + <mxPoint x="1390.31" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-72" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1320" y="270" as="sourcePoint" /> + <mxPoint x="1370" y="210" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1320" y="230" /> + <mxPoint x="1350" y="230" /> + <mxPoint x="1370" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-73" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1640" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-74" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1520" y="240" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-75" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1579.69" y="180" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-76" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-75"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1560" y="240" as="sourcePoint" /> + <mxPoint x="1610" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1560" y="230" /> + <mxPoint x="1590" y="230" /> + <mxPoint x="1610" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-77" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.628;entryY=0.989;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-75"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1680" y="240" as="sourcePoint" /> + <mxPoint x="1630" y="220" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1680" y="230" /> + <mxPoint x="1630" y="230" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-78" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-69" target="HkwgHHsKWqpLjxovWTy6-73"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1679.5" y="290" as="sourcePoint" /> + <mxPoint x="1679.5" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-81" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-45" target="HkwgHHsKWqpLjxovWTy6-74"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1660" y="270" as="sourcePoint" /> + <mxPoint x="1660" y="250" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-82" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-57" target="HkwgHHsKWqpLjxovWTy6-64"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1550" y="290" as="sourcePoint" /> + <mxPoint x="1550" y="270" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-92" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1460" y="120" width="80" height="30" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-93" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.378;entryY=1.001;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-92"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1380" y="180" as="sourcePoint" /> + <mxPoint x="1430" y="160" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1380" y="170" /> + <mxPoint x="1410" y="170" /> + <mxPoint x="1430" y="170" /> + <mxPoint x="1490" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-94" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.625;entryY=1.005;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="HkwgHHsKWqpLjxovWTy6-92"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1620" y="180" as="sourcePoint" /> + <mxPoint x="1569.9300000000003" y="149.67000000000007" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1620" y="170" /> + <mxPoint x="1510" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-96" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;dashed=1;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-50"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1090" y="180" as="sourcePoint" /> + <mxPoint x="1160" y="150" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1100" y="170" /> + <mxPoint x="1120" y="170" /> + <mxPoint x="1140" y="170" /> + <mxPoint x="1160" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-103" value="" style="endArrow=none;dashed=1;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-28"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="270" y="90" as="sourcePoint" /> + <mxPoint x="920" y="-120" as="targetPoint" /> + <Array as="points"> + <mxPoint x="260" y="40" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-104" value="" style="endArrow=none;dashed=1;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-31"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="740" y="110" as="sourcePoint" /> + <mxPoint x="920" y="-120" as="targetPoint" /> + <Array as="points"> + <mxPoint x="740" y="40" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-105" value="" style="endArrow=none;dashed=1;html=1;rounded=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1200" y="120" as="sourcePoint" /> + <mxPoint x="920" y="-120" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1200" y="40" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-106" value="" style="endArrow=none;dashed=1;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" source="HkwgHHsKWqpLjxovWTy6-92"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1390" y="90" as="sourcePoint" /> + <mxPoint x="920" y="-120" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1500" y="40" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-108" value="" style="endArrow=classic;html=1;rounded=0;dashed=1;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="1300" y="270" as="sourcePoint" /> + <mxPoint x="1240" y="150" as="targetPoint" /> + <Array as="points"> + <mxPoint x="1300" y="270" /> + <mxPoint x="1300" y="170" /> + <mxPoint x="1240" y="170" /> + </Array> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-110" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1" target="Mhd92hIq7de9pidu9jlM-3"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="920" y="-120" as="sourcePoint" /> + <mxPoint x="970" y="-170" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-111" value="0x1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="159" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-112" value="0x0" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="39" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-113" value="0x2" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="280" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-114" value="0x3" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="399" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-115" value="0x4" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="520" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-116" value="0x5" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="640" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-117" value="nullifier" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="760" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-118" value="address" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="880" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-119" value="nullifier" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1000" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-120" value="nullifier" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1399" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-121" value="address" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1520" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-122" value="address" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry x="1640" y="330" width="80" height="20" as="geometry" /> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-123" value="" style="endArrow=open;html=1;rounded=0;strokeWidth=1;endFill=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="10" y="305.82" as="sourcePoint" /> + <mxPoint x="30" y="305.82" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="HkwgHHsKWqpLjxovWTy6-124" value="" style="endArrow=open;html=1;rounded=0;strokeWidth=1;endFill=0;" edge="1" parent="Mhd92hIq7de9pidu9jlM-1"> + <mxGeometry width="50" height="50" relative="1" as="geometry"> + <mxPoint x="10" y="340.82" as="sourcePoint" /> + <mxPoint x="30" y="340.82" as="targetPoint" /> + </mxGeometry> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile>
A v2/figures/mt-state-mermaid.mmd

@@ -0,0 +1,58 @@

+--- +config: + theme: neutral +--- +flowchart TB + subgraph s1[" "] + NInt[" "] + EInt[" "] + n1[" "] + EB["encrypted ballots [...]"] + A["commitments [...]"] + V["bool"] + end + subgraph s2[" "] + SI1[" "] + SIA[" "] + SIB[" "] + P0["processID"] + P1["censusRoot"] + P2["ballotMode"] + P3["encryptionKey"] + P4["results add"] + P5["results sub"] + end + Root["root hash"] --> NInt & EInt & n1 & SI1 & SIA & SIB + SI1 -- 0x0 --> P0 + SI1 -- 0x1 --> P1 + SIA -- 0x2 --> P2 + SIA -- 0x3 --> P3 + SIB -- 0x4 --> P4 + SIB -- 0x5 --> P5 + NInt -- nullifiers --> EB + EInt -- addresses --> A + n1 -- voteIDs --> V + n2[" "] + n1@{ shape: rect} + n2@{ shape: text} + NInt:::internal + EInt:::internal + n1:::internal + EB:::leaf + A:::leaf + A:::leaf + V:::leaf + V:::empty + SI1:::internal + SIA:::internal + SIB:::internal + P0:::leaf + P1:::leaf + P2:::leaf + P3:::leaf + P4:::leaf + P5:::leaf + Root:::internal + classDef internal fill:#f8f,stroke:#333,stroke-width:2px + classDef leaf fill:#bbf,stroke:#333,stroke-width:1px + classDef empty fill:#eee, stroke:#999,# stroke-dasharray:5 5
D v2/figures/mt-state.drawio

@@ -1,195 +0,0 @@

-<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0" version="26.3.0"> - <diagram name="Page-1" id="oUAoi1-TfJVtmyUlhwCi"> - <mxGraphModel dx="1383" dy="1869" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> - <root> - <mxCell id="0" /> - <mxCell id="1" parent="0" /> - <mxCell id="ZugXrchefKqxSvf9OSXH-40" value="" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;" vertex="1" parent="1"> - <mxGeometry x="20" width="960" height="360" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-1" value="root" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="520" y="20" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-2" value="processID" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="40" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-3" value="censusRoot" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="160" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-4" value="ballotMode" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="280" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-5" value="EPK" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="400" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-7" value="results add" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="520" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-8" value="results sub" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="640" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-9" value="encrypted ballots [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="760" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-10" value="commitments [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="880" y="280" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-11" value="nullifiers [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="760" y="200" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-12" value="addresses [...]" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="880" y="200" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-14" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.129;entryY=0.976;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-2" target="ZugXrchefKqxSvf9OSXH-15"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="70" y="280" as="sourcePoint" /> - <mxPoint x="330" y="240" as="targetPoint" /> - <Array as="points"> - <mxPoint x="80" y="250" /> - <mxPoint x="210" y="250" /> - <mxPoint x="350" y="250" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-15" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="340" y="200" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-16" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="ZugXrchefKqxSvf9OSXH-15"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="200" y="280" as="sourcePoint" /> - <mxPoint x="460" y="240" as="targetPoint" /> - <Array as="points"> - <mxPoint x="200" y="260" /> - <mxPoint x="340" y="260" /> - <mxPoint x="360" y="260" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-17" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.374;entryY=1.002;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="ZugXrchefKqxSvf9OSXH-15"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="320" y="280" as="sourcePoint" /> - <mxPoint x="480" y="240" as="targetPoint" /> - <Array as="points"> - <mxPoint x="320" y="270" /> - <mxPoint x="370" y="270" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-18" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.617;entryY=1.012;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-5" target="ZugXrchefKqxSvf9OSXH-15"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="330" y="280" as="sourcePoint" /> - <mxPoint x="380" y="240" as="targetPoint" /> - <Array as="points"> - <mxPoint x="440" y="270" /> - <mxPoint x="390" y="270" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-19" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-7" target="ZugXrchefKqxSvf9OSXH-15"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="230" y="280" as="sourcePoint" /> - <mxPoint x="390" y="240" as="targetPoint" /> - <Array as="points"> - <mxPoint x="560" y="260" /> - <mxPoint x="400" y="260" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-20" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.877;entryY=0.995;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="ZugXrchefKqxSvf9OSXH-8" target="ZugXrchefKqxSvf9OSXH-15"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="640" y="260" as="sourcePoint" /> - <mxPoint x="400" y="240" as="targetPoint" /> - <Array as="points"> - <mxPoint x="680" y="250" /> - <mxPoint x="410" y="250" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-22" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="ZugXrchefKqxSvf9OSXH-11"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="800" y="280" as="sourcePoint" /> - <mxPoint x="850" y="230" as="targetPoint" /> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-23" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="919.5699999999999" y="280" as="sourcePoint" /> - <mxPoint x="919.5699999999999" y="240" as="targetPoint" /> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-25" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="380" y="200" as="sourcePoint" /> - <mxPoint x="430" y="160" as="targetPoint" /> - <Array as="points"> - <mxPoint x="380" y="180" /> - <mxPoint x="430" y="180" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-26" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="800" y="200" as="sourcePoint" /> - <mxPoint x="720" y="160" as="targetPoint" /> - <Array as="points"> - <mxPoint x="800" y="180" /> - <mxPoint x="720" y="180" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-27" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="920" y="200" as="sourcePoint" /> - <mxPoint x="840" y="160" as="targetPoint" /> - <Array as="points"> - <mxPoint x="920" y="180" /> - <mxPoint x="840" y="180" /> - </Array> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-28" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="390" y="120" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-29" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="680" y="120" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-30" value="hash()" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> - <mxGeometry x="800" y="120" width="80" height="40" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-31" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" edge="1" parent="1"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="500" y="139.57" as="sourcePoint" /> - <mxPoint x="640" y="139.57" as="targetPoint" /> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-33" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1"> - <mxGeometry width="50" height="50" relative="1" as="geometry"> - <mxPoint x="559.57" y="90" as="sourcePoint" /> - <mxPoint x="559.57" y="60" as="targetPoint" /> - </mxGeometry> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-34" value="0x0" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> - <mxGeometry x="50" y="320" width="60" height="30" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-35" value="0x1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> - <mxGeometry x="170" y="320" width="60" height="30" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-36" value="0x2" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> - <mxGeometry x="290" y="320" width="60" height="30" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-37" value="0x3" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> - <mxGeometry x="410" y="320" width="60" height="30" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-38" value="0x4" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> - <mxGeometry x="530" y="320" width="60" height="30" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-39" value="0x5" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> - <mxGeometry x="650" y="320" width="60" height="30" as="geometry" /> - </mxCell> - <mxCell id="ZugXrchefKqxSvf9OSXH-41" value="state MT structure" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontStyle=1" vertex="1" parent="1"> - <mxGeometry x="30" y="10" width="120" height="30" as="geometry" /> - </mxCell> - </root> - </mxGraphModel> - </diagram> -</mxfile>
M v2/sections/cryptographic-primitives.tex → v2/sections/cryptographic-primitives.tex

@@ -1,64 +1,77 @@

% !TeX root = ../build/main.tex -In this section, we detail the cryptographic primitives used in Section~\ref{sec:vocdoni-protocol}. We briefly introduce Merkle trees, the commitment and encryption schemes, proof systems, elliptic curves and hash functions used. We also specify at each step the concrete parameters with which each of the primitives is instantiated.\\ +In this section, we detail the cryptographic primitives used in Section~\ref{sec:vocdoni-protocol}. We briefly introduce elliptic curves, hash functions, Merkle trees, encryption schemes, and proof systems used in the protocol. We also specify at each step the concrete parameters with which each of the primitives is instantiated.\\ \martai{Maybe it should go under the protocol section?} -\paragraph{Notation.} Throughout the document, we use the following conventions. Given a set $S$, we denote sampling an element $x$ uniformly at random from $S$ by $x \sample S$. We denote all bitstrings of arbitrary length by $\{0,1\}^*$. +%\paragraph{Notation.} Throughout the document, we use the following conventions. Given a set $S$, we denote sampling an element $x$ uniformly at random from $S$ by $x \sample S$. We denote all bitstrings of arbitrary length by $\{0,1\}^*$. %Any group $\G$ used is of a large prime order, and we assume that the discrete logarithm problem is hard in $\G$. If two elements are denoted by the same letter in upper and lower case, e.g. $a, A$, this often means that $A$ is a public key corresponding to the secret key $a$. %$\F_p$ denotes de finite field of order $p$, and $\F_p^* = \F_p/\{0\}$. \subsection{Elliptic curves} \label{sec:cryptographic-primitives:elliptic-curves} -\martai{Include the motivation for the use of each of the curves (e.g. native arithmetic, regular Eth addresses...).} - -\davinci uses BW6-761~\cite{elhousni20optimized}, BLS12-377~\cite{bowe20zexe}, BN254~\cite{jancar20bn256}, BabyJubjub~\cite{belles21twisted}, and Secp256k1~\cite{brown10sec} elliptic curves. Below, we give the details of these curves. +\Davinci relies on multiple elliptic curves to ensure interoperability with Ethereum, compatibility with available cryptographic primitives, and efficient in-circuit operations. On the one hand, SECP256K1~\cite{brown10sec} is used because Ethereum public keys are elements of this curve. As \Davinci assumes each voter holds a standard Ethereum address, cryptographic operations such as digital signatures and identity verification rely on SECP256K1 to match the Ethereum ecosystem. On the other hand, BN254~\cite{jancar20bn256} is chosen because it is the curve supported by Ethereum's precompiled contracts for zero-knowledge proof verification, which makes it ideal for verifying SNARK proofs on-chain with minimal gas cost. then, BabyJubjub~\cite{belles21twisted} is used as an inner curve for elliptic curve operations within arithmetic circuits. Finally, BLS12-377~\cite{bowe20zexe} and BW6-761~\cite{elhousni20optimized} are used to enable recursive proof composition. More specifically, BLS12-377 acts as the inner curve for constructing proofs, while BW6-761 serves as the outer curve that verifies those proofs within larger zkSNARK circuits. This pairing enables succinct verification and composability of zkSNARKs within other zkSNARKs, which we use for \davinci’s aggregation and state transition logic. Below, we give the details of these curves. \paragraph{Parameters.} \begin{itemize} - \item[$\bullet$] $p = \tt{0x122e824fb83ce0ad187c94004faff3eb926186a81d14688528275ef8087be41707ba638e584e9190}$ + % + \item[$\bullet$] $p = \tt{\hspace{0.04cm}0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f}$ (256-bit prime). + \item[$\bullet$] $q = \tt{\hspace{0.01cm}0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141}$ (256-bit prime). + % + \item[$\bullet$] $r = \tt{0x2523648240000001ba344d80000000086121000000000013a700000000000013}$ (254-bit prime). + \item[$\bullet$] $s = \tt{\hspace{0.04cm}0x2523648240000001ba344d8000000007ff9f800000000010a10000000000000d}$ (254-bit prime). + \item[$\bullet$] $t = \tt{\hspace{0.01cm}0x60c89ce5c263405370a08b6d0302b0bab3eedb83920ee0a677297dc392126f1}$ (251-bit prime). + % + \item[$\bullet$] $u = \tt{0x122e824fb83ce0ad187c94004faff3eb926186a81d14688528275ef8087be41707ba638e584e9190}$ \item[] \hspace{0.53cm} $\tt{3cebaff25b423048689c8ed12f9fd9071dcd3dc73ebff2e98a116c25667a8f8160cf8aeeaf0a437e69}$ \item[] \hspace{0.53cm} $\tt{13e6870000082f49d00000000008b}$ (761-bit prime). - \item[$\bullet$] $q = \tt{0x01ae3a4617c510eac63b05c06ca1493b1a22d9f300f5138f1ef3622fba094800170b5d4430000000}$ + \item[$\bullet$] $v = \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). - \item[$\bullet$] $u = \tt{\hspace{0.01cm}0x60c89ce5c263405370a08b6d0302b0bab3eedb83920ee0a677297dc392126f1}$ (251-bit prime). - \item[$\bullet$] $v = \tt{\hspace{0.04cm}0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f}$ (256-bit prime). - \item[$\bullet$] $w = \tt{\hspace{0.01cm}0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141}$ (256-bit prime). + \item[$\bullet$] $w = \tt{0x12ab655e9a2ca55660b44d1e5c37b00159aa76fed00000010a11800000000001}$ (253-bit prime). + % \end{itemize} \paragraph{Elliptic curve groups.} \begin{itemize} - \item BW6-761 curve: $\BW{E}/\F_p$ defined by equation $\BW{E}: y^2 = x^3 - 1$, with subgroups $\BW{\G}_1, \BW{\G}_2$ of prime order $q$, and an efficiently computable pairing \({e}:\BW{\G}_1\times\BW{\G}_2 \rightarrow \BW{\G}_T,\) where $\BW{\G}_T \subset \F_{q^{6}}$ and has order $q$ as well. - \item BLS12-377 curve: $\BLS{E}/\F_q$ defined by equation \(\BLS{E}: y^2 = x^3 + 1,\) with subgroups $\BLS{\G}_1, \BLS{\G}_2$ of prime order $r$, and an efficiently computable pairing \({e}:\BLS{\G}_1\times\BLS{\G}_2 \rightarrow \BLS{\G}_T,\) where $\BLS{\G}_T \subset \F_{r^{12}}$ and has order $r$. - \item BN254 curve: $\BN{E}/\F_s$ defined by equation \( \BN{E}: y^2 = x^3 + 3\), with subgroups $\BN{\G}_1, \BN{\G}_2$ of prime order $t$, and an efficiently computable pairing \(e:\BN{\G}_1\times\BN{\G}_2 \rightarrow \BN{\G}_T,\) where $\BN{\G}_T \subset \F_{t^{12}}$ and has order $t$. - \item BabyJubjub curve: $\BJ{E}/\F_t$ defined by equation $\BJ{E}: 168700 x^2 + y^2 = 1 + 168696 x^2y^2$, with subgroup $\BJ{\G}$ of prime order $u$. - \item SECP256K1 curve: $\SEC{E}/\F_v$ defined by equation $\SEC{E}: y^2 = x^3 + 7$, with group $\SEC{\G}$ of prime order $w$. + % + \item SECP256K1 curve: $\SEC{E}/\F_p$ defined by equation $\SEC{E}: y^2 = x^3 + 7$, with group $\SEC{\G}$ of prime order $q$. + % + \item BN254 curve: $\BN{E}/\F_r$ defined by equation \( \BN{E}: y^2 = x^3 + 3\), with subgroups $\BN{\G}_1, \BN{\G}_2$ of prime order $s$, and an efficiently computable pairing \(e:\BN{\G}_1\times\BN{\G}_2 \rightarrow \BN{\G}_T,\) where $\BN{\G}_T \subset \F_{s^{12}}$ and has order $s$. + \item BabyJubjub curve: $\BJ{E}/\F_s$ defined by equation $\BJ{E}: 168700 x^2 + y^2 = 1 + 168696 x^2y^2$, with subgroup $\BJ{\G}$ of prime order $t$. + % + \item BW6-761 curve: $\BW{E}/\F_u$ defined by equation $\BW{E}: y^2 = x^3 - 1$, with subgroups $\BW{\G}_1, \BW{\G}_2$ of prime order $v$, and an efficiently computable pairing \({e}:\BW{\G}_1\times\BW{\G}_2 \rightarrow \BW{\G}_T,\) where $\BW{\G}_T \subset \F_{v^{6}}$ and has order $v$ as well. + \item BLS12-377 curve: $\BLS{E}/\F_v$ defined by equation \(\BLS{E}: y^2 = x^3 + 1,\) with subgroups $\BLS{\G}_1, \BLS{\G}_2$ of prime order $w$, and an efficiently computable pairing \({e}:\BLS{\G}_1\times\BLS{\G}_2 \rightarrow \BLS{\G}_T,\) where $\BLS{\G}_T \subset \F_{w^{12}}$ and has order~$w$. + % \end{itemize} \paragraph{Finite fields.} \begin{itemize} - \item $\F_p$: base field of the BW6-761 curve. - \item $\F_q$: scalar field of $\BW{\G}_1, \BW{\G}_2, \BW{\G}_T$ and base field of the BLS12-377 curve. - \item $\F_r$: scalar field of $\BLS{\G}_1, \BLS{\G}_2, \BLS{\G}_T$. - \item $\F_s$: base field of the BN254 curve. - \item $\F_t$: scalar field of $\BN{\G}_1, \BN{\G}_2, \BN{\G}_T$ and base field of the BabyJubjub curve. - \item $\F_u$: scalar field of $\BJ{\G}$. - \item $\F_v$: base field of the SECP256K1 curve. - \item $\F_w$: scalar field of $\SEC{\G}$. + % + \item $\F_p$: base field of the SECP256K1 curve. + \item $\F_q$: scalar field of $\SEC{\G}$. + % + \item $\F_r$: base field of the BN254 curve. + \item $\F_s$: scalar field of $\BN{\G}_1, \BN{\G}_2, \BN{\G}_T$ and base field of the BabyJubjub curve. + \item $\F_t$: scalar field of $\BJ{\G}$. + % + \item $\F_u$: base field of the BW6-761 curve. + \item $\F_v$: scalar field of $\BW{\G}_1, \BW{\G}_2, \BW{\G}_T$ and base field of the BLS12-377 curve. + \item $\F_w$: scalar field of $\BLS{\G}_1, \BLS{\G}_2, \BLS{\G}_T$. + % \end{itemize} \paragraph{Generators.} \begin{itemize} + \item Generator of $\SEC{\G}$: XXX. + % + \item Generator of $\BN{\G}_1$: XXX. + \item Generator of $\BJ{\G}$: XXX. + % \item Generator of $\BW{\G}_1$: XXX. \item Generator of $\BLS{\G}_1$: XXX. - \item Generator of $\BN{\G}_1$: XXX. - \item Generator of $\BJ{\G}$: XXX. - \item Generator of $\SEC{\G}$: XXX. + % \end{itemize} \subsection{Hash functions}

@@ -66,9 +79,11 @@ \label{sec:cryptographic-primitives:hash}

\martai{Poseidon? Specify parameters? And $p$ may actually not be $p$, and probably it will be instantiated with different curves, depending on the circuit.} -\martai{Yes, Poseidon. But also MiMC-7 for hashing the public inputs and passing them between circuits (for efficiency).} +We use three hash functions. -We use the Poseidon~\cite{grassi21poseidon} hash function $ \hlset{\Hash} : \F_p \rightarrow \F_p$, where $\F_p$ is the set of tuples of $\F_p$-elements of any length, and $\F_p$ is the field described in Section~\ref{sec:cryptographic-primitives:elliptic-curves}. In particular, we make use of the \textsc{Poseidon-128} permutation \[\pi: \F_p^t\rightarrow \F_p^t,\] where $t=r+c$, with the following parameters: +\paragraph{Keccak256.} On the one side, the Keccak256~\cite{bertoni11keccak} hash function $\hlset{\Keccak} : \F_p \rightarrow \F_p$ is used to derive an Ethereum address from a public key over $\SEC{\G}$ (as described in~\cite{wood2014ethereum}). + +\paragraph{Poseidon.} On the other side, the hash function we use the most is Poseidon~\cite{grassi21poseidon} hash function $\hlset{\Poseidon} : \F_p \rightarrow \F_p$, where $\F_p$ is the set of tuples of $\F_p$-elements of any length, and $\F_p$ is the field described in Section~\ref{sec:cryptographic-primitives:elliptic-curves}. In particular, we make use of the \textsc{Poseidon-128} permutation \[\pi: \F_p^t\rightarrow \F_p^t,\] where $t=r+c$, with the following parameters: \begin{table}[H] \begin{center} \begin{tabular}{| c | c | c | c | c | }

@@ -89,10 +104,12 @@ % \item Partial rounds $R_P = 59$.

% \item S-box: $S(x) = x^5$. % \end{itemize} -For the sake of clarity, in our notation we admit anything as an input of $\Hash$, although it might not be parsed as a sequence of $\F_p$-elements. Any bitstring can be converted to a tuple of $\F_p$-elements, so this does not change the actual working of the hash computation. In this document, is implied that the proper conversion happens before feeding the input into the actual hash function. +\paragraph{MiMC-7.} Finally, we use the MiMC-7 hash function~\cite{albrecht16mimc} $\hlset{\Mimc} : \F_p \rightarrow \F_p$, where $\F_p$ is the set of tuples of $\F_p$-elements of any length, and $\F_p$ is the field described in Section~\ref{sec:cryptographic-primitives:elliptic-curves}. This hash is used to hash the public inputs of the different circuits and verify the associated proofs more efficiently (see Section~\ref{sec:vocdoni-protocol:circuits} for further details). -\subsection{Commitment schemes} -\label{sec:cryptographic-primitives:commitments} +For the sake of clarity, in our notation we admit anything as an input of the above hash functions, although it might not be parsed as a sequence of $\F_p$-elements. Any bitstring can be converted to a tuple of $\F_p$-elements, so this does not change the actual working of the hash computation. In this document, is implied that the proper conversion happens before feeding the input into the actual hash function. + +%\subsection{Commitment schemes} +%\label{sec:cryptographic-primitives:commitments} %Pedersen commitment scheme~\cite{pedersen1991non}.

@@ -146,7 +163,40 @@

\subsection{Digital signature schemes} \label{sec:cryptographic-primitives:signatures} -ECDSA. +\Davinci uses the elliptic curve digital signature algorithm (ECDSA)~\cite{johnson01ecdsa} over the SECP256K1 curve to ensure compatibility with standard Ethereum wallets. %, such as MetaMask~\ref{} or Ledger~\ref{}, +% +%\Davinci uses the elliptic curve digital signature algorithm (ECDSA)~\cite{johnson01ecdsa} over the SECP256K1 curve for user authentication and vote authorization. This decision is taken to ensure that \davinci is compatible with standard Ethereum wallets, such as MetaMask~\ref{} or Ledger~\ref{}, without requiring users to generate or manage additional cryptographic keys. +% +Verification of ECDSA signatures is \textit{performed inside} zero-knowledge proofs using a specialized circuit that emulates SECP256K1 arithmetic. This approach is necessary because SECP256K1 is defined over a 256-bit prime field that differs from the native field used in the ZK-SNARK circuit (see Section\ref{sec:vocdoni-protocol:circuits} for more details). Below, we describe the algorithms, which follow the standard ECDSA protocol. + +\begin{mdframed} + \begin{minipage}[t]{0.45\textwidth} + \begin{itemize} + \item[$\bullet$] $\hlset{\SSign}_{\sk}(\msg \in \{0,1\}^\star)$: \vspace{0.1cm} + \begin{enumerate} + \item Compute $h = \hlget{\Keccak}(\msg) \bmod q$. + \item\label{item:ssign-step} Select a random scalar $k \sample \Z_q^{*}$. + \item Compute $R = k \cdot G = (x_R, y_R) \in \SEC{\G}$. + \item Set $r = x_R \bmod q$. If $r = 0$, go back to step~\ref{item:ssign-step}. + \item Compute $s = k^{-1} \cdot (h + r \cdot \sk) \bmod q.$ If $s = 0$, go back to step~\ref{item:ssign-step}. + \item Output $\sigma = (r, s)$. + \end{enumerate} + \end{itemize} + \end{minipage} + \begin{minipage}[t]{0.55\textwidth} + \begin{itemize} + \item[$\bullet$] $\hlset{\SVer}(\pk \in \SEC{\G},\msg \in \{0,1\}^\star, \sigma = (r, s)\in(\Z_q^*)^2)$: %\vspace{0.1cm} + \begin{enumerate} + \item Compute $h = \hlget{\Keccak}(\msg) \bmod q$. + \item Compute $w = s^{-1} \bmod q$. + \item Compute $u_1 = h \cdot w \bmod q$ and $u_2 = r \cdot w \bmod q$. + \item Compute $$X = u_1 \cdot G + u_2 \cdot \pk = (x_X, y_X) \in \SEC{\G}.$$ + \item Accept if $r = x_X \bmod q$; otherwise, reject. + \end{enumerate} + \end{itemize} + \end{minipage} +\end{mdframed} + \subsection{Key generation schemes} \label{sec:cryptographic-primitives:dkg}
M v2/sections/vocdoni-protocol.tex → v2/sections/vocdoni-protocol.tex

@@ -54,7 +54,7 @@

\martai{Maybe the voteID will be included in the tree at some point.} \begin{figure}[h] -sd \centerline{\includegraphics[width=400pt,draft=false]{\figs/mt-state}} + \centerline{\includegraphics[width=400pt,draft=false]{\figs/mt-state-mermaid}} \caption{Structure of the state Merkle tree (FIGURE SHOULD BE POLISHED).} \label{fig:mt-state} \end{figure}

@@ -101,7 +101,7 @@ %

\item \censuspf: the census proof serves as the voter's identity verification mechanism, ensuring that only eligible voters can participate. Depending on the process configuration, the voter provides either a Merkle tree-based proof showing inclusion in the census true, or a credential issued by a trusted third party (e.g. from a credential service provider). % \item \commitment: the identity commitment is used to prevent a voter from registering multiple nullifiers and avoid collisions if different voters choose the same secret. The commitment is computed the following way: - \[ \commitment = \hlget{\Hash}(\address \conc \processid \conc s)\] + \[ \commitment = \hlget{\Poseidon}(\address \conc \processid \conc s)\] \martai{Link Hash function to function in Section\ref{sec:cryptographic-primitives}.} {\it Old text: \begin{itemize}

@@ -119,7 +119,7 @@ \item A random input that the user must store to allow potential vote overwrite.\\

\end{itemize}} % \item \nullifier: the nullifier is a 32-byte hash used to prevent double voting. It is computed the following way: - \[\nullifier = \hlget{\Hash}(\commitment || s) \] + \[\nullifier = \hlget{\Poseidon}(\commitment || s) \] \martai{Link Hash function to function in Section\ref{sec:cryptographic-primitives}.} That is, it ensures that each voter can either cast only one vote or overwrite their previous vote. By means of nullifiers, voters can submit a new vote with the same nullifier to replace their previous vote. Moreover, nullifiers provide users' anonymity, since nullifiers cannot be linked back to the voter's identity without knowledge of the secret $s$. %

@@ -151,6 +151,12 @@ \martai{It is called Ballot Mode because we define some modes (like quadratic, etc.) that can be chosen by the organizer. Essentially, each of this modes has a special configuration, but in order to make it easier, the organizer only needs to choose which of the modes (configs) to apply.}

\martai{It's convenient to name the proof associated to each circuit: a proof for this circuit is called [...].\\ Answer: 1. ballotProof, 2. voteVerifier, 3. aggregator, 4. stateTransition.} + +\begin{figure}[h] + \centerline{\includegraphics[width=350pt,draft=false]{\figs/circuits-flow}} + \caption{Circuits flow.} + \label{fig:circuits-flow} +\end{figure} \subsubsection{Voter circuit}