BLAKE was submitted to the NIST hash function competition by Jean-Philippe Aumasson, Luca Henzen, Willi Meier, and Raphael C.-W. Phan. In 2008, there were 51 entries. BLAKE made it to the final round consisting of five candidates but lost to Keccak in 2012, which was selected for the SHA-3 algorithm.
Like SHA-2, BLAKE comes in two variants: one that uses 32-bit words, used for computing hashes up to 256 bits long, and one that uses 64-bit words, used for computing hashes up to 512 bits long. The core block transformation combines 16 words of input with 16 working variables, but only 8 words (256 or 512 bits) are preserved between blocks.
It uses a table of 16 constant words (the leading 512 or 1024 bits of the fractional part of π), and a table of 10 16-element permutations:
The core operation, equivalent to ChaCha's quarter round, operates on a 4-word column or diagonal a b c d, which is combined with 2 words of message m[] and two constant words n[]. It is performed 8 times per full round:
In the above, r is the round number (0–13), and i varies from 0 to 7.
The differences from the ChaCha quarter-round function are:
"BLAKE reuses the permutation of the ChaCha stream cipher with rotations done in the opposite directions. Some have suspected an advanced optimization, but in fact it originates from a typo in the original BLAKE specifications", Jean-Philippe Aumasson explains in his "Crypto Dictionary".1
The 64-bit version (which does not exist in ChaCha) is identical, but the rotation amounts are 32, 25, 16 and 11, respectively, and the number of rounds is increased to 16.
Throughout the NIST hash function competition, entrants are permitted to "tweak" their algorithms to address issues that are discovered. Changes that have been made to BLAKE are: the number of rounds was increased from 10/14 to 14/16. This is to be more conservative about security while still being fast.
Hash values of an empty string:
Changing a single bit causes each bit in the output to change with 50% probability, demonstrating an avalanche effect:
(In this example 266 matching bits out of 512 is about 52% due to the random nature of the avalanche.)
BLAKE2 is a cryptographic hash function based on BLAKE, created by Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn, and Christian Winnerlein. The design goal was to replace the widely used, but broken, MD5 and SHA-1 algorithms in applications requiring high performance in software. BLAKE2 was announced on December 21, 2012.2 A reference implementation is available under CC0, the OpenSSL License, and the Apache License 2.0.34
BLAKE2b is faster than MD5, SHA-1, SHA-2, and SHA-3, on 64-bit x86-64 and ARM architectures.5 Its creators state that BLAKE2 provides better security than SHA-2 and similar to that of SHA-3: immunity to length extension, indifferentiability from a random oracle, etc.6
BLAKE2 removes addition of constants to message words from BLAKE round function, changes two rotation constants, simplifies padding, adds parameter block that is XOR'ed with initialization vectors, and reduces the number of rounds from 16 to 12 for BLAKE2b (successor of BLAKE-512), and from 14 to 10 for BLAKE2s (successor of BLAKE-256).
BLAKE2 supports keying, salting, personalization, and hash tree modes, and can output digests from 1 up to 64 bytes for BLAKE2b, or up to 32 bytes for BLAKE2s. There are also parallel versions designed for increased performance on multi-core processors; BLAKE2bp (4-way parallel) and BLAKE2sp (8-way parallel).
BLAKE2X is a family of extendable-output functions (XOFs). Whereas BLAKE2 is limited to 64-byte digests, BLAKE2X allows for digests of up to 256 GiB. BLAKE2X is itself not an instance of a hash function, and must be based on an actual BLAKE2 instance. An example of a BLAKE2X instance could be BLAKE2Xb16MiB, which would be a BLAKE2X version based on BLAKE2b producing 16,777,216-byte digests (or exactly 16 MiB, hence the name of such an instance).7
BLAKE2b and BLAKE2s are specified in RFC 7693. Optional features using the parameter block (salting, personalized hashes, tree hashing, et cetera), are not specified, and thus neither is support for BLAKE2bp, BLAKE2sp, or BLAKE2X.8
BLAKE2b uses an initialization vector that is the same as the IV used by SHA-512. These values are transparently obtained by taking the first 64 bits of the fractional parts of the positive square roots of the first eight prime numbers.
Pseudocode for the BLAKE2b algorithm. The BLAKE2b algorithm uses 8-byte (UInt64) words, and 128-byte chunks.
The Compress function takes a full 128-byte chunk of the input message and mixes it into the ongoing state array:
The Mix function is called by the Compress function, and mixes two 8-byte words from the message into the hash state. In most implementations this function would be written inline, or as an inlined function.
In addition to the reference implementation,24 the following cryptography libraries provide implementations of BLAKE2:
BLAKE3 is a cryptographic hash function based on Bao and BLAKE2, created by Jack O'Connor, Jean-Philippe Aumasson, Samuel Neves, and Zooko Wilcox-O'Hearn.25 It was announced on January 9, 2020, at Real World Crypto.26
BLAKE3 is a single algorithm with many desirable features (parallelism, XOF, KDF, PRF and MAC), in contrast to BLAKE and BLAKE2, which are algorithm families with multiple variants. BLAKE3 has a binary tree structure, so it supports a practically unlimited degree of parallelism (both SIMD and multithreading) given long enough input. The official Rust and C implementations27 are dual-licensed as public domain (CC0) and the Apache License.28
BLAKE3 is designed to be as fast as possible. It is consistently a few times faster than BLAKE2. The BLAKE3 compression function is closely based on that of BLAKE2s, with the biggest difference being that the number of rounds is reduced from 10 to 7, a change based on the assumption that current cryptography is too conservative.29 In addition to providing parallelism, the Merkle tree format also allows for verified streaming (on-the-fly verifying) and incremental updates.30
Aumasson, Jean-Philippe (2021). Crypto Dictionary: 500 Tasty Tidbits for the Curious Cryptographer. No Starch Press. ISBN 9781718501409. 9781718501409 ↩
O'Whielacronx, Zooko (21 December 2012). "introducing BLAKE2 – an alternative to SHA-3, SHA-2 and MD5". Archived from the original on 5 October 2016. Retrieved 27 January 2016. https://web.archive.org/web/20161005024333/https://lists.randombit.net/pipermail/cryptography/2012-December/003562.html ↩
"BLAKE2". blake2.net. https://blake2.net/ ↩
"BLAKE2 official implementations". GitHub. Retrieved 7 July 2019. https://github.com/BLAKE2/BLAKE2 ↩
Aumasson, Jean-Philippe; Neves, Samuel; Wilcox-O’Hearn, Zooko; Winnerlein, Christian (2013). "BLAKE2: simpler, smaller, fast as MD5" (PDF). Cryptology ePrint Archive. IACR. https://eprint.iacr.org/2013/322.pdf ↩
"BLAKE2X" (PDF). https://blake2.net/blake2x.pdf ↩
Saarinen, M-J; Aumasson, J-P (November 2015). The BLAKE2 Cryptographic Hash and Message Authentication Code (MAC). IETF. doi:10.17487/RFC7693. RFC 7693. Retrieved 4 December 2015. https://datatracker.ietf.org/doc/html/rfc7693 ↩
"About Chef Habitat". docs.chef.io. https://docs.chef.io/habitat/ ↩
"coreutils/src/blake2/". github.com. https://github.com/coreutils/coreutils/tree/master/src/blake2 ↩
"librsync/src/blake2/". github.com. https://github.com/librsync/librsync/tree/master/src/blake2 ↩
"WhatsApp Security Whitepaper" (PDF). https://www.whatsapp.com/security/WhatsApp-Security-Whitepaper.pdf ↩
"WinRAR archiver, a powerful tool to process RAR and ZIP files". rarsoft.com. https://rarsoft.com/rarnew.htm ↩
"Igor Pavlov's response to a user request for BLAKE3 support in 7-Zip". sourceforge.net. https://sourceforge.net/p/sevenzip/feature-requests/1489/#320e ↩
"rmlint — rmlint (2.8.0 Maidenly Moose) documentation". rmlint.readthedocs.io. https://rmlint.readthedocs.io/en/latest/rmlint.1.html ↩
"WireGuard: Next Generation Kernel Network Tunnel" (PDF). https://www.wireguard.com/papers/wireguard.pdf ↩
"work". docs.nano.org. https://docs.nano.org/integration-guides/work-generation/?h=+blake2b#work-equation ↩
"signatures". docs.nano.org. https://docs.nano.org/whitepaper/english/?h=+blake2b#signing-algorithm ↩
"key derivation". docs.nano.org. https://docs.nano.org/integration-guides/the-basics/?h=+blake2b#seed ↩
"Autolykos: The Ergo Platform PoW Puzzle" (PDF). ergoplatform.org. https://ergoplatform.org/docs/ErgoPow.pdf ↩
"Linux 5.17 Random Number Generator Seeing Speed-Ups, Switching From SHA1 To BLAKE2s". www.phoronix.com. https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.17-RNG ↩
"Subscriber Signing - Beckn". https://developers.becknprotocol.io/docs/infrastructure-layer-specification/authentication/subscriber-signing ↩
"checksum for Windows". corz.org. https://corz.org/windows/software/checksum/ ↩
"An earlier version of Bao specified its own custom tree mode, which eventually grew into BLAKE3". GitHub. https://github.com/oconnor663/bao/blob/ae247d2aff286dfe0a31d41b6afc02b263956091/docs/spec.md ↩
"JPA and I announced BLAKE3 at the RWC lightning talks..." Hacker News. https://news.ycombinator.com/item?id=22023152 ↩
"BLAKE3 official implementations". GitHub. Retrieved 12 January 2020. https://github.com/BLAKE3-team/BLAKE3 ↩
"This work is released into the public domain with CC0 1.0. Alternatively, it is licensed under the Apache License 2.0". GitHub. https://github.com/BLAKE3-team/BLAKE3/blob/master/LICENSE ↩
Aumasson, Jean-Philippe (2020). Too Much Crypto (PDF). Real World Crypto Symposium. https://eprint.iacr.org/2019/1492.pdf ↩
Larabel, Michael (13 October 2023). "OpenZFS 2.2 Released With Block Clning, Linux Container Support & Better Performanceo". Phoronix. Retrieved 21 May 2025. https://www.phoronix.com/news/OpenZFS-2.2-Released ↩