Subject
blake2 0.10.6 is the RustCrypto project's pure-Rust implementation of the BLAKE2 hash function family. It implements BLAKE2b (512-bit internal state, up to 64-byte output) and BLAKE2s (256-bit internal state, up to 32-byte output), including fixed-length, variable-length, and keyed MAC variants per RFC 7693. Public types include Blake2b512, Blake2s256, Blake2bVar, Blake2sVar, Blake2bMac, and Blake2sMac, all generic over output size and integrating with the RustCrypto digest framework. Optional features expose SIMD-accelerated compression and an assembly-level NEON path for 32-bit ARM. The single runtime dependency is digest 0.10.3.
Methodology
The audit used openvet 0.6.0 and diff. All 1304 lines of source in contents/src/ were read in full. The VCS checkout at vcs/ differs from the published crate only in Cargo.toml (cargo normalization); there are no source-file divergences. The vcs/ directory does not contain a .git directory because openvet clones only the tree for the tagged commit; the VCS integrity check relies on the byte-exact diff against contents. The SIGMA permutation table and IV constants in src/consts.rs were verified by inspection against RFC 7693 Appendix A and C. The binary test-vector files (blake2b/mac.blb, blake2s/mac.blb) derive from the official BLAKE2 test vectors. The digest::new_test! and digest::new_mac_test! macros run these vectors against the crate's output. No fuzzer or MIRI run was performed as part of this audit.
Results
The published crate is byte-for-byte identical to the tagged VCS tree (1f727ce37ff40fa0cce84eb8543a45bdd3ca4a4e, path blake2/) apart from the cargo-normalized Cargo.toml. No binary assets are present (has-binaries). There is no build script and no proc macro (has-build-exec, has-install-exec). The crate makes no network, filesystem, environment, or concurrency calls (uses-network, uses-filesystem, uses-environment, uses-concurrency, uses-exec, uses-jit, uses-interpreter, uses-concurrency).
The implementation is #![no_std] with an optional std feature. The compression function in src/macros.rs implements the BLAKE2 G mixing function with the SIGMA permutation table, 10 rounds for Blake2s and 12 rounds for Blake2b, and correct counter XOR at finalization, all matching RFC 7693. The parameter block construction in new_with_params correctly encodes key size, output size, salt, and persona in little-endian format. Endianness is handled by combining from_ne_bytes for message loading with Vector4::from_le() byte-swapping in quarter_round, which is correct on both architectures (a prior big-endian bug was fixed in 0.10.4). The MAC key block setup pads the key to a full block and submits it as the first message block, per RFC 7693 section 2.6. The integration tests run the official BLAKE2 test vectors for keyed and unkeyed modes, and two additional persona/salt test cases. Justifies impl-crypto, uses-crypto, crypto-impl-correct, crypto-impl-tested, has-unit-tests, has-integration-tests, has-fuzz-tests, has-property-tests, is-benign.
The crate uses unsafe in 14 places (uses-unsafe). All unsafe is confined to the SIMD acceleration path (src/simd/, only active under the nightly-only simd feature) and the AsBytes byte-reinterpretation utility (src/as_bytes.rs). The unsafe is narrowly scoped and not gratuitous (unsafe-minimal). However, none of the unsafe blocks carry // SAFETY: comments, and the Safe trait suppresses clippy's missing_safety_doc lint with an #[allow] attribute. The ARM NEON inline-assembly path in src/simd/simd_opt/u64x4.rs:110-134 has no documented ABI invariants. Because the invariants are not stated, unsafe-safe and unsafe-documented are both false. The test suite does not include MIRI or sanitizer runs for the unsafe code paths (unsafe-tested).
The MAC types Blake2bMac and Blake2sMac store the key in a LazyBuffer and, when the reset feature is enabled, in a separate key_block field. Neither field is zeroized on drop. This means key material persists in memory after the MAC object is dropped, a known gap for contexts where key confidentiality after deallocation matters. This is why crypto-impl-safe is false. The crate's direct use of the digest framework's MAC interface is otherwise correct (crypto-safe). No network, filesystem, or environment access occurs; the crate implements no concurrency primitives and no algorithms outside of the cryptographic hash (impl-algorithm, impl-datastructure, impl-concurrency, impl-parser, impl-interpreter, impl-jit, impl-protocol are all false).
Conclusion
blake2 0.10.6 implements BLAKE2b and BLAKE2s per RFC 7693, with keyed MAC, variable-output, and SIMD-accelerated variants. Two findings were recorded: a low-severity quality finding that the 14 unsafe blocks carry no // SAFETY: comments, and a low-severity security finding that MAC key material is not zeroized on drop. The SIGMA permutation table and IVs were verified against the RFC. The integration test suite covers keyed and unkeyed modes with official BLAKE2 test vectors.