Hasher circuit
The hasher circuit computes the Pedersen hash value of the given inputs.
Inputs
Both nullifier and secret values are generated when a user deposits a token into a voting contract.
| Pseudocode name | zk-SNARK input type | Description |
|---|---|---|
nullifier | Public | A random ð value such that ð â ðđ248. |
secret | Public | A random ð value generated such that ð â ðđ248. |
Outputs
The outputs of the Hasher circuit are computed outputs of hash function ð1 such that ð1:ðđ â âĪp.
Let ð1 be the Pedersen hash function which is imported from circomlib library here.
| Pesudocode name | zk-SNARK input type | Description |
|---|---|---|
commitment | Public | A value ðķ such that ðķ = ð1(ðâĨð). |
nullifierHash | Public | A value â output of â = ð1(ð). |