1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-19 13:16:05 +02:00
official implementations of the BLAKE3 cryptographic hash function https://github.com/BLAKE3-team/BLAKE3
Go to file
Jack O'Connor f79c648cec update the throughput graph 2020-01-05 20:42:20 -05:00
.github/workflows test release mode in CI 2019-12-13 13:15:48 -05:00
b3sum make the --length argument require a value 2020-01-05 19:21:47 -05:00
benches rename 1_chunk benchmarks to 1_kib 2019-12-13 10:06:46 -05:00
media update the throughput graph 2020-01-05 20:42:20 -05:00
reference_impl switch to the new permutations 2020-01-05 14:57:17 -05:00
src switch to the new permutations 2020-01-05 14:57:17 -05:00
test_vectors switch to the new permutations 2020-01-05 14:57:17 -05:00
.gitignore add portable.rs 2019-12-02 17:30:55 -05:00
CONTRIBUTING.md move authors to readme 2019-12-04 18:58:03 +01:00
Cargo.toml make the "c_avx512" feature a no-op on non-x86 2019-12-12 15:13:04 -05:00
LICENSE add a LICENSE file including CC0 and Apache 2.0 2019-12-15 17:44:01 -05:00
README.md update the throughput graph 2020-01-05 20:42:20 -05:00
build.rs make the "c_avx512" feature a no-op on non-x86 2019-12-12 15:13:04 -05:00

BLAKE3

BLAKE3 is a cryptographic hash function that is

  1. Faster than MD5, SHA1, SHA2, SHA3, and even BLAKE2.
  2. 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 MerkleTree under the hood.)
  3. Capable of verified streaming and incremental updates. (Again: the magic of Merkle Trees.)
  4. Carefully engineered to be simple and safe to use, with no "flavors" or variants.

performance graph

The complete specifications and design rationale are available as a PDF and its LaTeX source.

This repository provides the official Rust implementation of BLAKE3, which includes both a portable implementation and also optimized versions for various instructions sets, using dynamic CPU feature detection on x86. SSE4.1 and AVX2 support are implemented in Rust and always available, while AVX-512 and NEON support are implemented in C and gated by the c_avx512 and c_neon features. Multi-threading is implemented with Rayon and gated 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:

WARNING: BLAKE3 is not a password hash, 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

History

BLAKE3 is essentially an adapted version of BLAKE2 using the Bao tree mode.

BLAKE2 is an established cryptographic hash function, for example supported by OpenSSL, and used in countless applications. Bao is a tree hashing mode satisfying the requirements for provably secure tree hashing.

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.