├── Call-2020-for-contribs-to-ZCRef.pdf ├── README.md ├── ZkpComRef-0-3.pdf ├── changes-v0.2-from-v0.1.pdf ├── diff-v0.2-from-v0.1.pdf ├── diff-v0.3-from-v0.2.pdf ├── src ├── figs │ ├── ZKProof-logo.png │ ├── by.pdf │ ├── by.svg │ ├── cc.logo.svg │ ├── implem--api-diagram.pdf │ ├── implem--api-diagram.pdf_tex │ ├── implem--api-diagram.svgz │ ├── mindmap-IT-proof-systems-src.tex │ ├── mindmap-IT-proof-systems.pdf │ ├── zkproof-mindmap-it-proofs-20210425.pdf │ └── zz-99-include-mindmap-IT.tex ├── latex-editing.txt ├── zkpcomref.tex ├── zz-00-auxi-latex │ ├── zz-00-y01-pkgs.tex │ ├── zz-00-y02-cmds-diff.tex │ ├── zz-00-y02-cmds.tex │ ├── zz-00-y03-format.tex │ └── zz-00-y04-metadata.tex ├── zz-00-frontmatter │ ├── zz-00-frontmatter.tex │ ├── zz-00-z01-cover-page.tex │ ├── zz-00-z02a-abstract.tex │ ├── zz-00-z02b-this-version.tex │ ├── zz-00-z03-this-community-ref.tex │ ├── zz-00-z04a-charter.tex │ ├── zz-00-z04b-ip-policy.tex │ ├── zz-00-z05-contents.tex │ └── zz-00-z06-exec-summary.tex ├── zz-01-baseline │ ├── zz-01-baseline.tex │ ├── zz-01-z01-intro.tex │ ├── zz-01-z02-terms.tex │ ├── zz-01-z03-statements.tex │ ├── zz-01-z04-zkpok-vs-zkpom.tex │ ├── zz-01-z05-syntax.tex │ ├── zz-01-z06-properties.tex │ ├── zz-01-z07-assumptions.tex │ └── zz-01-z08-efficiency.tex ├── zz-02-paradigms │ ├── zz-02-paradigms.tex │ ├── zz-02-z01-background.tex │ ├── zz-02-z02-IT-proof-systems.tex │ ├── zz-02-z03-crypto-compilers.tex │ ├── zz-02-z04-specialized.tex │ ├── zz-02-z05-proof-composition.tex │ └── zz-02-z06-interactivity.tex ├── zz-03-implementation │ ├── zz-03-implem.tex │ ├── zz-03-z01-overview.tex │ ├── zz-03-z02-backend.tex │ ├── zz-03-z03-frontend.tex │ ├── zz-03-z04-apis-and-file-format.tex │ ├── zz-03-z05-benchmarks.tex │ ├── zz-03-z06-correctness.tex │ ├── zz-03-z07-interoperability.tex │ └── zz-03-z08-goals.tex ├── zz-04-applications │ ├── zz-04-apps.tex │ ├── zz-04-z01-intro.tex │ ├── zz-04-z02-scope-use-cases.tex │ ├── zz-04-z03-prior-work.tex │ ├── zz-04-z04-gadgets.tex │ ├── zz-04-z05-identity-framework.tex │ ├── zz-04-z06-asset-transfer.tex │ ├── zz-04-z07-regulation-compliance.tex │ └── zz-04-z08-conclusions.tex ├── zz-99-biblio │ ├── zkpcomref2022.bib │ ├── zz-99-biblio-19xx.bib │ ├── zz-99-biblio-200x.bib │ ├── zz-99-biblio-2010-2017.bib │ ├── zz-99-biblio-2018-2020.bib │ ├── zz-99-biblio-2021-2022.bib │ └── zz-99-biblio-zkproof.bib ├── zz-AA-backmatter │ ├── zz-91-acks.tex │ ├── zz-A-abbrevs.tex │ └── zz-B-version-history.tex └── zz-ZZ-diff │ ├── zzz-00-insert-comments.tex │ ├── zzz-01-changes-to-v0.1--1-by-editors.tex │ └── zzz-01-changes-to-v0.1--2-by-contributors.tex ├── standards-proposals ├── proposal--elliptic-curve-generation.pdf ├── proposal--zk-commit-and-prove.pdf ├── proposal--zk-interop-jr1cs.pdf └── proposal--zk-interop-zkinterface.pdf ├── zkproof-community-reference-v0.1.pdf └── zkproof-community-reference-v0.2.pdf /Call-2020-for-contribs-to-ZCRef.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/Call-2020-for-contribs-to-ZCRef.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # zkreference 2 | This is the official repository of the ZKProof Community Reference (ZkpComRef) and of the Community Proposals submitted to ZKProof. The ZkpComRef is a live document that is developed and written in a collaborative manner within the ZKProof Standardization effort. Its purpose is to provide a reference for the development of zero-knowledge-proof technology that is secure, practical and interoperable. The document intends to be accessible to a large audience, including the general public, the media, the industry, developers and cryptographers. 3 | 4 | ## Latest Version 5 | The [version 0.2 of the ZkpComRef](https://docs.zkproof.org/reference.pdf) is dated December 31, 2019. We thank all the received contributions. You can see the specific changes in the "[diff](https://github.com/zkpstandard/zkreference/raw/master/diff-v0.2-from-v0.1.pdf)" file in this repo. Highlights: 6 | - A consolidated preamble: new abstract, new context “About this community reference”, new IP expectations; more detailed “Table of contents”; new “Executive summary”. 7 | - A “Version history” section and an “Acknowledgments” section after the main chapters. 8 | - A new chapter on “Construction paradigms”, encompassing the previous section on “Taxonomy” of constructions, and including a new section on “Interactivity”. 9 | - Several portions of revised text and content, for example on proofs of knowledge vs. membership, benchmark parameters, gadgets, and applications. 10 | 11 | ## Editorial Process 12 | The initial ZkpComRef version was based on the [proceedings](https://docs.zkproof.org/reference#version-history) of the 1st ZKProof workshop. Subsequent contributions were based on [feedback](https://csrc.nist.gov/CSRC/media/Projects/pec/documents/20190406-nist-pec-comments-on-zkproof-docs.pdf) and [discussions](https://community.zkproof.org/t/breakout-session-zkproof-proceedings-and-community-reference/152) held at the [2nd ZKProof Workshop](https://community.zkproof.org/t/2nd-zkproof-standards-workshop-in-berkeley-april-10-12/60/2). Thereafter, the ZkpComRef has evolved with a flexible editorial process, focused on contributions from the community and moderated by a [team of editors](https://docs.zkproof.org/reference/process). The incremental improvement is organized in [yearly cycles](https://docs.zkproof.org/reference/process), including calls for feedback and contributions. See further details in the [ZKProof website](https://docs.zkproof.org/reference/process). 13 | 14 | **Feedback.** Here is a list of examples of feedback we are looking for 15 | - What portions of technical text can benefit from further clarification? 16 | - What basic concepts to further clarify, such as membership vs. knowledge, etc? 17 | - Each item in section 2.3 should be expanded into a new section — what to include? 18 | - What new pictorial examples (diagrams, etc.) to add? 19 | - What bibliographic references to add, to better support the claims and concepts? 20 | 21 | Please send your feedback by email to editors@zkproof.org. When commenting on specific portions of text, please refer to the line numbers in the ["annotated changes" version](https://github.com/zkpstandard/zkreference/raw/master/changes-v0.2-from-v0.1.pdf) in this repo. (The [ZKProof community forum](https://community.zkproof.org) also remains as a resource for community discussion.) 22 | 23 | **Contributions.** 24 | The latest call for contributions is dated [2020-Aug-14](https://github.com/zkpstandard/zkreference/raw/master/Call-2020-for-contribs-to-ZCRef.pdf). 25 | Here are notes/resources about potential contributions: 26 | 27 | - GitHub issues: Various topics of needed contributions are identified as [GitHub issues](https://github.com/zkpstandard/zkreference/issues). 28 | - 2019: [Notes](https://community.zkproof.org/uploads/short-url/iOnBD0cnhxrRPIt4WNmYKEJBVHF.pdf) from “breakout” and “proposal” sessions at the [2nd ZKProof Workshop](https://zkproof.org/events/workshop2). 29 | - 2021: The editors are producing a new version of the "Paradigms" chapter to appear on ZkpComRef-0.3 --- collaboration is welcome 30 | - 2021-Apr-26: "Writathon" at the [4th ZKProof workshop](https://zkproof.org/events/workshop4/#schedule) --- gathering new material on selected topics seful for the ZkpComRef 31 | 32 | You can submit your contribution by [email](mailto:editors@zkproof.org) or via a GitHub pull request. To help manage collaboration and concurrent work, please contact the editors in advance to inform you are producing a contribution on a topic. When submitting a contribution, please accompany it with an explanation, as follows: 33 | - **Title:** <_a title for the contribution; 3-10 words_> 34 | - **Proposed contribution:** <_brief description and motivation about the change; 20-50 words_> 35 | - **ZkpComRef locations:** <_ZkpComRef location (sections) where the contribution should be integrated_> 36 | - **Context references:** <_e.g.: GitHub issue number; related session in the ZKProof workshop_> 37 | - **Contributors:** <_who worked on the submitted contributions_> 38 | 39 | ## References 40 | 41 | The table below shows a list of current documents and content from the ZKProof effort. 42 | 43 | | Name | Description | Related Event | Link | 44 | |-------------|-------|------| ----| 45 | | ZKProof Community Reference | A document which serves as reference for the zero-knowledge field, built by the ZKProof community, in collaboration with NIST | 1st & 2nd ZKProof Workshops | [LINK](https://docs.zkproof.org/pages/reference/reference.pdf) | 46 | | ZKProof Community Proposals | A set of documents that were submitted as proposals to be discussed and standardized | 2nd ZKProof Workshop | [LINK](https://github.com/zkpstandard/zkreference) | 47 | | Workshop Notes | A set of topics in the community forum that include the notes of the breakout sessions from the 2nd ZKProof Workshop | 2nd ZKProof Workshop | [LINK](https://community.zkproof.org/c/zkproof-2019) | 48 | | Public ZKProof Documentation | Aside from this repository and the [website](https://ZKProof.org), we have this folder with all the public documents from the effort | 1st & 2nd ZKProof Workshops | [LINK](https://drive.google.com/drive/u/2/folders/1HWZYMH-6Mx8wcX8geium506L0KRxcgPe) | 49 | -------------------------------------------------------------------------------- /ZkpComRef-0-3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/ZkpComRef-0-3.pdf -------------------------------------------------------------------------------- /changes-v0.2-from-v0.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/changes-v0.2-from-v0.1.pdf -------------------------------------------------------------------------------- /diff-v0.2-from-v0.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/diff-v0.2-from-v0.1.pdf -------------------------------------------------------------------------------- /diff-v0.3-from-v0.2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/diff-v0.3-from-v0.2.pdf -------------------------------------------------------------------------------- /src/figs/ZKProof-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/src/figs/ZKProof-logo.png -------------------------------------------------------------------------------- /src/figs/by.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/src/figs/by.pdf -------------------------------------------------------------------------------- /src/figs/implem--api-diagram.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/src/figs/implem--api-diagram.pdf -------------------------------------------------------------------------------- /src/figs/implem--api-diagram.pdf_tex: -------------------------------------------------------------------------------- 1 | %% Creator: Inkscape 1.2 (dc2aedaf03, 2022-05-15), www.inkscape.org 2 | %% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010 3 | %% Accompanies image file 'implem--api-diagram.pdf' (pdf, eps, ps) 4 | %% 5 | %% To include the image in your LaTeX document, write 6 | %% \input{.pdf_tex} 7 | %% instead of 8 | %% \includegraphics{.pdf} 9 | %% To scale the image, write 10 | %% \def\svgwidth{} 11 | %% \input{.pdf_tex} 12 | %% instead of 13 | %% \includegraphics[width=]{.pdf} 14 | %% 15 | %% Images with a different path to the parent latex file can 16 | %% be accessed with the `import' package (which may need to be 17 | %% installed) using 18 | %% \usepackage{import} 19 | %% in the preamble, and then including the image with 20 | %% \import{}{.pdf_tex} 21 | %% Alternatively, one can specify 22 | %% \graphicspath{{/}} 23 | %% 24 | %% For more information, please see info/svg-inkscape on CTAN: 25 | %% http://tug.ctan.org/tex-archive/info/svg-inkscape 26 | %% 27 | \begingroup% 28 | \makeatletter% 29 | \providecommand\color[2][]{% 30 | \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% 31 | \renewcommand\color[2][]{}% 32 | }% 33 | \providecommand\transparent[1]{% 34 | \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% 35 | \renewcommand\transparent[1]{}% 36 | }% 37 | \providecommand\rotatebox[2]{#2}% 38 | \newcommand*\fsize{\dimexpr\f@size pt\relax}% 39 | \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}% 40 | \ifx\svgwidth\undefined% 41 | \setlength{\unitlength}{1447.96224976bp}% 42 | \ifx\svgscale\undefined% 43 | \relax% 44 | \else% 45 | \setlength{\unitlength}{\unitlength * \real{\svgscale}}% 46 | \fi% 47 | \else% 48 | \setlength{\unitlength}{\svgwidth}% 49 | \fi% 50 | \global\let\svgwidth\undefined% 51 | \global\let\svgscale\undefined% 52 | \makeatother% 53 | \begin{picture}(1,0.27441918)% 54 | \lineheight{1}% 55 | \setlength\tabcolsep{0pt}% 56 | \put(0,0){\includegraphics[width=\unitlength,page=1]{implem--api-diagram.pdf}}% 57 | \put(0.00754313,0.06049141){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15264786\unitlength}\centering \figgen\end{minipage}}}% 58 | \put(0.22565368,0.06049141){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15264786\unitlength}\centering \figpp\end{minipage}}}% 59 | \put(0.46973897,0.06049141){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.12907547\unitlength}\centering \figprover\end{minipage}}}% 60 | \put(0.67953939,0.06049141){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.09307151\unitlength}\centering \figproof\end{minipage}}}% 61 | \put(0.28090917,0.25464024){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15264786\unitlength}\centering \figwitness\end{minipage}}}% 62 | \put(0.28090917,0.17754144){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15264786\unitlength}\centering \figinstance\end{minipage}}}% 63 | \put(0,0){\includegraphics[width=\unitlength,page=2]{implem--api-diagram.pdf}}% 64 | \put(0.85718002,0.06049141){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.12907547\unitlength}\centering \figverifier\end{minipage}}}% 65 | \put(0,0){\includegraphics[width=\unitlength,page=3]{implem--api-diagram.pdf}}% 66 | \put(0.00327762,0.22356208){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15264786\unitlength}\centering \figlang\end{minipage}}}% 67 | \put(0,0){\includegraphics[width=\unitlength,page=4]{implem--api-diagram.pdf}}% 68 | \put(0.84445978,0.25464024){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15264786\unitlength}\centering \figoutput\end{minipage}}}% 69 | \put(0,0){\includegraphics[width=\unitlength,page=5]{implem--api-diagram.pdf}}% 70 | \end{picture}% 71 | \endgroup% 72 | -------------------------------------------------------------------------------- /src/figs/implem--api-diagram.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/src/figs/implem--api-diagram.svgz -------------------------------------------------------------------------------- /src/figs/mindmap-IT-proof-systems-src.tex: -------------------------------------------------------------------------------- 1 | %%% Mindmap of Information Theoretical Proof systems, useful for ZKP paradigms 2 | %%% Luis Brandao: initial latex code 2020-Dec--2022-April 3 | %%% Revised with Daniel Benarroch and Eran Tromer 4 | %%% Keywords suggested by Yuval Ishai (2020-Dec) 5 | %%% License: ZKProof @ CC-BY 4.0 --- Creative Commons Attribution 4.0 International 6 | 7 | %%% Update LB 2022-July: hyperlinks added (will override the tooltips), line numbers added (incomplete code to control horizontal spacing per node) 8 | 9 | \begingroup 10 | 11 | %%% Definitions used for legend and tooltips 12 | 13 | \def\extILC{Ideal Linear Commitment} 14 | \def\extIOP{Interactive Oracle Proof} 15 | \def\extIP{Interactive Proof} 16 | 17 | \def\extIT{Information Theoretic} 18 | 19 | \def\extQAP{Quadratic Arithmetic Program} 20 | \def\extQSP{Quadratic Span Program} 21 | \def\extSSP{Square Span Program} 22 | \def\extPCP{Probabilistic Checkable Proof} 23 | \def\extMPC{[Secure] Multi-Party Computation} 24 | \def\extVOLE{Vector Oblivious Linear Evaluation} 25 | \def\extZKP{Zero-Knowledge Proof} 26 | 27 | 28 | %%% Styles for various levels os nodes 29 | \newcommand{\styA}[1]{\scalebox{4}{\textbf{\subtab{#1}}}} 30 | \newcommand{\styB}[1]{\scalebox{2.75}{\textbf{\subtab{#1}}}} 31 | \newcommand{\styC}[1]{\scalebox{2}{\textbf{\subtab{#1}}}} 32 | \newcommand{\styD}[1]{\scalebox{1.5}{\textbf{\subtab{#1}}}} 33 | 34 | 35 | %\renewcommand{\pdftooltip}[2]{#1} 36 | 37 | \let\hyperrefA\hyperref 38 | \newcommand{\hyperrefB}[2][]{#2} 39 | 40 | 41 | %%% Central node 42 | \def\ZKP{\pdftooltip{ZKP}{Zero-Knowledge Proof}} 43 | \def\ITproofs{\styA{\rule{0em}{1.5em}\hyperrefA[paradigms:IT]{\subtab{\pdftooltip{IT}{\extIT} Proof\\Systems}}\\for \ZKP{}s}} 44 | 45 | 46 | %%% 1st order nodes 47 | \def\ILC{\styB{\pdftooltip{\hyperrefA[paradigms:IT:ILC]{ILC}}{Ideal Linear Commitment}}} 48 | \def\IOP{\styB{\pdftooltip{\hyperrefA[paradigms:IT:IOP]{IOP}}{\extIOP}}} 49 | \def\LIOP{\styB{\pdftooltip{\hyperrefA[paradigms:IT:linear-IOP]{\subtab{Linear\\IOP}}}{Linear \extIOP}}} 50 | \def\PCP{\styB{\pdftooltip{\hyperrefA[paradigms:IT:PCP]{PCP}}{\extPCP}}} 51 | \def\LPCP{\styB{\pdftooltip{\hyperrefA[paradigms:IT:linear-PCP]{\subtab{Linear\\PCP}}}{Linear \extPCP}}} 52 | \def\MiTH{\styB{\pdftooltip{\hyperrefA[paradigms:IT:MPC-in-the-head]{\subtab{MPC in\\the head}}}{[Secure] Multi-Party Computation in the Head}}} 53 | 54 | 55 | %%% 2nd order nodes 56 | \def\IPbased{\styC{\pdftooltip{\hyperrefA[paradigms:IT:linear-IOP:IP-based]{IP based}}{\extIP\ based}}} 57 | \def\PolyIOP{\styC{\pdftooltip{\hyperrefA[paradigms:IT:linear-IOP:polynomial-IOP]{\subtab{Polynomial\\IOP}}}{Polynomial \extIOP}}} 58 | \def\FLIOP{\styC{\pdftooltip{\hyperrefA[paradigms:IT:linear-IOP:fully-linear-IOP]{\subtab{Fully Linear\\IOP}}}{Fully-linear \extIOP}}} 59 | 60 | \def\HadBased{\styC{\hyperrefA[paradigms:IT:linear-PCP:hadamard]{\subtab{Hadamard\\based}}}} 61 | \def\LinePoint{\styC{\hyperrefA[paradigms:IT:linear-PCP:line-point]{\subtab{Line-Point}}}} 62 | \def\FLPCP{\styC{\pdftooltip{\hyperrefA[paradigms:IT:linear-PCP:fully-linear]{\subtab{Fully Linear\\PCP}}}{Fully-linear \extPCP}}} 63 | \def\QAP{\pdftooltip{QAP}{\extQAP}} 64 | \def\QSP{\pdftooltip{QSP}{\extQSP}} 65 | \def\SSP{\pdftooltip{SSP}{\extSSP}} 66 | \def\FromQAPQSPSSP{\styC{\hyperrefA[paradigms:IT:linear-PCP:from-QAP]{\subtab{From \QAP/\\\QSP/\SSP}}}} 67 | 68 | \def\ClassThreeCol{\styC{\hyperrefA[paradigms:IT:PCP:3-col]{\subtab{Classical\\3-coloring\\proof}}}} 69 | \def\FromPCPTheo{\styC{\pdftooltip{\hyperrefA[paradigms:IT:PCP:from-PCP-theorem]{\subtab{From PCP\\theorem}}}{From \extPCP\ theorem}}} 70 | 71 | \def\InterPCP{\styC{\pdftooltip{\hyperrefA[paradigms:IT:IOP:interactive-PCP]{\subtab{Interactive\\PCP}}}{Interactive \extPCP}}} 72 | \def\FRI{\styC{\pdftooltip{\hyperrefA[paradigms:IT:IOP:fast-RS-IOPP]{\subtab{Fast RS\\IOPP}}}{Fast Reed-Solomon \extIOP\ of Proximity}}} 73 | 74 | 75 | 76 | \newcounter{mylinenumberbeforefigure} 77 | \setcounter{mylinenumberbeforefigure}{\value{linenumber}} 78 | \addtocounter{mylinenumberbeforefigure}{-1} 79 | \newcounter{cntNumLinesInFig}\setcounter{cntNumLinesInFig}{0} 80 | \let\origthelinenumber\thelinenumber 81 | % \setlinenumbermargin{#1} 82 | % \renewcommand{\thelinenumber}{\hspace*{#1}\origthelinenumber} 83 | % \renewcommand{\thelinenumber}{\makebox[0pt][l]{\value{linunumber}\hspace{#1}}} 84 | \newlength{\myLNhorizoffset} 85 | \setlength{\myLNhorizoffset}{-1.5em} 86 | 87 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 88 | \nolinenumbers 89 | % LNO: line number ordering --- function that will (manually) inform the line number of each node 90 | \newcommand{\LNO}[2][0pt]{\stepcounter{cntNumLinesInFig} 91 | \setcounter{linenumber}{\value{mylinenumberbeforefigure}} 92 | \addtocounter{linenumber}{#2} 93 | \setlength{\myLNhorizoffset}{#1}} 94 | \begin{figure}[H]\centering % !htb 95 | \def\tmpfigcap{Various IT proof systems} 96 | \refstepcounter{figure}\label{fig:it-mindmap}% 97 | \hypertarget{ht:figure:\thefigure}{} 98 | \addcontentsline{lof}{figure}{Figure~\thefigure{}: \tmpfigcap} 99 | \nolinenumbers 100 | \bookmarksetup{level=3,color=\colorbkmfig} 101 | \bookmark[dest=ht:figure:\thefigure]{Figure~\thefigure}% 102 | 103 | \begingroup %% begin scope for changed \thelinenumbers 104 | \let\tempthelinenumber\thelinenumber 105 | \nolinenumbers 106 | 107 | 108 | %\conditionalinternallinenumbers 109 | %https://tex.stackexchange.com/questions/281226/tikz-getting-angles-in-mindmaps-right 110 | \tikzset{grow cyclic list/.code={% 111 | \def\tikzgrowthpositions{{#1}}% 112 | \foreach \n [count=\i,remember=\i]in {#1}{}% 113 | \let\tikzgrowthpositionscount=\i% 114 | \tikzset{growth function=\tikzgrowcycliclist}}} 115 | \def\tikzgrowcycliclist{% 116 | \pgftransformshift{% 117 | \pgfpointpolar{\tikzgrowthpositions[mod(\the\tikznumberofcurrentchild-1,\tikzgrowthpositionscount)]}% 118 | {\the\tikzleveldistance}}} 119 | 120 | \makeatletter\tikzset{concept/.style={circle,draw=\tikz@concept@color,every concept}}\makeatother% 121 | \centering% 122 | 123 | 124 | % https://tikz.dev/tikz-shapes#section-nodes-multi 125 | \vspace{1em} 126 | %%%\centerline{\includegraphics[width=.9\textwidth]{figs/mindmap-IT-proof-systems.pdf}} %width tailored to fit subsequent paragraph 127 | \resizebox{.95\textwidth}{!}{\begin{tikzpicture}[rotate=+90, 128 | execute at begin node = {\conditionalinternallinenumbers\renewcommand{\thelinenumber}{\scalebox{3}{\makebox[0pt][l]{\hspace*{\myLNhorizoffset}\tempthelinenumber}}}} 129 | ] %%% if including legend and having margins .5in 130 | \path[mindmap, grow cyclic, text width=4.4in, every node/.style=concept, align=flush center, concept color=orange!40, fill={none}, 131 | %/.append style 132 | level 1/.style={text width=2.75in, level distance=6in, sibling angle=90, fill={none}}, 133 | level 2/.style={text width=2.33in, level distance=4.0in, sibling angle=45, fill={none}}, 134 | level 3/.style={text width=1.15in, level distance=2.75in, sibling angle=45, fill={none}}, 135 | %https://tex.stackexchange.com/questions/145991/inserting-special-border-to-tikz-mindmap 136 | marca/.append style={fill={none}}, outer sep=1pt 137 | ] 138 | 139 | %\setlength{\myLNhorizoffset}{-2.5em} 140 | %node[concept, append after command=\pgfextra{\setlength{\myLNhorizoffset}{-5em}}] {\LNO[4em]{10}\ITproofs} %% \LNO[-1em]{10} 141 | node[concept] {\LNO[4em]{10}\ITproofs} %% \LNO[-1em]{10} 142 | %%%% 143 | child[grow=0, concept color=blue!30] { node (pcp) {\LNO{3}\PCP} %%% \setlength{\myLNhorizoffset}{-1.5em} 144 | child[grow=78] { node {\LNO{1}\ClassThreeCol}} 145 | child[grow=122] { node {\LNO{6}\FromPCPTheo}} %\zk-\PCP\\ 146 | } 147 | child[grow=80, concept color=brown!30] { node (mpchead) {\LNO{9}\MiTH} 148 | } 149 | child[grow=130, concept color=blue!30] { node (iop) {\LNO{14}\IOP} 150 | child[grow=70] { node (interactivepcp) {\LNO{12}\InterPCP}} 151 | child[grow=125] { node {\LNO{17}\FRI}} 152 | } 153 | child[grow=180, concept color=blue!30] { node (ilc) {\LNO{16}\ILC} 154 | } 155 | child[grow=245, concept color=brown!30] { node (lineariop) {\LNO{13}\LIOP} %color=teal!30 156 | child[grow=277] { node (FLIOP) {\LNO{11}\FLIOP}} 157 | child[grow=220.5] { node {\LNO{15}\PolyIOP}} 158 | child[grow=157] { node {\LNO{18}\IPbased}} 159 | } 160 | child[grow=-65, marca, concept color=brown!30] { node {\LNO{7}\LPCP} 161 | child[grow=30] { node {\LNO{4}\HadBased}} 162 | child[grow=-15] { node {\LNO{2}\FromQAPQSPSSP}} 163 | child[grow=-60] { node {\LNO{5}\LinePoint}} 164 | child[grow=-105] { node (FLPCP) {\LNO{8}\FLPCP}} 165 | }; 166 | 167 | 168 | %%% https://tex.stackexchange.com/questions/266983/adding-an-independent-small-node-in-a-mind-map 169 | \begin{pgfonlayer}{background} 170 | %\draw [left color=blue, right color=green!50!black, draw=white, decorate,decoration=circle connection bar] (mpchead) -- (pcp); 171 | \draw[dash pattern=on 16pt off 8pt,line width=3pt, brown!75] (mpchead) to[out=-50,in=180] (pcp); 172 | \draw[dash pattern=on 16pt off 8pt,line width=3pt, brown!75] (mpchead) -- (interactivepcp); 173 | \draw[dash pattern=on 16pt off 8pt,line width=3pt, brown!75] (FLPCP) -- (FLIOP); 174 | \draw[dash pattern=on 16pt off 8pt,line width=3pt, brown!75] (lineariop) -- (ilc); %to[out=160,in=-20] 175 | 176 | \end{pgfonlayer} 177 | 178 | \end{tikzpicture} 179 | } %% end of \restoline 180 | 181 | \endgroup %% end scope for changed \thelinenumbers 182 | 183 | \addtocounter{mylinenumberbeforefigure}{\value{cntNumLinesInFig}} 184 | \setcounter{linenumber}{\value{mylinenumberbeforefigure}} 185 | \stepcounter{linenumber} 186 | 187 | \vskip0pt 188 | \vspace{1.5em} 189 | \nolinenumbers 190 | \restoline{\begin{minipage}[t]{1.07\textwidth}\setlinenumbermargin{.4em}{}\conditionalinternallinenumbers 191 | \textbf{Legend:} 192 | \textbf{Fast RS IOPP} (aka FRI: Fast Reed-Solomon IOP of Proximity); 193 | \textbf{ILC} (\extILC); 194 | \textbf{IOP} (\extIOP); 195 | \textbf{IP} (\extIP); 196 | \textbf{IT} (\extIT); 197 | \textbf{MPC} (\extMPC); 198 | \textbf{PCP} (\extPCP); 199 | \textbf{QAP} (\extQAP); 200 | \textbf{QSP} (\extQSP); 201 | \textbf{SSP} (\extSSP); 202 | \textbf{ZKP} (Zero-Knowledge Proof). 203 | \end{minipage}} 204 | 205 | \conditionalinternallinenumbers % to get line number in caption of figure 206 | \vskip.75em\textbf{Figure \thefigure. }\tmpfigcap 207 | %%% \caption{\label{fig:it-mindmap}} 208 | \end{figure} 209 | 210 | \endgroup 211 | 212 | 213 | \linenumbers 214 | -------------------------------------------------------------------------------- /src/figs/mindmap-IT-proof-systems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/src/figs/mindmap-IT-proof-systems.pdf -------------------------------------------------------------------------------- /src/figs/zkproof-mindmap-it-proofs-20210425.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkpstandard/zkreference/7cef32a22ade18d22e7202905e213fde600d42de/src/figs/zkproof-mindmap-it-proofs-20210425.pdf -------------------------------------------------------------------------------- /src/figs/zz-99-include-mindmap-IT.tex: -------------------------------------------------------------------------------- 1 | \def\extILC{Ideal Linear Commitment} \def\ILC{\pdftooltip{ILC}{Ideal Linear Commitment}} 2 | \def\extIOP{Interactive Oracle Proof} \def\IOP{\pdftooltip{IOP}{\extIOP}} 3 | \def\extIP{Interactive Proof} \def\IP{\pdftooltip{IP}{\extIP}} 4 | \def\extIT{Information Theoretic} \def\IT{\pdftooltip{IT}{\extIT}} 5 | \def\extQAP{Quadratic Arithmetic Program} \def\QAP{\pdftooltip{QAP}{\extQAP}} 6 | \def\extQSP{Quadratic Span Program} \def\QSP{\pdftooltip{QSP}{\extQAP}} 7 | \def\extSSP{Square Span Program} \def\SSP{\pdftooltip{SSP}{\extSSP}} 8 | \def\extPCP{Probabilistically Checkable Proof} \def\PCP{\pdftooltip{PCP}{\extPCP}} 9 | \def\extMPC{[Secure] Multi-Party Computation} \def\MPC{\pdftooltip{MPC}{[Secure] Multi-Party Computation}} 10 | \def\extZKP{Zero-Knowledge Proof} \def\ZKP{\pdftooltip{ZKP}{Zero-Knowledge Proof}} 11 | \begin{figure}[!htb] 12 | \centerline{\includegraphics[width=.9\textwidth]{figs/mindmap-IT-proof-systems.pdf}} %width tailored to fit subsequent paragraph 13 | \vskip0pt 14 | \vspace{1.5em} 15 | \restoline{\begin{minipage}[t]{1.16\textwidth}\setlinenumbermargin{.4em}{}\conditionalinternallinenumbers 16 | \textbf{Legend:} 17 | \textbf{Fast RS IOPP} (aka FRI: Fast Reed-Solomon IOP of Proximity); 18 | \textbf{ILC} (\extILC); 19 | \textbf{IOP} (\extIOP); 20 | \textbf{IP} (\extIP); 21 | \textbf{IT} (\extIT); 22 | \textbf{MPC} (\extMPC); 23 | \textbf{PCP} (\extPCP); 24 | \textbf{QAP} (\extQAP); 25 | \textbf{QSP} (\extQSP); 26 | \textbf{SSP} (\extSSP); 27 | \textbf{ZKP} (\extZKP). 28 | \end{minipage}} 29 | 30 | \caption{\label{fig:it-mindmap}Various IT proof systems} 31 | \label{fig:IT} 32 | \end{figure} 33 | -------------------------------------------------------------------------------- /src/latex-editing.txt: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % Project context: ZKProof Community Reference (ZkpComRef) @ zkproof.org 3 | % Licence: Creative Commons Attribution 4.0 International (CC BY 4.0) 4 | 5 | 6 | %%%%%%%%%%%% THIS FILE: 7 | % Latest update: 2022-07-14 8 | % This file explains the folder structure, and how to compile the PDF file 9 | % Modifications: Please do not edit prior to talking with the ZKProof editors 10 | % This LaTeX project is open for collaboration under the ZKProof.org terms 11 | 12 | 13 | %%%%%% LOCAL COMPILATION: 14 | % The main file for compilation is zkpcomref.tex 15 | % Optimized for compilation with xetex 16 | % The bibliography is using biblatex and biber 17 | % Check that 'biber' is set as the processor working with biblatex 18 | % A Diff PDF file can be compiled using latexpand and latexdiff 19 | 20 | 21 | %%%%%%%%%%%% VERSIONS 22 | 23 | 24 | %%%%%% VERSION 0 25 | % Version 0 (2018-08-01) corresponds to documents in the proceedings of the 26 | % 1st ZKProof workshop, which included one document per workshop track 27 | % (security, implementation, applications) and the zkproof charter 28 | 29 | 30 | %%%%%% VERSION 0.1 31 | % Version 0.1 (2019-04-11) was a porting to LaTeX of the ZKProof docs 32 | % downloaded in Mar-2019 from https://zkproof.org/documents.html 33 | % The porting included editorial adjustments for indexation, consistency, etc. 34 | % The underlying content was authored by the ZKProof team/collaborators. 35 | 36 | 37 | %%%%%%% VERSION 0.2 38 | % Version 0.2 (2019-12-31) resulted from a more structured editorial process 39 | % It followed the PEC comments about version 0.1, the topics discussed in the 40 | % 2nd ZKProof workshop, and the creation of GitHub issues 41 | 42 | 43 | %%%%%%% VERSION 0.3 44 | % Version 0.3 (2022-07-18) resulted from various additions, including a 45 | % revision of the "Paradigms" chapter, with various new sections 46 | 47 | 48 | %%%%%%% Developing a new VERSION ..x 49 | % Version 0..x, where "x" is literal, is used to designate any compilation 50 | % of a version in progress after version 0. and before 0. 51 | 52 | 53 | %%%%%%% DIFF 54 | % Each new version may include commands \revblock[...][...]{...} or 55 | % \revblock[...]{...} to mark where a change has been made. These commands are 56 | % should be cleaned out of the LaTeX source at each new phase of contributions. 57 | % Their use can be found using the following regex (with recursion): 58 | % \\revblock((\[(?:[^][]+|(?1))*+\])*)(\{(?:[^}{]+|(?3))*+\}) 59 | 60 | % The Booleans boolShowFeedback and boolDiff in the compilation file are used 61 | % to say whether to print out the table of comments, and whether or not to 62 | % prepare the document for diffing. The later one will control the definition 63 | % of commands as \revblock and others 64 | 65 | 66 | %%%%%%%%%%%% FILE STRUCTURE 67 | % (let and be integers 1, 2, ...; let `L' be a letter A, B, ...) 68 | % 69 | % File "zkpcomref.tex": file for compilation 70 | % 71 | % Folder "zz-00-auxi-latex" 72 | % File "zz-00-y01-pkgs": loads LaTeX packages 73 | % File "zz-00-y02-cmds": custom commands with global applicability 74 | % File "zz-00-y02-cmds-diff": commands related to diff and cross-references 75 | % File "zz-00-y03-format": formatting configurations 76 | % File "zz-00-y04-metadata.tex": metadata, e.g., title, names, version # 77 | % 78 | % Folder "zz-00-frontmatter" 79 | % File "zz-00-frontmatter.tex": loads the files with content for the preamble 80 | % File "zz-00-z0-....tex": content for some section of the preamble 81 | % 82 | % Folders "zz-0-", where can be from: 83 | % "baseline", "paradigms", "implementation", "application" 84 | % File "zz-0-.tex": loads the content files for chapter 0 85 | % File "zz-0-z-.tex": content of section . 86 | % 87 | % Folder "zz-99-biblio", contains various bib files 88 | % File "zz-99-biblio-.bib": bibliographic references with a date 89 | % within the corresponding year range. The range is expressed as an interval, 90 | % (e.g., 2010-2017) or using a wild card (e.g., "19xx" meaning "1900-1999") 91 | % 92 | % Folder "zz-AA-backmatter": contains files for various appendices 93 | % File "zz-91-acks.tex" 94 | % File "zz--.tex: content for appendix (e.g., A or B) 95 | % 96 | % Folder "zz-ZZ-diff" 97 | % File "zzz-00-insert-comments.tex": preamble to the review comments 98 | % File "zzz-01-comments-on-v.tex": tables explaining the changes 99 | % 100 | % Folder "figs": contains files related to graphics/figures (pdf, svg, tex, png) 101 | 102 | 103 | %%%%%%%%%%%% WHERE TO ADD NEW CONTENT: 104 | % (let be an integer 1, 2, ...; let `L' be a letter A, B, ...) 105 | % - Load new packages: "zz-00-y01-pkgs.tex" ... using \usepackage{...} 106 | % - New commands with global applicability: zz-00-y02-cmds.tex 107 | % - New content in the preamble: new or existing "zz-00-z0-....tex" 108 | % - New chapter: new folder "zz-0-" and file "zz-0-.tex" 109 | % - New section in non-appendix chapter: new file zz-0-z-.tex 110 | % - New appendix: new file name zz-0-.tex inside "zz-AA-backmatter" 111 | % - Files with externally-generated figures: upload files to subfolder ./figs/ 112 | % - New bibliographic reference: bibtex entry inside one of the .bib files 113 | -------------------------------------------------------------------------------- /src/zkpcomref.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | %%%%%% Project: ZKProof Community Reference (CC BY 4.0 International 2018--2022) 3 | % Main source at https://github.com/zkpstandard/zkreference 4 | % This is the main compilation file 5 | % Compilation better tested with xetex 6 | % Read file "latex-editing.txt" for notes on integrating new content 7 | 8 | 9 | \documentclass[11pt,letterpaper,oneside]{report} 10 | 11 | %%% Adding to default paths the folders used for better file organization 12 | \makeatletter\def\input@path{{.}{./figs/}{./zz-00-auxi-latex/}% 13 | {./zz-00-frontmatter/}{./zz-01-baseline/}{./zz-02-paradigms/}% 14 | {./zz-03-implementation/}{./zz-04-applications/}% 15 | {./zz-99-biblio/}{./zz-AA-backmatter/}} 16 | \makeatother 17 | 18 | 19 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 20 | %%%%%% DEFINE WHICH VERSION TO COMPILE: Clean, ShowFeedback, Diff 21 | 22 | \usepackage{ifthen,etoolbox} 23 | \newcommand{\providesetbool}[2]{\providebool{#1}\setbool{#1}{#2}} 24 | 25 | % boolShowLineNumbers: `true' to show line numbers throughout the document 26 | \providesetbool{boolShowLineNumbers}{true} 27 | % boolShowFeedback: `true' to show table of proposed contributions and changes 28 | \providesetbool{boolShowFeedback}{false} 29 | % booldiff: `true' if preparing this for diffing with a previous version 30 | \providesetbool{boolDiff}{false} % if true, it forces boolShowFeedback to true 31 | 32 | 33 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 34 | %%%%%% LOAD PRELIMINARY DEFINITIONS 35 | 36 | \input{zz-00-y01-pkgs.tex} 37 | \input{zz-00-y02-cmds.tex} 38 | \input{zz-00-y02-cmds-diff.tex} 39 | \input{zz-00-y03-format.tex} 40 | \input{zz-00-y04-metadata.tex} 41 | \graphicspath{{}{figs/}{figs/from-EB-20210422/}} 42 | 43 | \ifbool{boolShowLineNumbers}{\linenumbers}{\renewcommand{\thelinenumber}{}} 44 | 45 | \hbadness=10000 %%% temporary hack to suppress ``Underfull \hbox'' warnings 46 | \hfuzz=1.00pt %% supress \hbox overfull warnings when it's for less than 1.0 pt 47 | 48 | 49 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 50 | %%% Load files with bibliographic references 51 | \addbibresource{zz-99-biblio/zz-99-biblio-19xx.bib} 52 | \addbibresource{zz-99-biblio/zz-99-biblio-200x.bib} 53 | \addbibresource{zz-99-biblio/zz-99-biblio-2010-2017.bib} 54 | \addbibresource{zz-99-biblio/zz-99-biblio-2018-2020.bib} 55 | \addbibresource{zz-99-biblio/zz-99-biblio-2021-2022.bib} 56 | \addbibresource{zz-99-biblio/zz-99-biblio-zkproof.bib} 57 | 58 | 59 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 60 | \begin{document} 61 | 62 | %%%%%%%%%%%%%%%%%%%%%%%%%% FRONT MATTER 63 | \ignoreDiff{\ifbool{boolDiff}{\input{zz-00-z00-precover-diff.tex}}% 64 | {\ifbool{boolShowFeedback}{\input{zz-00-z00-precover-ref-changes.tex}}{}}} 65 | 66 | \input{zz-00-frontmatter} 67 | 68 | %%%%%%%%%%%%%%%%%%%%%%%%%% MAIN MATTER 69 | \renewcommand{\thesection}{\thechapter.\arabic{mysec}} 70 | 71 | \cleartooddpage\pagenumbering{arabic}\setcounter{page}{1} 72 | \thispagestyle{mainmatter}\pagestyle{mainmatter} 73 | 74 | \begingroup 75 | \input{zz-01-baseline.tex} 76 | \cleartooddpage\input{zz-02-paradigms.tex} 77 | \cleartooddpage\input{zz-03-implem.tex} 78 | \cleartooddpage\input{zz-04-apps.tex} 79 | 80 | \cleartooddpage\thispagestyle{acks}\pagestyle{acks} 81 | \input{zz-91-acks.tex} 82 | \endgroup 83 | 84 | 85 | \cleartooddpage\pagestyle{references}\thispagestyle{references} 86 | \phantomsection\chapter*{References}\addcontentsline{toc}{chapter}{References} 87 | % \bibitemsep: %% tweak between 0.4 and 0.7 for better fit in last page 88 | \setlength{\bibitemsep}{0.6\baselineskip} 89 | \label{references}{\small\printbibliography[heading=none]} 90 | 91 | 92 | %%%%%%%%%%%%%%%%%%%%%%%%%% BACK MATTER 93 | \cleartooddpage\pagestyle{appendix}\thispagestyle{appendix} 94 | 95 | \appendix 96 | \begingroup\setstretch{.94} %temporary tweak to allow ending in even page 97 | \input{zz-A-abbrevs.tex}\endgroup 98 | 99 | \clearpage\input{zz-B-version-history.tex} 100 | 101 | \cleartooddpage\thispagestyle{empty} 102 | 103 | 104 | %%%%%%%%%%%%%%%%%%%%%%%%%% TABLE OF CHANGES/CONTRIBUTIONS 105 | \ifbool{boolShowFeedback}{\ignoreDiff{ 106 | \nolinenumbers %disable line numbering 107 | \input{zzz-00-insert-comments.tex} 108 | %Insert here tables of review comments (for cross-referencing changes) 109 | \input{zzz-01-changes-to-v0.1--1-by-editors.tex} 110 | \input{zzz-01-changes-to-v0.1--2-by-contributors.tex} 111 | }}{} 112 | 113 | \end{document} 114 | -------------------------------------------------------------------------------- /src/zz-00-auxi-latex/zz-00-y01-pkgs.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | %%%%%%%%%%%% Packages 3 | 4 | \usepackage{iftex} %%%provides commands: \ifPDFTeX, \ifXeTeX, and \ifLuaTeX 5 | 6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7 | %%%%%% Font related 8 | 9 | \ifPDFTeX 10 | \usepackage[utf8]{inputenc} 11 | \usepackage{bold-extra} % if using PdfTeX, allows bold small caps when compiling with PdfTex?, e.g., {\bfseries\textsc Changed:} 12 | \usepackage{cmap} 13 | \pdfsuppresswarningpagegroup=1 \pdfcompresslevel=9 \pdfminorversion=8 \pdfobjcompresslevel=9 14 | \fi 15 | 16 | \ifXeTeX\else %i.e., if PdfTex or LuaLaTeX 17 | \usepackage[T1]{fontenc} % does it ensure that undirected double-quotes remain undirected 18 | \usepackage{microtype} % Produces warning, if using LuaLaTeX, about overwriting function `keepligature' 19 | \fi 20 | 21 | \usepackage{lmodern} 22 | 23 | \usepackage{amsfonts} % allows \mathbb 24 | \usepackage{amsmath} % Or mathtools, %for environment aligned 25 | 26 | \usepackage{amsthm} %%% Packages theorem and amsthm clash in the definition of \theoremstyle 27 | %\usepackage{theorem} %allows simple definition of new theorem-like environments, e.g., 'remark' 28 | 29 | \usepackage{amssymb} % allows \mathbb{F} 30 | \usepackage{textcomp} %allows \textrightarrow (arrow in text mode) 31 | \usepackage{bm} %command \bm allows bold math 32 | 33 | %\usepackage{lmodern} %used by default? 34 | %%%\usepackage{times} %newtxtext has font simultaneously bold and small caps 35 | %\usepackage{newtxtext,newtxmath} %newtxtext,newtxmath %package `newtxtext' is incompatible with package `textcomp' 36 | \usepackage{anyfontsize} %allows command \fontsize{size}{skip} 37 | 38 | %if using XeTeX or LuaLaTeX, the compilation might be unable to use font simultaneously bold and small caps (see command \Chan) 39 | 40 | \usepackage[normalem]{ulem} %allows command \sout for strikethrough text 41 | %option normalem makes the \emph{} command remain untouched. Needed to get correctly formatted refs 42 | 43 | \usepackage{textgreek} % allows \textSigma 44 | 45 | \ifPDFTeX\else\usepackage{polyglossia}\setmainlanguage{english}\fi 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | %%%%%% Page and Geometry related 49 | 50 | %%% \usepackage{geometry} % may be needed to call \newgeometry later on 51 | \usepackage[margin=1in]{geometry} %%% \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry} 52 | 53 | %%% The package typearea will redefine the following lengths: 54 | \newcommand{\newsetlength}[2]{\newlength{#1}\setlength{#1}{#2}} 55 | \newsetlength{\oldtopmargin}{\topmargin} 56 | \newsetlength{\oldheadheight}{\headheight} 57 | \newsetlength{\oldoddsidemargin}{\oddsidemargin} 58 | \newsetlength{\oldevensidemargin}{\evensidemargin} 59 | \newsetlength{\oldtextwidth}{\textwidth} 60 | \newsetlength{\oldtextheight}{\textheight} 61 | 62 | 63 | \usepackage{silence} %useful to silence some harmless/unavoidab warnings 64 | %\WarningFilter{typearea}{Bad type area settings!} 65 | %\WarningFilter*{geometry}{Over-specification in } 66 | 67 | %\usepackage[usegeometry]{typearea} % needed to change to landscape in the middle of the document 68 | %option `usegeometry' enables the correct resizing of text area when adding pages in landscape mode 69 | 70 | 71 | \setlength{\topmargin}{\oldtopmargin} 72 | \setlength{\headheight}{\oldheadheight} 73 | \setlength{\oddsidemargin}{\oldoddsidemargin} 74 | \setlength{\evensidemargin}{\oldevensidemargin} 75 | \setlength{\textwidth}{\oldtextwidth} 76 | \setlength{\textheight}{\oldtextheight} 77 | 78 | 79 | \usepackage{setspace} %\setstretch{1}, %\setstretch{1.25} 80 | 81 | \usepackage{pdflscape} %alllows landscape environment with automatic rotation of the page %for use when integrating with other documents 82 | \usepackage{afterpage} 83 | 84 | \usepackage{fancyhdr}\renewcommand{\headrulewidth}{0pt} 85 | 86 | %https://tex.stackexchange.com/questions/59785/how-to-execute-command-on-every-table-column 87 | %\usepackage{collcell} %command \collectcell\function and \endcollectcell to apply a function to a cell 88 | 89 | 90 | 91 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 92 | %%%%%% Diverse packages 93 | 94 | \usepackage{comment} 95 | 96 | %%% biblatex: Some options need to be called when loading. Others can be called later with \ExecuteBibliographyOptions 97 | \usepackage[backend=biber,style=alphabetic,citestyle=alphabetic]{biblatex} 98 | 99 | \usepackage{twoopt} %allows \newcommandtwoopt to define commands with two optional arguments 100 | %\newcommandtwoopt{cmdname}[num][default1][default2]{actions} 101 | 102 | \usepackage{multicol} 103 | 104 | %%%https://tex.stackexchange.com/questions/69595/marginnote-always-on-right-side-of-the-page 105 | %% make the margin always appear on the right side if using the twocol option of the documentclass `article' 106 | %% \makeatletter 107 | %% \patchcmd{\@addmarginpar}{\ifodd\c@page}{\ifodd\c@page\@tempcnta\m@ne}{}{} 108 | %% \makeatother 109 | %% \reversemarginpar 110 | 111 | \usepackage[sf,bf]{titlesec} % the sf option makes all headings be with sans serif 112 | 113 | \usepackage{enumitem} %allows command \setlist, e.g., \setlist[itemize]{leftmargin=1em} 114 | 115 | 116 | 117 | \usepackage{graphicx,color} 118 | \usepackage{xcolor} 119 | \definecolor{urldocblue}{RGB}{17,85,204} 120 | \definecolor{ongoingred}{RGB}{224,102,102} 121 | \definecolor{darkblue}{RGB}{0,0,191} 122 | 123 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 124 | %%%%%% Related to Tables 125 | 126 | \usepackage{caption} 127 | \captionsetup[table]{skip=10pt,labelfont=bf} 128 | 129 | \usepackage{diagbox} %allows command \diagbox to indicate the label for rows and columns in a single cell 130 | 131 | %% Option longtable when loading package lineno leads to LaTeX Warning: Command \LT@start has changed. So I'll simply call longtable later 132 | \usepackage[edtable,mathlines]{lineno} % LB: the command \linenumbers will be conditionally called depending on boolShowLineNumbers, because \thelinenumber will be conditionally changed across the document, when inside tabular and minipage environments 133 | \usepackage{edtable} 134 | \usepackage{longtable} %environment longtable replaces tabular, and no need to wrap it within table 135 | %allows table to break across pages; allows command \endhead to define what rows to repeat 136 | 137 | \usepackage{colortbl} %allows coloring of rows (using \rowcolor) and columns in tabular 138 | \definecolor{colorRowHead}{rgb}{0.95,0.95,0.95} 139 | 140 | \usepackage{array} % for extended column definitions % allows using >{...} and <{...} in specifying columns 141 | 142 | \usepackage{booktabs,multirow} 143 | \usepackage{float} %allows option H for floats, e.g., \begin{table}[H], which is stronger than \begin{table}{!h} 144 | 145 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 146 | %%%%%% Related to comments, counters and hyper-references 147 | 148 | \usepackage{pdfcomment} % clashes with dtrt, so removed the latter 149 | % pdfcomment: when compiling a pdfcomment using xetex or lualatex, the opening of the PDF file in a fresh instance of the reader complains about a missing font: "Cannot extract the embedded font `......+LMSans10--Bold-Identity-H'. Some characters may not display or print correctly" 150 | \usepackage{attachfile2} 151 | 152 | \PassOptionsToPackage{hyphens}{url} %% allow urls to break the line 153 | \usepackage{cleveref} 154 | \usepackage[all]{hypcap} 155 | 156 | \usepackage{assoccnt} 157 | \newcounter{mysec}[chapter] 158 | \DeclareAssociatedCounters{section}{mysec} 159 | 160 | \usepackage{tocloft} %command \setcounter{tocdepth}{1}, also allows creating other lists 161 | \usepackage{shorttoc} 162 | 163 | \usepackage{bookmark}\bookmarksetup{startatroot} 164 | \bookmarksetup{open,addtohook={\ifnum\bookmarkget{level}=0 \bookmarksetup{bold}\fi}} 165 | 166 | 167 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 168 | %%%%%% Create diagrams 169 | 170 | \usepackage{tikz} 171 | \usetikzlibrary{mindmap,backgrounds} %https://www.overleaf.com/learn/latex/LaTeX_Graphics_using_TikZ:_A_Tutorial_for_Beginners_(Part_5)%E2%80%94Creating_Mind_Maps 172 | -------------------------------------------------------------------------------- /src/zz-00-auxi-latex/zz-00-y02-cmds-diff.tex: -------------------------------------------------------------------------------- 1 | %%% This file: defines commands and counters useful for cross-referencing feedback notes and corresponding changes 2 | 3 | \newcommand{\ignoreDiff}[1]{#1} % To mark areas to be ignored by the diff operation 4 | \ifbool{boolDiff}{\setbool{boolShowFeedback}{true}}{} 5 | \ifbool{boolShowFeedback}{}{\newcommandtwoopt{\revblock}[3][][]{}} 6 | 7 | 8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 9 | %%% COMMANDS FOR LEAVING PDF COMMENTS (e.g., POPUP ANNOTATIONS) 10 | 11 | %%% Editorial note: All pop-up commands (introduced in version 0.1 as part of porting 12 | % content to LaTeX) were disabled when finalizing version draft 0.2; will later 13 | % address/collect these notes as suggestions for an upcoming revised version 14 | 15 | \newcommand{\popupColor}[3][blue]{\pdfcomment[color=#1,opacity=0.5,author={#2}]{#3}} 16 | \renewcommand{\popupColor}[3][blue]{} %%% Disabling popup annotations, rendering ineffective some commands below 17 | \newcommand{\suggest}[2][]{\popupColor[blue]{#1}{Suggestion: #2}} 18 | \newcommand{\edited}[2][]{\popupColor[green]{#1}{Edited: #2}} 19 | \newcommand{\smttodo}[2][]{\popupColor[red]{#1}{To-do: #2}} 20 | 21 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 22 | %%%%% MARK EDIT/REVISION BLOCKS 23 | \def\letterEditBlock{E} % E for edit; could also have been R for revision 24 | \newcounter{cntRev}\renewcommand{\thecntRev}{\letterEditBlock\arabic{cntRev}} 25 | \providecommandtwoopt{\revblock}[3][][0pt]{\marginnote{\hspace*{#2}\resizebox{.85in}{!}{{\normalsize\normalfont\color[rgb]{1,0,0}% 26 | \begin{minipage}{1.1in}\vspace{0em}\refstepcounter{cntRev}% 27 | \ifNotEmpty{#1}{\label{#1}} %adds a labels to the review edit 28 | \thecntRev\ifNotEmptyPrepend{#3}{: } 29 | \end{minipage}}}}} 30 | \providecommandtwoopt{\revblockmini}[3][][]{{\scriptsize}} 31 | %\renewcommand{\revblock}[2][]{} % Uncomment this line to get ride of all margin notes 32 | %\newcommand{\revblockRight}[3][]{} %%% to delete in favor of using \revblock with the second optional argument 33 | 34 | 35 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 36 | %%%%%% Colors 37 | \providecommand{\blue}[1]{{\color[rgb]{0,0,1}#1}} 38 | \providecommand{\red}[1]{{\color[rgb]{1,0,0}#1}} 39 | \providecommand{\dgreen}[1]{{\color[rgb]{0,.33,0}#1}} 40 | \definecolor{mycoral}{rgb}{.9,.333,.2000} 41 | \definecolor{brown}{rgb}{0.6,0.3,0} 42 | \definecolor{LLgray}{rgb}{0.9,0.9,0.9} 43 | \definecolor{LLyellow}{rgb}{1,1,.8} 44 | \definecolor{darkgreen}{rgb}{0,0.5,0} 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | %%%%%% Abbreviation commands that show some color-highlighted header within an item 49 | %%% \Note, \Chan, \NoChan, etc. are useful prefix commands for the descriptive comments in the column ``Context and Changes'' 50 | \providesetbool{boolNeedNewLineBeforeChan}{false} %boolNeedNewLineBeforeChan: true after using \Note; becomes false when using \rowendL 51 | \newcommand{\Note}{\ifbool{boolNeedNewLineBeforeChan}{\newline}{}{\bfseries\textcolor{blue}{-- Note: }}\setbool{boolNeedNewLineBeforeChan}{true}} 52 | \newcommand{\Chan}{\ifbool{boolNeedNewLineBeforeChan}{\newline}{}{\bfseries\textcolor{mycoral}{-- Changed: }}\setbool{boolNeedNewLineBeforeChan}{true}} 53 | \newcommand{\NoChan}{\Chan\ No change.} 54 | \newcommand{\propContrib}{\ifbool{boolNeedNewLineBeforeChan}{\newline}{}{\bfseries\textcolor{blue}{-- Proposed contribution:} }} 55 | \newcommand{\contributors}{\ifbool{boolNeedNewLineBeforeChan}{\newline}{}{\bfseries\textcolor{darkgreen}{-- Contributors:} }\setbool{boolNeedNewLineBeforeChan}{true}} 56 | \newcommand{\submit}{\newline{\bfseries\textcolor{brown}{-- Submission mode:} }} 57 | \newcommand{\ccontext}{{\ifbool{boolNeedNewLineBeforeChan}{\newline}{}\bfseries\textcolor{blue}{-- Context:} }\setbool{boolNeedNewLineBeforeChan}{true}} 58 | \newcommand{\needscontributors}{\red{needs contributors}} 59 | 60 | 61 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 62 | 63 | \newcommand{\newcol}{&} 64 | \newcommand{\rowendL}{\end{minipage}\\\hline} %%%NEED TO COORDINATE WITH DEFINITION OF LAST COLUMN, currently using a minipage 65 | 66 | \def\colNamePropContrib{Contribution topic} 67 | \def\letterIndexPropContrib{C} 68 | \def\rowIssueName{\emph{short description}} 69 | 70 | \newcounter{cntItA} %counts the items sequentially: 1, 2, ..., 210 71 | \newcounter{cntContrib}\renewcommand{\thecntContrib}{\letterIndexPropContrib\arabic{cntContrib}} %Counts the contribution topic: D1, D2, ..., D7 ... 72 | \newcounter{cntItB}[cntContrib] %counts the item inside the Contribution: D1.1, D1.2, D1.3, D2.1, D2.2, .., D7.1, D7.2, ... 73 | \renewcommand{\thecntItB}{\thecntContrib.\arabic{cntItB}} 74 | 75 | 76 | % \inc... % increment some counter(s) 77 | \newcommandtwoopt{\incItem}[2][][]{% 78 | \refstepcounter{cntItA}\ifNotEmpty{#1}{\label{it:#1}}\thecntItA \newcol 79 | \refstepcounter{cntItB}\ifNotEmpty{#1}{\label{#1}} 80 | \ifNotEmptyElse{#2}{\def\itemPdfBkmExt{: #2}}{\def\itemPdfBkmExt{}} 81 | \pdfbookmark[3]{\thecntItB\itemPdfBkmExt}{pdfbkm:\thecntItB}\thecntItB \newcol } %incremment comment number 82 | 83 | 84 | 85 | %\newcommand{\tabhead}{\rowColorHeader\# & Ref & \centering \scalebox{.75}{\mycol{Location in\\initial draft}} & \centering Comment received & \scalebox{.75}{\mycol{Related\\items}} & \centering Reply notes & \begmin{.04}\scalebox{.8}{\mycol{Revie-\\wed?}}\myendmini} 86 | \setlength{\tabcolsep}{1ex} 87 | 88 | 89 | %Use of commands defined with optional arguments inside cells can break the workings of tabular 90 | %See complicated solution in https://tex.stackexchange.com/questions/277140/optional-argument-breaks-command-with-multicolumn 91 | %As a temporary solution, I'll just define all commands as mandatory 92 | %\newcommand{\headreviewer}[2]{\rowcolor{LLyellow}\incIssue[#1]\pdfbookmark[2]{\thecntContrib\ --- #2}{pdfbkm:\thecntContrib}\textbf{\thecntContrib} & Location & Comments from #2 & & & \rowend} 93 | 94 | 95 | %%% 96 | %\newcommandtwoopt[2][.320][.320]{\beginlongtabIssue}{% 97 | \newcommand{\beginlongtabIssue}{% 98 | \begin{longtable}{% 99 | |>{\begmin{.025}\centering}c<{\myendmini}% # 100 | |>{\begmin{.035}\centering}c<{\myendmini}% Ref 101 | |>{\begmin{.080}}c<{\myendmini}% Old location 102 | |>{\begmin{.320}}c<{\myendmini}% Comment / Issue 103 | |>{\begmin{.060}\centering}c<{\myendmini}% Related 104 | |>{\begmin{.320}}c<{\myendmini}% Reply notes / Notes about changes 105 | |>{\begmin{.050}\centering}c<{}|% Rev [in main document] 106 | % The last column needs to be ended explicitly with \rowend, which contains a \end{minipage} followed by \\ 107 | }% 108 | } 109 | 110 | 111 | 112 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 113 | \newcommand{\headerForIssue}{% 114 | \centering \# 115 | & \centering \scalebox{.7}{Item id} 116 | & \centering Location %Old location 117 | & \centering \textbf{\colNamePropContrib\ \thecntContrib}: \rowIssueName{} 118 | & \centering Related %\scalebox{.75}{\mycol{Related\\items}} 119 | & \centering Incorporated changes 120 | & \centering Edit id 121 | } 122 | 123 | 124 | \newcommand{\githubissue}[1]{\href{https://github.com/zkpstandard/zkreference/issues/#1}{GI#1}} 125 | 126 | 127 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 128 | %%%%%%%%%%% TO GENERATE A LIST OF COMMENTS/CONTRIBUTIONS 129 | 130 | %creates the file name zkproof-community-reference.loc with the index of contribution issues/items 131 | \newcommand\listcontributionname{List of Contributions} 132 | \newlistof{contribution}{loc}{\listcontributionname} %%%[section] 133 | \newlistof{contributions}{loc2}{\listcontributionname} % Duplicate on purpose 134 | 135 | 136 | 137 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 138 | %%% Each `issue' is a `longtable' (which can break pages) of comment/contribution items. 139 | %%% Each `issue' starts with \newIssue and ends with \myendIssue 140 | %%% Besides the automatic header, each row of the table will be an `item' introduced by command \incItem 141 | 142 | \newcommand{\newIssue}[2]{% 143 | \refstepcounter{cntContrib}\label{#1} 144 | \addcontentsline{loc}{contribution}{\thecntContrib: #2} %%% \colNamePropContrib\ 145 | \addcontentsline{loc2}{contributions}{\thecntContrib: #2} 146 | \renewcommand{\rowIssueName}{#2} 147 | \noindent\beginlongtabIssue\hline% 148 | \rowcolor{LLyellow} %must be the first command in the cell, namely before pdfbookmark 149 | \pdfbookmark[2]{\thecntContrib: \rowIssueName{}}{pdfbkm:\thecntContrib}% adds a pdf bookmark if this is the first header for this Issue 150 | \headerForIssue\rowend\hline\hline% 151 | \endfirsthead\hline% 152 | \rowcolor{LLgray}\headerForIssue\rowend\hline\hline% 153 | \endhead%ensures that all lines above this one will repeat as a header 154 | } 155 | 156 | \newcommand{\myendIssue}{\end{longtable}} 157 | -------------------------------------------------------------------------------- /src/zz-00-auxi-latex/zz-00-y03-format.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | %%%%%%%%%%%%%%%%%%%% Related to package titlesec 3 | 4 | \def\fontfamheads{\sffamily} %% font family type for headings: sans serif, serif, ... ... check the options when loading titlesec 5 | 6 | \titlespacing*{\chapter}{0pt}{-25pt}{2em} 7 | \titleformat{\chapter}[display]{\fontfamheads\huge\centering}{Chapter \thechapter.\enskip}{20pt}{\Huge} 8 | \titleformat{\chapter}[hang]{\fontfamheads\huge\bfseries}{\chaptertitlename\ \thechapter.}{.5em}{} 9 | \titlespacing{\subsubsection}{0pt}{1em}{0em} 10 | 11 | %%% Same font size as section header ? 12 | \renewcommand{\cfttoctitlefont}{\fontfamheads\bfseries\Large} 13 | \renewcommand{\cftloftitlefont}{\fontfamheads\bfseries\Large} 14 | \renewcommand{\cftlottitlefont}{\fontfamheads\bfseries\Large} 15 | 16 | \renewcommand\cftchapafterpnum{\vskip0pt} %spacing between items in toc 17 | \renewcommand\cftsecafterpnum{\vskip0pt} %spacing between items in toc 18 | 19 | 20 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 21 | %%%%%%%%%%%%%%%%%%%% \presection: 22 | % prints a centered and unnumbered section header, and adds the header to the table of contents 23 | % 2nd optional argument has default value `section' 24 | % e.g., \presection[short-section-name]{my-very-long-section-name} 25 | % e.g., \presection[short-subsection-name][subsection]{my-very-long-subsection-name} 26 | 27 | \newcommandtwoopt{\presection}[3][][section]{\phantomsection\section*{\centering #3}\ifEmptyElse{#1}{\addcontentsline{toc}{#2}{#3}}{\addcontentsline{toc}{#2}{#1}}} 28 | 29 | 30 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 31 | %%%%%%%%%%%% Vertical Spacing 32 | 33 | \setitemize{itemsep=0em} % requires \usepackage{enumitem} 34 | \setlist[itemize]{itemsep=.5ex, topsep=0pt} 35 | \setlist[enumerate]{itemsep=.5ex, topsep=0pt} 36 | 37 | \setlength{\parskip}{\medskipamount} 38 | \setlength{\parskip}{.75em} 39 | \setlength{\parindent}{0pt} 40 | 41 | %% Changing the paragraph command to automatically end with a dot, and so that it can include a label as an optional argument 42 | \let\originalparagraph\paragraph 43 | \renewcommand{\paragraph}[2][.]{\vskip0pt\vspace{-.5em}\originalparagraph{#2#1}} 44 | \renewcommand{\paragraph}[2][.]{{\fontfamheads\vskip.5em\noindent\textbf{#2#1}~}} %% similar to \paragraph, but without the extra vertical spacing 45 | 46 | \newcommand{\mypar}[1]{\paragraph{#1}\mbox{}\\\vspace{-1ex}} %%% paragraph whose label ends the line 47 | 48 | %%% \inpar: similar to a paragraph command, but without any extra vertical spacing 49 | \newcommand{\inpar}[2][.]{{\fontfamheads\vskip0pt\noindent\textbf{#2#1}~}} %% similar to \paragraph, but without the extra vertical spacing 50 | 51 | % \parhead: originally defined in package dtrt 52 | \providecommand{\parhead}[1]{\smallskip \noindent {\bfseries\boldmath\ignorespaces \dt@MaybeAddPunct{#1}}\hskip 0.9em plus 0.3em minus 0.3em \dt@ignorespacesandimplicitepars} 53 | 54 | \newcommand{\question}[1]{\subsection{#1}} 55 | \newcommand{\subquestion}[1]{\parhead{#1}} 56 | \newcommand{\subanswer}[1]{\parhead{#1}} 57 | 58 | 59 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 60 | %%%%%%%%%%%% Bookmarks and meta-bookmarks 61 | 62 | \setcounter{tocdepth}{3} % depth at which to show contents in the table of contents % needs package tocloft 63 | \setcounter{secnumdepth}{3} % to show numbering for subsubsections 64 | 65 | \hypersetup{ 66 | linktocpage, 67 | bookmarksnumbered,bookmarksopen,bookmarksdepth=3,bookmarksopenlevel=1, 68 | pdfdisplaydoctitle=true, 69 | pdfstartview={FitH}, % fits the width of the page to the window 70 | breaklinks=true, 71 | colorlinks=true,allcolors=darkblue 72 | } 73 | 74 | 75 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 76 | %%%%%%%%%%%%%%%%%%%% Related to headers, footers and the configuration related to package fancyhdr 77 | %use \ifoddeven to define different headers between odd and even pages 78 | 79 | \renewcommand{\headrulewidth}{0pt} 80 | \setlength{\headheight}{13.6pt} 81 | 82 | %\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 83 | %\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} 84 | 85 | \renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter: #1}{}} 86 | \renewcommand{\sectionmark}[1]{\markright{\thesection~ #1}} 87 | 88 | 89 | \fancypagestyle{cnts}{\fancyhead{} 90 | \lhead{\ifoddeven{\zkpcomrefabbrev~\zkpcomrefversion}{}} % . \nouppercase{\leftmark} 91 | \rhead{\ifoddeven{}{Contents}} % \nouppercase{\rightmark} 92 | \cfoot{\thepage} 93 | } 94 | 95 | \fancypagestyle{exec-summ}{\fancyhead{} 96 | \lhead{\ifoddeven{\zkpcomrefabbrev~\zkpcomrefversion}{}} 97 | \rhead{\ifoddeven{}{Executive summary}} 98 | \cfoot{\thepage} 99 | } 100 | 101 | \fancypagestyle{mainmatter}{\fancyhead{} 102 | \lhead{\ifoddeven{\zkpcomrefabbrev~\zkpcomrefversion. \nouppercase{\leftmark}}{}} 103 | \rhead{\ifoddeven{}{Section \nouppercase{\rightmark}}} 104 | \cfoot{\thepage} 105 | } 106 | 107 | \fancypagestyle{acks}{\fancyhead{} 108 | \lhead{\ifoddeven{Acknowledgments}{}} 109 | \rhead{\ifoddeven{}{Acknowledgments}} 110 | \cfoot{\thepage}} 111 | 112 | \fancypagestyle{references}{\fancyhead{} 113 | \lhead{\ifoddeven{References}{}} 114 | \rhead{\ifoddeven{}{References}} 115 | \cfoot{\thepage}} 116 | 117 | \fancypagestyle{appendix}{\fancyhead{} 118 | \lhead{\ifoddeven{\zkpcomrefabbrev~\zkpcomrefversion. Appendix \nouppercase{\leftmark}}{}} 119 | \rhead{\ifoddeven{}{Section \nouppercase{\rightmark}}} 120 | \cfoot{\thepage} 121 | } 122 | 123 | \def\intentionallyblank{\scalebox{1.5}{\color[rgb]{0.85,0.85,0.85}Page intentionally blank}} 124 | \def\raisedintblank{\smash{\raisebox{-3.5em}{\intentionallyblank}}} 125 | \fancypagestyle{intentionallyblank}{\fancyhead{}\chead{\smash{\raisebox{-3.5em}{\raisedintblank}}}\cfoot{}} 126 | 127 | \fancypagestyle{blankpagewithnumber}{\fancyhead{}\chead{\raisedintblank}\cfoot{\thepage}} %to avoid 128 | 129 | \newcommand\cleartooddpage{\clearpage\ifodd\value{page}\else 130 | %avoid the \rightmark of the `mainmatter' page style, but still include a page number 131 | \null\thispagestyle{blankpagewithnumber}\clearpage\fi} 132 | 133 | \fancypagestyle{empty}{\fancyhead{}\cfoot{}} 134 | 135 | 136 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 137 | %%%%%%%%%%%% Table of Contents and References 138 | 139 | \makeatletter 140 | \@ifpackageloaded{babel}{% 141 | %if using babel 142 | \addto\captionsenglish{% Replace "english" with the language you use %is using package `babel', must specify the language 143 | \renewcommand{\contentsname}{\phantomsection\pdfbookmark[2]{Table of Contents}{pdfbkm:toc}\label{toc:toc}Table of Contents} 144 | \renewcommand{\bibname}{\pdfbookmark[1]{References}{pdfbkm:refs}References} 145 | }% 146 | %%% \renewcommand{\refname} 147 | }% 148 | {% 149 | \renewcommand{\contentsname}{\phantomsection\pdfbookmark[2]{Table of Contents}{pdfbkm:toc}\label{toc:toc}Table of Contents}% 150 | \renewcommand{\bibname}{\pdfbookmark[1]{References}{pdfbkm:refs}References} 151 | } 152 | \makeatother 153 | 154 | 155 | 156 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 157 | %%%%%% FORMATTING of others 158 | 159 | %%% \topscite: citation to be used in places 160 | %\newcommand{\topscite}[1]{\texorpdfstring{\cite{#1}}{{\protect\NoHyper\cite{#1}\protect\endNoHyper}}} 161 | 162 | %\fboxmp: add an fbox, but the parameter will also be wrapped within a minipage. The optional arg is the width factor 163 | \newcommand{\fboxmp}[2][1]{\fbox{\begin{minipage}{#1\textwidth-2\fboxrule-2\fboxsep}#2\end{minipage}}} 164 | 165 | \newcommand\twodigits[1]{\ifnum#1<10 0#1\else #1\fi} 166 | \def\todayext{\ifcase\month\or 167 | January\or February\or March\or April\or May\or June\or 168 | July\or August\or September\or October\or November\or December\fi 169 | \space\twodigits{\number\day}, \number\year} 170 | 171 | 172 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 173 | %%%%%% Formatting related to bibliography 174 | 175 | 176 | %%% Options for biblatex ... could also be called when loading the package 177 | \ExecuteBibliographyOptions{sorting=anyt, % anyt: sorts by alphabetic label, name, year, title 178 | backref=true, % Search \renewbibmacro*{pageref} for the styling of back page references 179 | bibencoding=utf8,% 180 | dateabbrev=false,% 181 | giveninits=true,% 182 | isbn=false,url=false,% 183 | maxnames=10, %minnames=4, % %maxnames=99 184 | minbibnames=4,maxbibnames=99, 185 | minalphanames=5,maxalphanames=8, 186 | mincitenames=4,maxcitenames=10, 187 | } 188 | 189 | 190 | \DefineBibliographyStrings{english}{% 191 | backrefpage = {Cited on p.}, % 192 | backrefpages = {Cited on pp.} % 193 | } 194 | 195 | \DeclareListFormat{location}{} 196 | 197 | %%% LB: code to avoid indentation of lines after the first 198 | \setlength{\bibhang}{0em} 199 | \defbibenvironment{bibliography}% 200 | {\list{\printtext[labelalphawidth]{% 201 | %\printfield{prefixnumber}% 202 | \textbf{\printfield{labelalpha}}}} %\list 203 | {\setlength{\leftmargin}{\bibhang}% 204 | \setlength{\itemindent}{2.5em}% %-\leftmargin 205 | \setlength{\itemsep}{\bibitemsep}% 206 | \setlength{\parsep}{\bibparsep}}% 207 | %\renewcommand*{\makelabel}[1]{\hss##1}% 208 | } 209 | {\endlist} %\endlist 210 | {\item} %%%\makelabel{#1} 211 | 212 | %\patchcmd requires package etoolbox 213 | \patchcmd{\thebibliography}{\chapter*}{\section*}{}{} %will prevent the bibliography from breaking the page 214 | 215 | 216 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 217 | %%%%%% Microtyping to improve paragraph ending 218 | 219 | %%% \loosen (requires \usepackage{microtype}): uses microtype features to help prevent some line breaks in paragraphs. Does not currently work with xetex 220 | \def\loosen{\looseness=-1} 221 | 222 | %%% Luis B: command \xetexfontscale (as alternative to \loosen) for use with xetex, where the microtype package does not provide kerning or tracking, 223 | \ifPDFTeX\newcommand{\xetexfontscale}[2]{#2\loosen} 224 | \else 225 | \usepackage{anyfontsize,xfp} 226 | \makeatletter 227 | \newcommand{\xetexfontscale}[2]{\ifxetex\makeatother%\normalsize% Capture font definitions for \normalsize 228 | \xdef\f@size@normalsize{\f@size}% 229 | \xdef\f@baselineskip@normalsize{\f@baselineskip}% 230 | \fontsize{\fpeval{(\f@size@normalsize)*#1}}{\fpeval{(\f@baselineskip@normalsize)*#1}}\selectfont{}#2\fontsize{\fpeval{(\f@size@normalsize)}}{\fpeval{(\f@baselineskip@normalsize)}}\selectfont{}\else{}#2\fi} 231 | \makeatother 232 | \fi 233 | 234 | \renewcommand\linenumberfont{\normalfont\tiny\rmfamily} 235 | -------------------------------------------------------------------------------- /src/zz-00-auxi-latex/zz-00-y04-metadata.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | 3 | %%%%%%%% Metadata assumed constant across versions 4 | \def\zkpcomreftitle{ZKProof Community Reference} 5 | \def\zkpcomrefabbrev{ZkpComRef} 6 | \def\zkproofurl{https://zkproof.org} 7 | \def\zkpcomrefeditorsemail{editors@zkproof.org} 8 | \def\keywordslistsepsc{cryptography; interoperability; privacy, security; standards; zero-knowledge proofs} 9 | \def\keywordslistsepc{cryptography, interoperability, privacy, security, standards, zero-knowledge proofs} 10 | \def\ourOrganization{ZKProof} 11 | \def\ourSubject{zero-knowledge proofs} 12 | 13 | 14 | %%%%%% Metadata about current version 15 | \def\zkpcomrefversion{0.3} %% leave as 0.3.x when being "after 0.3 and before 0.4" 16 | \def\editorscurrversion{D.\ Benarroch, L.\ Brandão, M.\ Maller, and E.\ Tromer} % For bibtex editor field 17 | 18 | 19 | %%%%%% Persistent metadata about version 0 20 | \def\dateVersionZero{2018-08-01} 21 | \def\contributorsToVersionZero{% 22 | Shashank Agrawal, Tony Arcieri, 23 | Daniel Benarroch, Vipin Bharathan, Nir Bitansky, Sean Bowe, Benedikt Bünz, 24 | Ran Canetti, Angelo De Caro, Konstantinos Chalkias, Josh Cincinnati, Henry Corrigan-Gibbs, 25 | Joshua Daniel, Michael Dixon, Maria Dubovitskaya, 26 | Brett Hemenway Falk, 27 | Daniel Genkin, Nathan George, Shafi Goldwasser, Anuj Das Gupta, Jack Grigg, Jens Groth, Kobi Gurkan, 28 | Daira Hopwood, 29 | Yuval Ishai, 30 | Charanjit Jutla, 31 | Yael Kalai, Hugo Krawczyk, 32 | Jason Law, Anna Lysyanskaya, 33 | Zaki Manian, Andrew Miller, Eduardo Morais, 34 | Neha Narula, 35 | Rafail Ostrovsky, 36 | Gavin Pacini, Omer Paneth, Andrew Poelstra, 37 | Tal Rabin, Maryana Raykova, Jonathan Rouach, Ron Rothblum, 38 | Alessandra Scafuro, abhi shelat, Kartheek Solipuram, 39 | Eran Tromer, 40 | Mayank Varia, Muthu Venkitasubramaniam, Madars Virza, 41 | Riad S. Wahby, Douglas Wikstrom, Pieter Wuille, 42 | Aviv Zohar} 43 | 44 | 45 | %%%%%% Persistent metadata about version 0.1 46 | \def\dateVersionZeroDotOne{2019-04-11} 47 | \def\contributorsToVersionZeroDotOne{Luís Brandão, René Peralta, Angela Robinson} 48 | \def\editorsVersionZeroDorThree{Luís Brandão} 49 | 50 | %%%%%% Persistent metadata about version 0.2 51 | \def\dateVersionZeroDotTwo{2019-12-31} 52 | \def\editorsVersionZeroDotTwo{Daniel Benarroch, Luís Brandão, Eran Tromer} 53 | \def\contributorsToVersionZeroDotTwo{Daniel Benarroch, Luís Brandão, Yu Hang, Eduardo Morais, René Peralta, Angela Robinson, Justin Thaler, Eran Tromer, Ivan Visconti, Riad Wahby, Yupeng Zhang} 54 | 55 | 56 | %%%%%% Persistent metadata about version 0.3 57 | \def\dateVersionZeroDotThree{2022-07-17} 58 | \def\editorsVersionZeroDotThree{Daniel Benarroch, Luís Brandão, Mary Maller, Eran Tromer} 59 | \def\contributorsToVersionZeroDotThree{Daniel Benarroch, Luís Brandão, Yuval Ishai, Mary Maller, Justin Thaler, Eran Tromer} 60 | 61 | 62 | %%%%%% 63 | \hypersetup{ 64 | pdftitle = {\zkpcomreftitle}, 65 | pdfauthor = {\ourOrganization\ (Edited by \editorscurrversion)}, 66 | pdfsubject = {\ourSubject}, 67 | pdfkeywords = {\keywordslistsepsc}, 68 | pdfinfo = {PDF compilation date={\today}} 69 | } 70 | 71 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-frontmatter.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \pdfbookmark[0]{Front matter}{pdfbkm:frontmatter} 3 | \pagenumbering{Alph}\setcounter{page}{1}\thispagestyle{empty} 4 | \addtocontents{toc}{\vspace*{-2em}} 5 | \input{zz-00-z01-cover-page.tex} 6 | 7 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8 | \clearpage\ifodd\value{page}\else 9 | {\thispagestyle{empty}\centering\intentionallyblank\clearpage}\fi 10 | \pagenumbering{roman}\setcounter{page}{1} 11 | \input{zz-00-z02a-abstract.tex}\vfill 12 | \input{zz-00-z02b-this-version.tex} 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | \clearpage 16 | \addtocontents{section}{\vspace*{-5em}} 17 | \input{zz-00-z03-this-community-ref.tex} 18 | 19 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 20 | \begingroup 21 | \clearpage\setstretch{.98} % to fit in a single page 22 | \input{zz-00-z04a-charter.tex} 23 | \input{zz-00-z04b-ip-policy.tex} 24 | \endgroup 25 | 26 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 27 | 28 | \cleartooddpage 29 | % \thispagestyle{cnts}\pagestyle{cnts} 30 | \begingroup\setstretch{1.3} %% adjust for a nice fit of page breaks 31 | \input{zz-00-z05-contents.tex} 32 | \endgroup 33 | 34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 35 | \cleartooddpage 36 | \thispagestyle{exec-summ}\pagestyle{exec-summ} 37 | \input{zz-00-z06-exec-summary.tex} 38 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z01-cover-page.tex: -------------------------------------------------------------------------------- 1 | %\addcontentsline{toc}{section}{Cover} 2 | \pdfbookmark[1]{\zkpcomreftitle\ (cover)}{pdfbkm:cover}\label{prelim:cover} 3 | \begin{center} 4 | \vspace*{5em} 5 | {\bfseries\Huge\sffamily \zkpcomreftitle} 6 | 7 | \vspace{1em} \scalebox{1.15}{\sffamily Version \zkpcomrefversion} 8 | 9 | \vspace{2em} 10 | %%% 2019-Apr-11 %%% Version 0.1 11 | %%% 2019-Dec-19 %%% Version 0.2 12 | %%% 2022-Jul-12 %%% Version 0.3 13 | \todayext 14 | 15 | 16 | \vfill 17 | This document is a work in progress. 18 | 19 | Feedback and contributions are welcome. 20 | 21 | Find the latest version at \url{\zkproofurl}. 22 | 23 | Send your comments to \href{mailto:\zkpcomrefeditorsemail}{\zkpcomrefeditorsemail}. 24 | 25 | \vfill 26 | 27 | %%% To-do: get the logo in vectorial format 28 | \includegraphics[width=7.5em]{ZKProof-logo.png} 29 | 30 | \vspace{3em} 31 | \subtab{\includegraphics[width=15em]{by.pdf}\\[1ex] 32 | \def\urlccby{https://creativecommons.org/licenses/by/4.0/} 33 | \href{\urlccby}{Attribution 4.0 International (CC BY 4.0)}} 34 | 35 | \end{center} 36 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z02a-abstract.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \presection{Abstract} 3 | \label{sec:prelim:abstract} 4 | 5 | Zero-knowledge proofs enable proving mathematical statements while maintaining the confidentiality of supporting data. 6 | This can serve as a privacy-enhancing cryptographic tool in a wide range of applications, but its usability is dependent on secure, practical and interoperable deployments. 7 | This ZKProof Community Reference --- an output of the ZKProof standardization effort --- intends to serve as a reference for the development of zero-knowledge-proof technology. 8 | The document arises from contributions by the community and for the community. 9 | It covers theoretical aspects of definition and theory, as well as practical aspects of implementation and applications. 10 | 11 | \vspace{1.5em}\restoline{{\fontfamheads\textbf{Keywords:}}\pslabel{prelim:keywords} \keywordslistsepsc.} 12 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z02b-this-version.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \paragraph{About this version}\addcontentsline{toc}{section}{About this version}% 3 | \label{sec:prelim:about-this-version}\label{sec:prelim:msg-editors}% 4 | This is the version 0.3 of the ZKProof Community Reference. 5 | It results from many contributions, as described in the \hyperref[app:acknowledgments]{Acknowledgments}, in the \hyperref[app:version-history]{Version history}, and in the documentation of previous ZKProof workshops. 6 | While at a 0.$x$ version, this document should be considered as an incomplete draft, serving as a basis for further development. 7 | Reaching a future stable version requires additional revision and substantial contributions from the community. 8 | \loosen 9 | 10 | 11 | \def\ownciteversion{Version \zkpcomrefversion} 12 | \def\ownciteyear{2022} 13 | \def\owncitemonthNumber{7} 14 | \def\owncitemonthMMM{July} 15 | \def\owncitetag{\ownciteyear:zkproof:\zkpcomrefabbrev-\zkpcomrefversion} 16 | \def\ownciteauthor{ZKProof} 17 | \def\owncitetitle{\zkpcomreftitle} 18 | \def\owncitepublisher{zkproof.org} 19 | \def\owncitenote{Updated versions at https://docs.zkproof.org/reference} 20 | 21 | \def\crtab{\textCR~~~} 22 | 23 | 24 | %%% Code to generate bibtex file for how to cite this version 25 | \def\owncitebibtexcode{@report\{\owncitetag,\crtab 26 | author = \{\ownciteauthor\},\crtab 27 | title = \{\owncitetitle\},\crtab 28 | %%% Using the field `subtitle' (instead of `version'), so that it prints immediately after the title 29 | subtitle = \{\ownciteversion\},\crtab 30 | year = \{\ownciteyear\},\crtab 31 | month = \{\owncitemonthNumber\},\crtab 32 | publisher = \{\owncitepublisher\},\crtab 33 | editor = \{\editorscurrversion\},\crtab 34 | keywords = \{cryptography; interoperability; privacy, security; standards; zero-knowledge proofs\}\crtab 35 | contributors-to-v0 = \{\contributorsToVersionZero\},\crtab 36 | contributors-to-v01 = \{\contributorsToVersionZeroDotOne\},\crtab 37 | contributors-to-v02 = \{\contributorsToVersionZeroDotTwo\},\crtab 38 | contributors-to-v03 = \{\contributorsToVersionZeroDotThree\},\crtab 39 | addendum = \{\owncitenote\},\crtab 40 | license = \{Creative Commons Attribution 4.0 International\},\crtab 41 | shorthand = \{ZkpComref\}\textCR 42 | \}} 43 | 44 | 45 | \vspace{1.5em} 46 | \inpar[:]{\makebox[0pt][l]{\blue{Citing this version}}\protect\textattachfile[mimetype={text/plain}]{./zz-99-biblio/zkpcomref2022.bib}{\phantom{Citing this version}}\pslabel{how-to-cite-this-version}}% 47 | \ownciteauthor. \emph{\owncitetitle. \ownciteversion}. 48 | Ed.\ by \editorscurrversion. Pub.\ by \owncitepublisher. 49 | \owncitemonthMMM\ \ownciteyear. \owncitenote 50 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z03-this-community-ref.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \presection{About this community reference} 3 | \label{sec:prelim:about-this-community-reference} 4 | 5 | The ``ZKProof Community Reference'' arises within the scope of the ZKProof open initiative, which seeks to mainstream zero-knowledge proof (ZKP) cryptography. 6 | This is an inclusive community-driven process that focuses on interoperability and security, aiming to advance trusted specifications for the implementation of ZKP schemes and protocols. 7 | 8 | ZKProof holds annual workshops, attended by world-renowned cryptographers, practitioners and industry leaders. 9 | These events are a forum for discussing new proposals, reviewing cutting edge projects, and advancing reference material. 10 | That is the genesis of this document, which intends to be a community-built reference for understanding and aiding the development of ZKP systems. 11 | 12 | The following items provide guidance for the expected development process of this document, which is open to contributions from and for the community. 13 | 14 | \inpar{Purpose} 15 | The purpose of developing the ZKProof Community Reference document is to provide, within the principles laid out by the \hyperref[sec:prelim:charter]{ZKProof charter}, a reference for the development of zero-knowledge-proof technology that is secure, practical and interoperable. 16 | 17 | \inpar{Aim} 18 | The aim of the document is to consolidate reference material developed and/or discussed in collaborative processes during the ZKProof workshops. 19 | The document intends to be accessible to a large audience, including the general public, the media, the industry, developers and cryptographers. 20 | 21 | \inpar{Scope} 22 | The document intends to cover material relevant for its purpose --- the development of secure, practical and interoperable technology. 23 | The document can also elaborate on introductory concepts or works, to enable an easier understanding of more advanced techniques. 24 | When a focus is chosen from several alternative options, the document should include a rationale describing comparative advantages, disadvantages and applicability. 25 | However, the document does not intend to be a thorough survey about ZKPs, and does not need to cover every conceivable scenario. 26 | 27 | \inpar{Format} 28 | To achieve its accessibility goal, and considering its wide scope, the document favors the inclusion of: 29 | a well defined structure (e.g., chapters, sections, subsections); 30 | introductory descriptions (e.g., an executive summary and one introduction per chapter); 31 | illustrative examples covering the main concepts; 32 | enumerated recommendations and requirements; 33 | summarizing tables; 34 | glossary of technical terms; 35 | appropriate references for presented claims and results. 36 | 37 | \inpar{Editorial methodology} 38 | The development process of this community reference is proposed to happen in cycles of four phases: 39 | \begin{enumerate}[label=(\roman*),itemsep=0ex] 40 | \item \textbf{open discussion} during ZKProof workshops, with corresponding annotations to serve as reference for subsequent development; 41 | \item \textbf{content development}, by voluntary \emph{contributors}, according to a set of contribution proposals and during a defined period; 42 | \item \textbf{integration} of contributions into the document, by the \emph{editors}; 43 | \item \textbf{public feedback} about the state of the document, to be used as a basis of development in the next cycle. 44 | \end{enumerate} 45 | 46 | The team of editors coordinates the process, promoting transparency by means of public calls for contributions and feedback, using editorial discretion towards the improvement of the document quality, and enabling an easy way to identify the changes and their rationale. 47 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z04a-charter.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \presection{ZKProof charter} 3 | \label{sec:prelim:charter} 4 | 5 | \vspace{-1em} 6 | \nolinenumbers 7 | \begingroup 8 | \setlength{\fboxsep}{.75em} 9 | \nolinenumbers 10 | \let\templinenumber\thelinenumber 11 | \ifbool{boolShowLineNumbers}{\renewcommand{\thelinenumber}{\templinenumber\hspace*{1.8em}}}{} 12 | \fbox{\resizebox{\textwidth-2\fboxsep-2\fboxrule}{!}{\begin{minipage}{1.05\textwidth} 13 | \conditionalinternallinenumbers 14 | \textbf{ZKProof Charter (Boston, May 10th and 11th 2018).} 15 | 16 | \vspace{.5em} 17 | The goal of the ZKProof Standardization effort is to advance the use of Zero Knowledge Proof technology by bringing together experts from industry and academia. 18 | To further the goals of the effort, we set the following guiding principles: 19 | 20 | \begin{itemize}[itemsep=0ex] 21 | \item The initiative is aimed at producing documents that are open for all and free to use. 22 | %% Original sub-bullets were hollow, as in $\circ$, or \raisebox{.5ex}{\scalebox{.7}{o}}, but that raises an issue when copy-pasting upon compilation with, e.g., lualatex, so changed it to -- 23 | \begin{itemize}[label={--}] 24 | \item As an open initiative, all content issued from the ZKProof Standards Workshop is 25 | under Creative Commons Attribution 4.0 International license. 26 | \end{itemize} 27 | 28 | \item We seek to represent all aspects of the technology, research and community in an 29 | inclusive manner. 30 | \item Our goal is to reach consensus where possible, and to properly represent conflicting 31 | views where consensus was not reached. 32 | \item As an open initiative, we wish to communicate our results to the industry, the media 33 | and to the general public, with a goal of making all voices in the event heard. 34 | \begin{itemize}[label={--},itemsep=0ex] % $\circ$ 35 | \item Participants in the event might be photographed or filmed. 36 | \item We encourage you to tweet, blog and share with the hashtag \#ZKProof. 37 | Our official twitter handle is @ZKProof. 38 | \end{itemize} 39 | \end{itemize} 40 | 41 | For further information, please refer to \myemail{contact@zkproof.org} 42 | \end{minipage} 43 | }%end of \resizebox 44 | }%end of \fbox 45 | \endgroup 46 | 47 | \ifbool{boolShowLineNumbers}{\linenumbers}{} 48 | 49 | \begingroup 50 | \setlinenumbermargin{1em}{} 51 | \minip[\textwidth][1.27\textwidth]{\setstretch{1.2}\conditionalinternallinenumbers 52 | \textbf{Editors note:} 53 | The requirement of a Creative Commons license was initially within the scope of the 1\textsuperscript{st}~ZKProof workshop. 54 | The section below (about intellectual property expectations) widens the scope to cover this Community reference and beyond. 55 | } 56 | \endgroup 57 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z04b-ip-policy.tex: -------------------------------------------------------------------------------- 1 | \vspace{-.5em} 2 | 3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | \presection{Intellectual property --- expectations on disclosure and licensing} 5 | \label{sec:prelim:IP} 6 | 7 | \vspace{-.5em} 8 | 9 | ZKProof is an open initiative that seeks to promote the secure and interoperable use of zero-knowledge proofs. 10 | To foster open development and wide adoption, it is valuable to promote technologies with open-source implementations, unencumbered by royalty-bearing patents. 11 | However, some useful technologies may fall within the scope of patent claims. 12 | Since ZKProof seeks to represent the technology, research and community in an inclusive manner, it is 13 | valuable to set expectations about the disclosure of intellectual property and the handling of patent claims. 14 | 15 | The members of the ZKProof community are hereby strongly encouraged to provide information on known patent claims (their own and those from others) potentially applicable to the guidance, requirements, recommendations, proposals and examples provided in ZKProof documentation, including by disclosing known pending patent applications or any relevant unexpired patent. 16 | Particularly, such disclosure is promptly required from the patent holders, or those acting on their behalf, as a condition for providing content contributions to the ``Community Reference'' and to ``Proposals'' submitted to ZKProof for consideration by the community. 17 | The ZKProof documentation will be updated based on received disclosures about pertinent patent claims. 18 | 19 | ZKProof aims to produce documents that are open for all and free to use. 20 | As such, the content produced for publication within the context of the ZKProof Standardization effort should be made available under a Creative Commons Attribution 4.0 International license. 21 | Furthermore, any technology that is promoted in said ZKProof documentation and that falls within patent claims should be made available under licensing terms that are reasonable, and demonstrably free of unfair discrimination, preferably allowing free open-source implementations. 22 | 23 | Please email relevant information to \href{mailto:editors@zkproof.org}{editors@zkproof.org}. 24 | -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z05-contents.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | %%%% Contents: Table of Contents, List of Tables, List of Figures, ... 3 | \begingroup 4 | \phantomsection\chapter*{Contents}\addcontentsline{toc}{section}{Contents} 5 | \label{prelim:contents} 6 | 7 | 8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 9 | %%%%%% TABLE OF CONTENTS 10 | \setlength{\cftbeforetoctitleskip}{1em}% %defines the vertical space before toc 11 | \tableofcontents 12 | 13 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 14 | %%%%%% LIST OF TABLES 15 | \setlength{\cftbeforeloftitleskip}{3em} %defines the vertical space before lof 16 | \let\oldnumberline\numberline% 17 | \renewcommand{\numberline}{\figurename~\oldnumberline}% 18 | \addtocontents{lof}{\vspace*{-3em}}% 19 | \renewcommand{\listfigurename}{\pdfbookmark[2]{List of Figures}{pdfbkm:lof}\label{lof:lof}List of Figures}% 20 | \listoffigures 21 | 22 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 23 | %%%%%% LIST OF FIGURES 24 | \setlength{\cftbeforelottitleskip}{3em} %defines the vertical space before lot 25 | \renewcommand{\numberline}{\tablename~\oldnumberline}% 26 | \addtocontents{lot}{\vspace*{-3em}}% 27 | \renewcommand{\listtablename}{\pdfbookmark[2]{List of Tables}{pdfbkm:lot}\label{lot:lot}List of Tables}% 28 | \listoftables 29 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 30 | %%% Still to add: List of Examples, List of Recommendations 31 | 32 | \endgroup -------------------------------------------------------------------------------- /src/zz-00-frontmatter/zz-00-z06-exec-summary.tex: -------------------------------------------------------------------------------- 1 | \presection{Executive summary} 2 | \label{sec:prelim:executive-summary} 3 | 4 | 5 | Zero-knowledge proofs (ZKPs) are an important privacy-enhancing tool from cryptography. 6 | They allow proving the veracity of a statement, related to confidential data, without revealing any information beyond the validity of the statement. 7 | ZKPs were initially developed by the academic community in the 1980s, and have seen tremendous improvements since then. 8 | They have since become feasible in practice for application in multiple domains of interest to the industry, and to a large community of developers and researchers. 9 | ZKPs can have a positive impact in industries, agencies, and for personal use, by allowing privacy-preserving applications where designated private data can be made useful to third parties, despite not being disclosed to them. 10 | 11 | 12 | The development of this reference document aims to serve the broader community, particularly those interested in understanding ZKP systems, making an impact in their advancement, and using related products. 13 | This is a step towards enabling wider adoption of ZKP technology, which may precede the establishment of future standards. 14 | However, this document is not a substitution for research papers, technical books, or standards. 15 | It is intended to serve as a reference handbook of introductory concepts, basic techniques, implementation suggestions and application use-cases. 16 | 17 | 18 | ZKP systems involve at least two parties: a prover and a verifier. 19 | The goal of the prover is to convince the verifier that a \emph{statement} is true, without revealing any additional information. 20 | For example, suppose the prover holds a birthdate certificate digitally signed by an authority. 21 | In order to access some service, the prover may have to prove being at least 18 years old, that is, that the prover \emph{knows} a certificate, tied to their identify and digitally signed by a trusted certification authority, stating a birthdate consistent with the age claim. 22 | A ZKP allows this, without the prover having to reveal the birthdate. 23 | 24 | 25 | \xetexfontscale{.985}{ 26 | This document describes important aspects of the current state of the art in ZKP 27 | \hyperref[chap:security]{security}, 28 | \hyperref[chap:paradigms]{paradigms}, 29 | \hyperref[chap:implem]{implementation}, and 30 | \hyperref[chap:apps]{applications}. 31 | There are several use-cases and applications where ZKPs can add value. 32 | To better assess this it is useful to benchmark implementations under several metrics, evaluate tradeoffs between security and efficiency, and develop an interoperability basis. 33 | The security of a proof system is paramount for the system users, but efficiency is also essential for user experience. 34 | } 35 | 36 | 37 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 38 | %%%%%%%%%%%% ABOUT CHAPTER "SECURITY" 39 | \label{par:exec-summ:chap-security} 40 | The ``\hyperref[chap:security]{Security}'' chapter introduces the baseline terminology and security concepts of ZKP systems. 41 | A ZKP system can be described with three components: {\tt setup}, {\tt prove}, {\tt verify}. 42 | The {\tt setup} determines the initial state of the prover and the verifier, including private and common elements, such as private and public keys, or a common reference string. 43 | The {\tt prove} and {\tt verify} components are the prover and verifier's algorithms, respectively, possibly interactive. 44 | Overall they need to ensure three main security requirements: completeness, soundness, and zero-knowledge. 45 | 46 | \xetexfontscale{.99}{ 47 | Completeness requires that if both {\tt prove} and {\tt verify} are correct, and if the statement is true, then at the end of the interaction the verifier is convinced of this fact. 48 | Soundness requires that not even a malicious prover can convince the verifier of a false statement. 49 | Zero knowledge requires that even a malicious verifier cannot extract from the proof process any information beyond the truthfulness of the given statement. 50 | Other properties and variations may be built in by design, as desired features, such as succinctness, non-interactivity, transferability and composability, among others. 51 | } 52 | 53 | 54 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 55 | %%%%%%%%%%%% ABOUT CHAPTER "PARADIGMS" 56 | \pslabel{par:exec-summ:chap-paradigms} 57 | The ``\hyperref[chap:paradigms]{Paradigms}'' chapter presents an overview of paradigms for constructing zero-knowledge proofs for general statements, namely those related to non-deterministic polynomial (NP) relations. 58 | The presentation describes a modern perspective of composition of an \emph{information theoretic} (IT) system, based on ideal components, a \emph{cryptographic compiler} (CC), where cryptographic elements come into play, and an \emph{arithmetization} system to encode the actual public data (statement and instance) and private data (witness) that determine the specific proof taking place. 59 | The provided organization allows for a systematized covering/characterization of many modern ZKP systems, many of which enable succinct proofs. 60 | Future updates to this chapter should include additional examples for specialized languages/relations, which can follow a different approach. 61 | 62 | 63 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 64 | %%%%%%%%%%%% ABOUT CHAPTER "IMPLEMENTATION" 65 | \pslabel{par:exec-summ:chap-implementation} 66 | The ``\hyperref[chap:implem]{Implementation}'' chapter focuses on devising a framework for the implementation of ZKPs, which is important for interoperability. 67 | One important aspect to consider upfront is the representation of statements. 68 | In a ZKP protocol, the statement needs to be converted into a mathematical object. 69 | For example, in the case of proving that an age is at least 18, the statement is equivalent to proving that the private birthdate {\texttt Y$_1$-M$_1$-D$_1$} (year-month-day) satisfies a relation with the present date {\texttt Y$_2$-M$_2$-D$_2$}, namely that their distance is greater than or equal to 18 years. 70 | This simple example can be represented as a disjunction of conditions: 71 | {\tt Y$_2>$Y$_1$+18}, 72 | or {\tt Y$_2$=Y$_1$+18}~$\wedge$~{\tt M$_2$}$>${\tt M$_1$}, 73 | or {\tt Y$_2$=Y$_1$+18 }$\wedge${ \tt M$_2$=M$_1$ }$\wedge${ \tt D$_2$}$\geq${\tt D$_1$}. 74 | An actual conversion suitable for ZKPs, namely for more complex statements, can pose an implementation challenge. 75 | There are nonetheless various techniques that enable converting a statement into a mathematical object, such as a circuit. 76 | This document gives special attention to representations based on a Rank-1 constraint system (R1CS) and quadratic arithmetic programs (QAP), which are adopted by several ZKP solutions in use today. 77 | Also, the document gives special emphasis to implementations of non-interactive proof systems. 78 | \loosen 79 | 80 | 81 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 82 | %%%%%%%%%%%% ABOUT CHAPTER "APPLICATIONS" 83 | \pslabel{par:exec-summ:chap-applications} 84 | The privacy enhancement offered by ZKPs can be applied to a wide range of scenarios. 85 | The ``\hyperref[chap:apps]{Applications}'' chapter presents three use-cases that can benefit from ZKP systems: identity framework; asset transfer; regulation compliance. 86 | In a privacy-preserving identity framework, one can for example prove useful personal attributes, such as age and state of residency, without revealing more detailed personal data such as birthdate and address. 87 | In an asset-transfer setting, financial institutions that facilitate transactions usually require knowing the identities of the sender and receiver, and the asset type and amount. 88 | ZKP systems enable a privacy-preserving variant where the transaction is performed between anonymous parties, while at the same time ensuring they and their assets satisfy regulatory requirements. 89 | In a regulation compliance setting, ZKPs enables an auditor to obtain proof that a process satisfies a number of requirements, without having to learn details about how they were achieved. 90 | These use cases, as well as a wide range of many other conceivable privacy-preserving applications, can be enabled by a common set of tools, or gadgets, for example including commitments, signatures, encryption and circuits. 91 | \loosen 92 | 93 | 94 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 95 | %%%%%%%%%%%% CONCLUDING PARAGRAPH 96 | \xetexfontscale{.995}{\pslabel{par:exec-summ:conclude} 97 | The development of secure, practical, and interoperable ZKP applications requires a balanced interplay between security concepts and implementation guidelines. 98 | Solutions provided by ZKP technology must be ensured by careful security practices and realistic assumptions. 99 | This document aims to summarize security properties and implementation techniques that help achieve these goals. 100 | } -------------------------------------------------------------------------------- /src/zz-01-baseline/zz-01-baseline.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \chapter{Security} 3 | \label{chap:security} 4 | 5 | \input{zz-01-z01-intro.tex} % Introduction 6 | \input{zz-01-z02-terms.tex} % Terminology 7 | \input{zz-01-z03-statements.tex} % Specifying statements for ZK 8 | \input{zz-01-z04-zkpok-vs-zkpom.tex} % ZKPs of knowledge vs. ZKPs of membership 9 | \input{zz-01-z05-syntax.tex} % Syntax 10 | \input{zz-01-z06-properties.tex} % Definitions and properties 11 | \input{zz-01-z07-assumptions.tex} % Assumptions 12 | \input{zz-01-z08-efficiency.tex} % Efficiency 13 | -------------------------------------------------------------------------------- /src/zz-01-baseline/zz-01-z01-intro.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \section{Introduction} 3 | \label{security:intro} 4 | 5 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 6 | \subsection{What is a zero-knowledge proof?} 7 | \label{security:intro:what-is-a-ZK} 8 | 9 | A zero-knowledge proof (ZKP) makes it possible to prove a statement is true while preserving confidentiality of secret information \cite{1985:GMR:STOC:the-knowledge-complexity-of-interactive-proof-systems}. 10 | This makes sense when the veracity of the statement is not obvious on its own, but the prover knows relevant secret information (or has a skill, like super-computation ability) that enables producing a proof. 11 | The notion of secrecy is used here in the sense of prohibited leakage, but a ZKP makes sense even if the `secret' (or any portion of it) is known apriori by the verifier(s). 12 | 13 | 14 | There are numerous uses of ZKPs, useful for proving claims about confidential data, such as: 15 | \begin{enumerate} 16 | \item adulthood, without revealing the birth date; 17 | \item solvency (not being bankrupt), without showing the portfolio composition; 18 | \item ownership of an asset, without revealing or linking to past transactions; 19 | \item validity of a chessboard configuration, without revealing the legal sequence of chess moves; 20 | \item correctness (demonstrability) of a theorem, without revealing its mathematical proof. 21 | \end{enumerate} 22 | 23 | Some of these claims (commonly known by the prover and verifier, and here described as informal \emph{statements}) require a substrate (called \emph{instance}, also commonly known by the prover and verifier) to support an association with the confidential information (called \emph{witness}, known by the prover and to not be leaked during the proof process). 24 | For example, the proof of solvency (the statement) may rely on encrypted and certified bank records (the instance), and with the verifier knowing the corresponding decryption key and plaintext (the witness) as secrets that cannot be leaked. 25 | \reftab{tab:example-scenarios-zkps} in \refsec{security:terminology} differentiates these elements across several examples. 26 | In concrete instantiations, the exemplified ZKPs are specified by means of a more formal \emph{statement of knowledge} of a witness. 27 | 28 | 29 | \futfig[fig:prover-verifier-interaction]{Illustration of an interaction between prover and verifier, conveying the elements of the proof, including statement, instance, witness, message sending, and convincing} 30 | 31 | A ZKP system is a specification of how a prover and verifier can interact for the prover to convince the verifier that the statement is true. 32 | The proof system must be complete, sound and ZK. 33 | 34 | 35 | \begin{itemize} 36 | 37 | \item \textbf{Complete:} If the statement is true and both prover and verifier follow the protocol; the verifier will accept. 38 | 39 | \item \textbf{Sound:} If the statement is false, and the verifier follows the protocol; the verifier will not be convinced. 40 | 41 | \item \textbf{Zero-knowledge:} If the statement is true and the prover follows the protocol; the verifier will not learn any confidential information from the interaction with the prover but the fact the statement is true. 42 | 43 | \end{itemize} 44 | 45 | 46 | \paragraph{Proofs vs.\ arguments} 47 | The theory of ZKPs distinguishes between \emph{proofs} and \emph{arguments}, as related to the computational power of the prover and verifier. 48 | \emph{Proofs} need to be sound even against computationally unbounded provers, whereas \emph{arguments} only need to preserve soundness against computationally bounded provers (often defined as probabilistic polynomial time algorithms). 49 | For simplicity, ``proof'' is used hereafter to designate both \emph{proofs} and \emph{arguments}, although there are theoretical circumstances where the distinction is relevant. 50 | 51 | 52 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 53 | \subsection[Requirements for a ZK proof system specification]{Requirements for a zero-knowledge proof system specification} 54 | \label{security:intro:requirements-ZK} 55 | 56 | A full proof system specification \shall\ include: 57 | 58 | \begin{enumerate} 59 | \item Precise specification of the type of statements the proof system is designed to handle 60 | \item Construction details, including the algorithms used by the prover and verifier 61 | \item If applicable, a description of the setup used by the prover and verifier 62 | \item Precise definitions of the security the proof system is intended to provide 63 | \item A security analysis that proves the ZKP system satisfies the security goals, and a list of the unproven assumptions that underpin security 64 | \end{enumerate} 65 | 66 | Efficiency claims about a ZKP system must be reported fairly and accurately: 67 | should include the relevant performance parameters for the intended usage; 68 | when compared with other ZKP systems, should be based on a best effort to compare \emph{apples to apples}. 69 | -------------------------------------------------------------------------------- /src/zz-01-baseline/zz-01-z02-terms.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | \section{Terminology} 3 | \label{security:terminology} 4 | 5 | 6 | \inpar[:]{\hypertarget{def:instance}{Instance}} 7 | Input commonly known to both prover (P) and verifier (V), and used to support the statement of what needs to be proven. 8 | This common input may either be local to the prover--verifier interaction, or public in the sense of being known by external parties. Notation: $x$. 9 | (Some scientific articles use ``instance'' and ``statement'' interchangeably, but we distinguish between the two.) 10 | \loosen 11 | 12 | \inpar[:]{\hypertarget{def:witness}{Witness}} 13 | Private input to the prover. Others may or may not know something about the witness. 14 | Notation: $w$. 15 | 16 | \inpar[:]{\hypertarget{def:relation}{Relation}} 17 | Specification of relationship between instances and witness. 18 | A relation can be viewed as a set of permissible pairs (instance, witness). 19 | Notation: $R$. 20 | 21 | \inpar[:]{\hypertarget{def:language}{Language}} 22 | Set of instances that appear as a permissible pair in $R$. 23 | Notation: $L$. 24 | 25 | \inpar[:]{\hypertarget{def:statement}{Statement}} 26 | Defined by instance and relation. 27 | Claims the instance has a witness in the relation (which is either true or false). 28 | Notation: $x \in L$. 29 | 30 | \inpar[:]{Security parameter} 31 | Positive integer indicating the desired security level (e.g. 128 or 256) where higher security parameter means greater security. 32 | In most constructions, distinction is made between computational security parameter and statistical security parameter. 33 | Notation: $k$ (computational) or $s$ (statistical). 34 | 35 | \inpar[:]{Setup} 36 | The inputs given to the prover and to the verifier, apart from the instance $x$ and the witness $w$. 37 | The setup of each party can be decomposed into a private component (``PrivateSetup$_P$'' or ``PrivateSetup$_V$'', respectively not known to the other party) and a common component ``CommonSetup = CRS'' (known by both parties), where CRS denotes a ``common reference string'' (required by some zero-knowledge proof systems). 38 | Notation: setup$_P$ = (PrivateSetup$_P$, CRS) and setup$_V$ = (PrivateSetup$_V$, CRS).'' 39 | \loosen 40 | 41 | For simplicity, some parameters of the setup are left implicit (possibly inside the CRS), such as the security parameters, and auxiliary elements defining the language and relation. 42 | See more details in \refsec{security:syntax:setup}. 43 | While the witness ($w$) and the instance ($x$) could be assumed as elements of the setup of a concrete ZKP protocol execution, they are often distinguished in their own category. 44 | In practice, the term ``Setup'' is often used with respect to the setup of a proof system that can then be instantiated for multiple executions with varying instances ($x$) and witnesses ($w$). 45 | 46 | 47 | \reftab{tab:example-scenarios-zkps} exemplifies at a high level a differentiation between the \emph{statement}, the \emph{instance} and the \emph{witness} elements for the initial examples mentioned in \refsec{security:intro:what-is-a-ZK}. 48 | 49 | 50 | \vspace{.5em}\begin{table}[H]\centering\newcommand{\scaleTitle}[1]{\scalebox{.95}{#1}} 51 | \def\tmpCapTab{Example scenarios for zero-knowledge proofs} 52 | \CIL\mytabcap[tab:example-scenarios-zkps]{\tmpCapTab}{\tmpCapTab} 53 | 54 | \small\begin{edtable}{tabular}{|l|l||l||l||l|} 55 | \hline \rowcolor{colorRowHead} 56 | \bfseries \scalebox{.85}{\#} 57 | & \diagbox{\small \bfseries \makebox[2.25em]{\hspace{1em}\scalebox{.8}{Scenarios}}}{\small \bfseries \makebox[0pt]{\hspace*{-2.75em}\scalebox{.8}{Elements}}} 58 | & \subtab[l]{{\bfseries Statement}\\being proven} 59 | & \subtab[l]{{{\bfseries Instance}}\\used as substrate} 60 | & \subtab[l]{{\bfseries Witness}\\treated as confidential} 61 | \\ 62 | \hline \bfseries 1 63 | & \bfseries \scaleTitle{\subtab[l]{Legal age for\\purchase}} 64 | & I am an adult 65 | & \subtab[l]{Tamper-resistant\\identification chip} 66 | & \subtab[l]{Birthdate and personal\\data (signed by a cer-\\tification authority)} 67 | \\ 68 | \hline \bfseries 2 69 | & \bfseries \scaleTitle{\subtab[l]{Hedge fund\\solvency}} 70 | & \subtab[l]{We are not bankrupt} 71 | & \subtab[l]{Encrypted \& certified\\bank records} 72 | & \subtab[l]{Portfolio data and\\decryption key} 73 | \\ 74 | \hline \bfseries 3 75 | & \bfseries \scaleTitle{\subtab[l]{Asset\\transfer}} 76 | & I own this $<$asset$>$ 77 | & \subtab[l]{A blockchain or\\other commitments} 78 | & \subtab[l]{\scalebox{1}{Sequence of transactions}\\\scalebox{1.0}{(and secret keys that}\\\scalebox{1.0}{establish ownership)}} 79 | \\ 80 | \hline \bfseries 4 81 | & \bfseries \scaleTitle{\subtab[l]{Chessboard\\configuration}} 82 | & \subtab[l]{This $<$configuration$>$\\can be reached} 83 | & \subtab[l]{(The rules of Chess)} 84 | & \subtab[l]{A sequence of valid\\chess moves} 85 | \\ 86 | \hline \bfseries 5 87 | & \bfseries \scaleTitle{\subtab[l]{Theorem\\validity}} 88 | & \subtab[l]{This $<$expression$>$\\is a theorem} % [provable\\in $