Cryptography

BLAKE3: The Hash Function Built Like a Tree

July 21, 2026 8 min read Haven Team

Cryptographic hash functions are the quiet workhorses of security. They fingerprint files, anchor digital signatures, verify downloads, and derive keys. Most of the well-known ones, from SHA-256 onward, process data in a single strict line from start to finish. BLAKE3, released in 2020, throws out that constraint by structuring the hash as a tree, and in doing so it becomes fast, parallel, and unusually flexible.


A cryptographic hash takes any input, from a single byte to a terabyte, and produces a fixed-size fingerprint. Change one bit of the input and the fingerprint changes completely. The properties that make it useful are simple to state: you cannot find two inputs with the same fingerprint, and you cannot work backward from a fingerprint to an input. Those guarantees are what let a hash stand in for the data itself in signatures, integrity checks, and Merkle trees.

BLAKE3 comes from a strong lineage. It descends from BLAKE2, which itself descends from BLAKE, a finalist in the SHA-3 competition that many cryptographers considered the most conservative and well-analyzed of the candidates. BLAKE3's designers, Jack O'Connor, Jean-Philippe Aumasson, Samuel Neves, and Zooko Wilcox-O'Hearn, kept the trusted core and redesigned everything around how the data flows through it.

The problem with a single chain

Traditional hashes like SHA-256 use a construction where each block of the message is folded into a running internal state, one block after another, in order. Block two cannot be processed until block one is done, because it needs the state that block one produced. This is simple and secure, but it has a cost: it is inherently sequential. A modern processor with eight cores and wide vector instructions spends most of its capacity idle, because the algorithm insists on doing one thing at a time.

For decades that was acceptable, because hashing was rarely the bottleneck. But data got bigger, storage got faster, and content-addressed systems began hashing everything constantly. The sequential ceiling started to matter.

Hashing as a tree

BLAKE3 splits the input into chunks of a fixed size, one kilobyte each. Each chunk is hashed independently, which means all of them can be hashed at the same time, on different cores, or with vector instructions that handle several at once. The chunk results become the leaves of a binary tree. Pairs of leaves are combined into parent nodes, those parents are combined again, and so on up to a single root. The root is the final hash.

Why the tree matters

Because independent chunks can be hashed in parallel, BLAKE3 scales with the hardware you have. On a machine with many cores it can be dramatically faster than a sequential hash on the same data, and its use of vector instructions speeds it up even on a single core. More silicon means more speed, with no change to the output.

The tree is not just a speed trick. It unlocks capabilities that a linear hash cannot offer. Because every subtree has its own hash, you can verify a piece of a large file without having the whole thing. This is exactly the property that makes Merkle trees valuable in distributed systems, and BLAKE3 has it built in. You can stream a download and verify each block as it arrives, or update the hash of a huge file after changing one section without rehashing everything.

One function, three jobs

A subtle strength of BLAKE3 is that it collapses several separate cryptographic tools into a single primitive with different modes. In older stacks you would reach for one algorithm to hash, a different construction like HMAC to authenticate a message, and yet another like HKDF to derive keys. BLAKE3 offers all three as modes of the same function.

Mode What it does
Hash The ordinary fingerprint of some data, with no key.
Keyed hash A message authentication code. Feed a secret key and the output proves the data came from someone holding that key, replacing the need for a separate HMAC construction.
Key derivation Turn a master secret and a context string into as many derived keys as you need, each bound to its context.

There is one more property that sets BLAKE3 apart from fixed-length hashes: it is an extendable-output function. You can ask it for a 32-byte digest, or 64 bytes, or a megabyte of pseudorandom output, all from the same computation. This makes it usable as a stream cipher keystream or a deterministic random bit source, not only as a fingerprint.

Is it secure?

Speed in a hash function should always raise an eyebrow, because the easiest way to make a hash fast is to make it weak. BLAKE3's answer is that its security comes from its heritage, not from cutting corners. The core compression function is a reduced-round version of BLAKE2's, which was in turn built on the heavily analyzed BLAKE design. BLAKE3 targets 128 bits of security, which is the standard modern bar and matches what applications expect from a 256-bit hash.

A faster hash is only a benefit if it is still a hash. BLAKE3's design choice was to keep a conservative, well-studied core and win its speed from structure and parallelism rather than from a thinner cipher. That is the right place to find performance. On the speed-versus-safety trade

It is worth being honest about standing. SHA-256 and SHA-3 are NIST standards with more than a decade of formal scrutiny and near-universal support in hardware and protocols. BLAKE3 is newer and not a government standard, which matters in regulated contexts and for long-lived interoperability. For a great many applications, though, especially internal systems, content addressing, file verification, and high-throughput pipelines, BLAKE3's combination of speed and flexibility is a strong fit.

Where you already meet it

BLAKE3 has spread quickly for a function this young. It shows up in build systems and content-addressed storage, in peer-to-peer file transfer tools that verify chunks as they arrive, in package managers checking integrity, and in version control and backup software where the ability to hash enormous trees quickly is a direct win. Its reference implementation is available in Rust and C with bindings for most languages, which lowered the barrier to adoption considerably.

The broader point BLAKE3 illustrates is that even a mature, seemingly settled corner of cryptography still has room for real engineering gains. Hashing looked like a solved problem. Rethinking the data flow, from a strict chain into a tree, produced something that verifies streams, uses every core, and serves as hash, MAC, and key derivation function at once. When you evaluate the tools that protect your data, it is worth remembering that the choice of primitive is not frozen in time. The same instinct that keeps cryptographers testing old assumptions is what produced modern authenticated ciphers and, here, a hash function shaped like a tree.

Try Haven free for 15 days

Encrypted email and chat in one app. No credit card required.

Get Started →