.github/workflows | ||
b3sum | ||
benches | ||
media | ||
reference_impl | ||
src | ||
test_vectors | ||
.gitignore | ||
build.rs | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md |
BLAKE3
BLAKE3 is a cryptographic hash function that is:
- Faster than MD5, SHA1, SHA2, SHA3, and even BLAKE2.
- Highly parallelizable: The more data and the more cores, the faster it goes. (For you specialists reading this: this is because it is actually a Merkle tree under the hood.)
- Capable of verified streaming and incremental updates. (Again: the magic of Merkle trees.)
- Supporting simple hashing as well as PRF, MAC, KDF, XOF
- Carefully engineered to be simple and safe to use, with no "flavors" or variants.
BLAKE3 is based on an optimized instance of the established hash function BLAKE2, and on the Bao tree mode. The BLAKE3 specifications and design rationale are available in the BLAKE3 paper.
This repository provides the official Rust implementation of BLAKE3, the
blake3
crate. It 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. This repository also hosts the simplified reference
implementation, which is portable and
no_std
-compatible.
The b3sum
sub-crate provides a command line interface. You
can install it with cargo install b3sum
. It includes multi-threading
and AVX-512 support by default.
BLAKE3 was designed by:
- @oconnor63 (Jack O'Connor)
- @sneves (Samuel Neves)
- @veorq (Jean-Philippe Aumasson)
- @zookozcash (Zooko)
The development of BLAKE3 was sponsored by Teserakt and Electric Coin Company.
WARNING: BLAKE3 is not a password hashing algorithm, because it's designed to be fast, whereas password hashing should not be fast. If you hash passwords to store the hashes or if you derive keys from passwords, we recommend Argon2.
Usage
TODO
Contributing
Please see CONTRIBUTING.md
Intellectual property
The source code in the present repository is dual-licensed under CC0 1.0 and Apache 2.0 licences.
The Rust code is copyright Jack O'Connor, 2019. The C code is copyright Samuel Neves and Jack O'Connor, 2019.