Skip to content

Commit

Permalink
Merge pull request #98 from vuittont60/main
Browse files Browse the repository at this point in the history
fix: typos
  • Loading branch information
PlanetMacro authored Jan 23, 2024
2 parents 4d95ce6 + 744068a commit e62b89e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion chapters/arithmetics-moonmath.tex
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ \section{Polynomial arithmetic}
\begin{equation}
P(b) = \sum_{j=0}^m a_j b^j
\end{equation}
\begin{example}Consider the integer polynomials from \examplename{} \ref{example:integer_polynomials} again. To evaluate them at given points, we have to insert the point for all occurences of $x$ in the polynomial expression. Inserting arbitrary values from $\Z$, we get the following:\sme{is this right?}
\begin{example}Consider the integer polynomials from \examplename{} \ref{example:integer_polynomials} again. To evaluate them at given points, we have to insert the point for all occurrences of $x$ in the polynomial expression. Inserting arbitrary values from $\Z$, we get the following:\sme{is this right?}
\begin{align*}
&P_1(2) = 2\cdot 2^2 -4\cdot 2 +17 = 17 \\
&P_2(3) = 3^{23}=94143178827 \\
Expand Down
8 changes: 4 additions & 4 deletions chapters/circuit-compilers-moonmath.tex
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ \subsection{Circom}

To understand circom, we first have to provide definitions for the terms \hilight{signals},\hilight{templates}, and \hilight{components} to facilitate a better understanding of the examples discussed.

A \term{signal} refers to an element in the underlying finite field $\F$ of a circuit. The arithmetic circuits created using Circom operate on signals, which are immutable and can be defined as inputs or outputs. Input signals are private, unless specified as public, and all output signals are publicly accessible. The remaining signals are private and cannot be made public. Public signals are part of the instance and private signals are part of the witness in any valid assigment of a circuit.
A \term{signal} refers to an element in the underlying finite field $\F$ of a circuit. The arithmetic circuits created using Circom operate on signals, which are immutable and can be defined as inputs or outputs. Input signals are private, unless specified as public, and all output signals are publicly accessible. The remaining signals are private and cannot be made public. Public signals are part of the instance and private signals are part of the witness in any valid assignment of a circuit.

A \term{template} is an algorithm that creates generic circuits in Circom. The template is a new circuit object that can be utilized to construct other circuits.

Expand Down Expand Up @@ -468,7 +468,7 @@ \subsubsection{The base-field type}
nmul24 -> nout1 [xlabel="I_1", style=dashed, color=grey] ;
}
\end{center}
In a final optimization step, we collaps all box nodes directly connected to other box nodes, adhering to the rule that a variables \texttt{public} specifier overwrites any \texttt{private} specifier. Reindexing edge labels we get the following circuit:
In a final optimization step, we collapse all box nodes directly connected to other box nodes, adhering to the rule that a variables \texttt{public} specifier overwrites any \texttt{private} specifier. Reindexing edge labels we get the following circuit:
\begin{center}
\digraph[scale=0.5]{PAPER3FUCOPTI}{
forcelabels=true;
Expand Down Expand Up @@ -1392,7 +1392,7 @@ \subsubsection{The Unsigned Integer Type} Unsigned integers of size \texttt{N},
return base2 ;
}
\end{lstlisting}
To enfore an $N$-tuple of field elements $<b_0,\ldots,b_{N-1}>$ to represent an element of type \texttt{uN} we therefore need $N$ boolean constraints
To enforce an $N$-tuple of field elements $<b_0,\ldots,b_{N-1}>$ to represent an element of type \texttt{uN} we therefore need $N$ boolean constraints
\begin{align*}
S_0 \cdot (1-S_0) & = 0\\
S_1 \cdot (1-S_1) & = 0\\
Expand Down Expand Up @@ -1558,7 +1558,7 @@ \subsubsection{The Unsigned Integer Type} Unsigned integers of size \texttt{N},
\end{center}
During the prover phase, the function \texttt{main} is called with an actual input of \texttt{u4} type, say \texttt{x=14}. The Prover then has to transform the decimal value $14$ into its $4$-bit binary representation $Bits(14)_2 = <0,1,1,1>$ outside of the circuit. Then the array of field values $x[4] = [0,1,1,1]$ is used as an input to the circuit. Since all $4$ field elements are either $0$ or $1$, the four boolean constraints are satisfied and the output is a ring shift of the input array of the four field elements given by $[1,1,1,0]$, which represents the \texttt{u4} element $7$.
\end{example}
\paragraph{The Unigned Integer Operators} Since elements of \texttt{uN} type are represented as boolean arrays, shift operators are implemented in circuits simply by rewiring the boolean input variables to the output variables accordingly.
\paragraph{The Unsigned Integer Operators} Since elements of \texttt{uN} type are represented as boolean arrays, shift operators are implemented in circuits simply by rewiring the boolean input variables to the output variables accordingly.

Logical operators, like \texttt{AND}, \texttt{OR}, or \texttt{NOT} are defined on the \texttt{uN} type by invoking the appropriate boolean operators bitwise to every bit in the boolean array that represents the \texttt{uN} element.

Expand Down
4 changes: 2 additions & 2 deletions chapters/statements-moonmath.tex
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ \subsection{Instance and Witness}
It is worth understanding the difference between statements as defined in \secname{} \ref{sec:decision_function} and the refined notion of statements from this section. While statements in the sense of the previous section can be seen as membership claims, statements in the refined definition can be seen as knowledge-claims, where a prover claims knowledge of a witness for a given instance.
%For a more detailed discussion on this topic see [XXX\sme{update reference} sec 1.4]
\begin{example}[SHA256 -- Knowlege of Preimage] One of the most common examples in the context of zero-knowledge proof systems is the \term{knowledge-of-a-preimage proof} for some cryptographic hash function like $SHA256$, where a publicly known $SHA256$ \href{https://en.wikipedia.org/wiki/Hash_function}{digest} value is given, and the task is to prove knowledge of a preimage for that digest under the $SHA256$ function, without revealing that preimage.
\begin{example}[SHA256 -- Knowledge of Preimage] One of the most common examples in the context of zero-knowledge proof systems is the \term{knowledge-of-a-preimage proof} for some cryptographic hash function like $SHA256$, where a publicly known $SHA256$ \href{https://en.wikipedia.org/wiki/Hash_function}{digest} value is given, and the task is to prove knowledge of a preimage for that digest under the $SHA256$ function, without revealing that preimage.
To understand this problem in detail, we have to introduce a language able to describe the knowledge-of-preimage problem in such a way that the claim ``Given digest $i$, there is a preimage $w$ such that $SHA256(w)=i$'' becomes a statement in that language. Since $SHA256$ is a function that maps binary strings of arbitrary length onto binary strings of length $256$:
$$
Expand Down Expand Up @@ -1413,7 +1413,7 @@ \subsubsection{QAP Satisfiability} One of the major points of Quadratic Arithmet
= & (x^{2}+x+9x+9)-(9x) \\
= & x^{2}+x+9
\end{align*}
Given instance $I_1=11$ a prover therefore provides the polynomial $x^2+x+9$ as proof. To verify this proof, any verifier can then look up the target polynomial $T$ from the QAP and divide $P_{(I;W)}$ by $T$. In this particular example, $P_{(I;W)}$ is equal to the target polynomial $T$, and hence, it is divisible by $T$ with $P/T=1$. The verifer therefore verifies the proof.
Given instance $I_1=11$ a prover therefore provides the polynomial $x^2+x+9$ as proof. To verify this proof, any verifier can then look up the target polynomial $T$ from the QAP and divide $P_{(I;W)}$ by $T$. In this particular example, $P_{(I;W)}$ is equal to the target polynomial $T$, and hence, it is divisible by $T$ with $P/T=1$. The verifier therefore verifies the proof.
\begin{sagecommandline}
sage: F13 = GF(13)
sage: F13t.<t> = F13[]
Expand Down
2 changes: 1 addition & 1 deletion chapters/zk-protocols-moonmath.tex
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ \subsection{Proof Simulation}
[\beta]g_1 [\beta]g_2[\beta \cdot s]g_1'
)
$$
The only thing actually important about the transcript, is that it is publicly available data, that is not accesible for anyone before the MPC-data of round $j-1$ in phase $l$ exists.
The only thing actually important about the transcript, is that it is publicly available data, that is not accessible for anyone before the MPC-data of round $j-1$ in phase $l$ exists.

We start with the first round usually called the 'powers of tau' EXPLAIN THAT TERM...
The computation is initialized With $s=1$, $\alpha=1$, $\beta=1$. Hence the computation starts with the following data
Expand Down
2 changes: 1 addition & 1 deletion tmp/Readme.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This folder is used by the graphviz package. The `tmpdir` option leads to storing temporay files in this directory.
This folder is used by the graphviz package. The `tmpdir` option leads to storing temporary files in this directory.

0 comments on commit e62b89e

Please sign in to comment.