docs
  • README
  • Browsing the Fides Innova ZKP Network
  • Connecting Your MetaMask to the Network
  • Full Node
  • Introduction
  • Mobile App
  • Publishing Service Contracts on the Fides Innova Blockchain
  • Web App (User Panel, Admin Panel)
  • Fides Zero-Knowledge Proof (ZKP) Algorithm
    • 1- Setup Phase
      • 1- Setup Phase
      • Example 1
      • Example 2
    • 2-commitment-phase
      • 2- Commitment Phase
      • Example 1
      • Example 2
    • 3- Proof Generation Phase
      • 3- Proof Generation Phase
      • Example 1
      • Example 2
    • 4- Proof Verification Phase
      • 4- Proof Verification Phase
      • Example 1
      • Example 2
    • 5-target-architecture
      • Target architecture - RISC-V RV32IM
      • Target architecture - ARMv6-M Cortex-M0 32-bit ARM - RaspberryPi Pico
      • Target architecture - Cortex-A53 - for Siemens SIMATIC IOT2050
  • Tech Stack
    • Message Queuing Telemetry Transport (MQTT) protocol
    • Service Contract
    • Service Market
    • ZKP-enabled JavaScript Execution
  • ZKP and IoT Device Firmware Integration (zk-Device Design)
    • E-Card; a sample zk-Device
      • Installation
      • Instruction Set Architecture (ISA)
      • Mesh IoT Network
      • Reset
Powered by GitBook
On this page
  1. Fides Zero-Knowledge Proof (ZKP) Algorithm
  2. 2-commitment-phase

Example 2

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

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

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

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

The Prover calculates square matrices AAA, BBB and CCC of order ng+ni+1=4+32+1=37n_g+n_i+1=4+32+1=37ng​+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}

PreviousExample 1Next3- Proof Generation Phase

Last updated 2 months ago