[ZK Learning Group 2] Circom workshop #2
Background
Circuit verifies if the secret key generates 1 of 3 known public keys.
Secret key must be kept hidden. Public keys can be public inputs.
PubKeyGen
computes the public key from the provided secret key. GroupSig
compares the generated pkGen
against the 3 public keys.
We can replace PubKeyGen with a 1-way hash function that is snark-friendly (friendly in that its low gas).
The alternative is to use a signature scheme to generate the actual pub key - which is gas-intensive.
Snark-friendly hash functions: MIMC and poseidon
Paranthesis & params
Allows you to enter values that are params
params are for dynamic parts of the circuit
like counter of a for loop
must be specified by compile time. cos the compiled circuit cannot have such dynamic parts like loops.
Last updated
Was this helpful?