Closed KimiWu123 closed 5 years ago
Yes, the output from circom
is transformed into that go struct in this line
https://github.com/arnaucube/go-snark/blob/master/externalVerif/circomVerifier.go#L26 that then uses the parsers from utils
module from go-snark https://github.com/arnaucube/go-snark/blob/master/utils/base10parsers.go#L456
Also, the example of verification_key.json
that in the first message of this issue is with the original
protocol, but the actual functionality is for the groth
protocol
Sorry, I don't understand. I know the parser coming from. In the CircomVk
struct, the json values are vk_alfa_1
, va_beta_2
... etc, but verification_key.json
is using vk_a
, vk_b
...etc.
"but the actual functionality is for the groth protocol". Do you mean I should use groth
protocol in circom
when I generate circuit, setup, calculate witness?
'original' refears to the https://eprint.iacr.org/2013/279.pdf (Pinocchio), while the 'groth' refears to https://eprint.iacr.org/2016/260.pdf
Each one have different structure of Verification Key. The externalVerificator
of go-snark
to verify snarkjs
proofs, is for 'groth', as is the protocol usually used (as the 'original' needs more pairings computation into the verification, so is less optimal)
The definition of CircomVk is as follows,
but the content in
verification_key.json
is,How can I map these two? I'm willing to modify it but I need helps. Thanks.