Example 2

Assume the following sample code: addR1,R1,5add\hspace{2mm} R_1, R_1, 5 => Gate 1 mulR2,R2,R10mul\hspace{2mm} R_2, R_2, R_{10} => Gate 2 addR2,R2,10add\hspace{2mm} R_2,R_2,10 => Gate 3 mulR1,R1,R19mul\hspace{2mm} R_1,R_1,R_{19} => Gate 4

The constraints are as follows considering p=1678321p= 1678321:

R1(2)=R1(1)+5R_1^{(2)}=R_1^{(1)}+5 R2(2)=R2(1)×R10(1)R_2^{(2)}=R_2^{(1)}\times R_{10}^{(1)} R2(3)=R2(2)+10R_2^{(3)}=R_2^{(2)}+10 R1(3)=R1(2)×R19(1)R_1^{(3)}=R_1^{(2)}\times R_{19}^{(1)}

We continue with ng=4n_g=4 and ni=32n_i=32.

The Prover calculates square matrices AA, BB and CC of order ng+ni+1=4+32+1=37n_g+n_i+1=4+32+1=37 based on above construction:

B=\begin{bmatrix} 0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&...&0&0&0&0\ 0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&...&0&0&0&0\ .&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&...&.&.&.&.\ .&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&...&.&.&.&.\ .&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&...&.&.&.&.\ .&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&.&...&.&.&.&.\ 5&1&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&...&0&0&0&0\ 0&0&0&0&0&0&0&0&0&0&1&0&0&0&0&0&0&0&0&0&..&0&0&0&0\ 10&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&...&0&1&0&0\ 0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0&1&...&0&0&0&0 \end{bmatrix}

C=\begin{bmatrix} 0&0&...&0&0&0&0\ 0&0&...&0&0&0&0\ .&.&...&.&.&.&.\ .&.&...&.&.&.&.\ .&.&...&.&.&.&.\ .&.&...&.&.&.&.\ 0&0&...&1&0&0&0\ 0&0&...&0&1&0&0\ 0&0&...&0&0&1&0\ 0&0&...&0&0&0&1 \end{bmatrix}

Last updated