


Series Introduction
Welcome to a new series: Zero to Zero Knowledge!
In this series we will learn the fundamentals on a wide range of technologies that go into our privacy-preserving protocols.
Today we start with Hash Functions - a key piece of cryptography used in blockchains. Later in this series we'll cover some topics that rely on their properties.
Hash Functions take an input of any length and produce an output of a fixed length.

Let's get a hands-on understanding using this tool!
Enter any arbitrary text to produce a fixed-length output. Observe how the output varies depending on the different hashing algorithm.
Try it out: https://cryptii.com/pipes/hash-function
Cryptographic Hash Functions must have these 3 properties:
There are several classes of Hash Functions. Some examples:
An introduction to BLAKE2: https://www.blake2.net
Data integrity checks are an example of "Integrity Hashing". They are used to generate checksums on data files and provide assurance of correctness to a user.

A hash tree or Merkle tree is composed of branches and leaf nodes that are labelled with the cryptographic hash of a data block.

Merkle trees are an example of a cryptographic commitment scheme. The tree Root is seen as a commitment and leaf nodes proven to be part of the original commitment.
They verify data stored or transferred on P2P networks, ensuring data received from peers is unaltered.
In Zcash Sapling & Orchard shielded pools, the Note Commitment Tree is used to verify transactions are valid against consensus while perfectly hiding the sender, recipient & amounts consumed.
SHA256 is an example of a "Signature hash" used to enforce immutability of each block in the Bitcoin chain. Miners use the hash of previous block + A hash of all transactions in the current block (hashMerkleRoot) + Timestamp + random value / network difficulty for new blocks.

Equihash is the hashing algorithm used in mining Zcash. It's also used by networks such as Komodo & Horizen.
Equihash: Asymmetric Proof-of-Work Based on the Generalized Birthday Problem (Biryukov and Khovratovich): https://eprint.iacr.org/2015/946
To build a greater understanding of the different types of hash functions and their associated uses, this is an excellent resource:
https://en.wikipedia.org/wiki/Hash_function
Thread by ZecHub (@ZecHub)
Original X thread: https://x.com/ZecHub/status/1621240109663227906
This page was compiled from the original Zero to Zero Knowledge thread for the ZecHub wiki.