HashApprover
The HashApprover
is a zkSNARKs circuit is responsible for generating the hash of a key-value pair using the Poseidon hash function.
Input Signals
The circuit takes in the following input signals:
key: Represents the key for which the hash will be generated.
value: Represents the value that is paired with the key for the hash generation.
Output Signals
The circuit produces two output signals:
hash: The generated hash of the input key-value pair.
keyOut: A pass-through of the input key signal.
Components
hasher: A
Poseidon
hashing component that takes two inputs: key and value, and outputs the hash.
Inclusion of External Circuits
The circuit makes use of the poseidon
circuit from the circomlib
library.
Main Component
The main component of this circuit file is the HashApprover
template.
This circuit is straightforward and primarily used for hashing a key-value pair using the Poseidon hash function and passing through the key. The output hash can be used for further data verification processes, while the output key can be used for mapping and data storage purposes.
Last updated