BLAKE3 v0.3.7 releases: The BLAKE3 cryptographic hash function
BLAKE3 is a cryptographic hash function that is:
- Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2.
- Secure, unlike MD5 and SHA-1. And secure against length extension, unlike SHA-2.
- Highly parallelizable across any number of threads and SIMD lanes, because it’s a Merkle tree on the inside.
- Capable of verified streaming and incremental updates, again because it’s a Merkle tree.
- A PRF, MAC, KDF, and XOF, as well as a regular hash.
- One algorithm with no variants, which is fast on x86-64 and also on smaller architectures.
The chart below shows BLAKE3’s performance on modern server hardware, an Intel Cascade Lake-SP 8275CL processor:
BLAKE3 is based on an optimized instance of the established hash function BLAKE2 and on the original Bao tree mode. The specifications and design rationale are available in the BLAKE3 paper. The default output size is 256 bits. The current version of Bao implements verified streaming with BLAKE3.
This repository provides the official Rust implementation of BLAKE3, with
blake3Rust crate, which includes optimized SIMD implementations, using dynamic CPU feature detection on x86. SSE4.1 and AVX2 support are implemented in Rust, while AVX-512 and ARM NEON support are implemented in C and controlled by the
c_neonfeatures. Multi-threading is implemented with Rayon and controlled by the
- A simplified reference implementation, which is portable and
b3sumsub-crate, which provides a command-line interface. You can install it with
cargo install b3sum. It includes multi-threading and AVX-512 support by default.
Changes since 0.3.6:
- BUGFIX: The C implementation was incorrect on big endian systems for
inputs longer than 1024 bytes. This bug affected all previous versions
of the C implementation. Little endian platforms like x86 were
unaffected. The Rust implementation was also unaffected.
@jakub-zwolakowski and @pascal-cuoq from TrustInSoft reported this
- BUGFIX: The C build on x86-64 was producing binaries with an
executable stack. @tristanheaven reported this bug:
- @mkrupcale added optimized implementations for SSE2. This improves
performance on older x86 processors that don’t support SSE4.1.
- The C implementation now exposes the
blake3_hasher_init_derive_key_rawfunction, to make it easier to
implement language bindings. Added by @k0001.
Copyright 2019 Jack O’Connor and Samuel Neves