Member-only story
The Wonder of Hash: SHA-256, Pedersen and Poseidon
Ethereum is advancing fast, and we can now create Zero Knowledge Proofs (ZKPs) to prove transactions without giving away private information. These are typically SNARKs, STARKs, and Bulletproof, and where these methods efficiently add transactions onto the blockchain and which will not require a good deal of checking. But, our existing hashing methods are not designed to work well within a blockchain infrastructure, and we must find alternatives.
With a Zero Knowledge Proof circuit, we typically have to prove the knowledge of a preimage for a certain cryptographic hash function. For:
H(a)=b
a is a preimage of b. This preimage may be a secret key, a password, or someone’s private information. We could thus prove virtually anything by hashing its digital form.
At the core of this proof is thus the usage of a hashing method, and in the integration with a blockchain. For this, our existing hashing methods can be expensive in computation time and in creating ZKP circuits. This can all increase gas costs. Overall, we need to constrain our hashing methods to finite field operations, as these fit in with our blockchain smart contract approach and allow us to efficiently build ZKP circuits. These methods are the Pedersen hash (and which uses elliptic curve maths) and the Poseidon hash (and…
