Example 2
Assume the following sample code: addR1,R1,5 => Gate 1 mulR2,R2,R10 => Gate 2 addR2,R2,10 => Gate 3 mulR1,R1,R19 => Gate 4
The constraints are as follows considering p=1678321:
R1(2)=R1(1)+5 R2(2)=R2(1)×R10(1) R2(3)=R2(2)+10 R1(3)=R1(2)×R19(1)
We continue with ng=4 and ni=32.
The Prover calculates square matrices A, B and C of order ng+ni+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