BLAKE3 v1.5 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.
  • PRFMACKDF, 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

  • The blake3 Rust 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_avx512 and c_neon features. Multi-threading is implemented with Rayon and controlled by the rayon feature.
  • A simplified reference implementation, which is portable and no_std-compatible.
  • The b3sum sub-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.

Changelog v1.5

Changes since 1.4.1:

  • The Rust crate’s Hasher type has gained new helper methods for common
    forms of IO: update_reader, update_mmap, and update_mmap_rayon. The
    latter matches the default behavior of b3sum. The mmap methods are
    gated by the new “mmap” Cargo feature.
  • Most of the Rust crate’s public types now implement the Zeroize trait.
    This is gated by the new “zeroize” Cargo feature.
  • The Rust crate’s Hash types now implements the serde Serialize and
    Deserialize traits. This is gated by the new “serde” Cargo feature.
  • The C library now uses atomics to cache detected CPU features under
    most compilers other than MSVC. Previously this was a non-atomic
    write, which was probably “benign” but made TSan unhappy.
  • NEON support is now disabled by default on big-endian AArch64.
    Previously this was a build error if the caller didn’t explicitly
    disable it.

Download && Use

Copyright 2019 Jack O’Connor and Samuel Neves