# README
go-zksnark-full-flow-example
zkSNARK full flow example in Go
- Compile the circuit using circom
- Generate the trusted setup using snarkjs
- Calculate Witness from Go using go-circom-witnesscalc
- Generate zkProof from Go using go-circom-prover-verifier
- Verify zkProof from Go using go-circom-prover-verifier
Usage
Computer:
./complete-flow.sh
This will for each one of the circuits in the testdata
directory:
- compile the circuit
- generate the trusted setup
- calculate the witness
- generate the zkProof
- verify
Android:
- Install Gomobile, you will need to install Android SDK and NDK.
- Bind the Go code to Android:
mkdir -p Android/app/libs && gomobile bind --target android -o Android/app/libs/zkSNARK-full-flow.aar
- Connect a Android device or open an emulator and run:
cd Android && ./gradlew installDebug
this will compile and install the app. - Open logcat to see whats going on:
adb logcat GoLog:D \*:S -v long
- Launch the application on the device and tap to the "START FLOW" button. You should see the logs on the terminal of previous step.