Hashes
Collection of cryptographic hash functions written in pure Rust
Install / Use
/learn @RustCrypto/HashesREADME
RustCrypto: Hashes
Collection of cryptographic hash functions written in pure Rust.
All algorithms reside in separate crates and are implemented using traits from digest crate.
Usage examples are provided in digest and hash implementation crate docs.
Additionally all crates do not require the standard library (i.e. no_std capable) and can be
easily used for bare-metal or WebAssembly programming by disabling default crate features.
Supported Algorithms
Note: For new applications, or where compatibility with other existing standards is not a primary concern, we strongly recommend to use either BLAKE3, SHA-2 or SHA-3.
| Algorithm | Crate | Crates.io | Documentation | MSRV | Security |
|-----------|-------|:---------:|:-------------:|:----:|:----------:|
| Ascon hash | ascon‑hash256 | |
| 1.85 | :green_heart: |
| Bash hash |
bash‑hash | |
| 1.85 | :green_heart: |
| BelT hash |
belt‑hash | |
| 1.85 | :green_heart: |
| BLAKE2 |
blake2 | |
| 1.85 | :green_heart: |
| [FSB] |
fsb | |
| 1.85 | :green_heart: |
| [GOST R 34.11-94][GOST94] |
gost94 | |
| 1.85 | :yellow_heart: |
| [Grøstl] (Groestl) |
groestl | |
| 1.85 | :green_heart: |
| [JH] |
jh | |
| 1.85 | :green_heart: |
| [KangarooTwelve] |
k12 | |
| 1.85 | :green_heart: |
| [Kupyna] |
kupyna | |
| 1.85 | :green_heart: |
| [MD2] |
md2 | |
| 1.85 | :broken_heart: |
| [MD4] |
md4 | |
| 1.85 | :broken_heart: |
| [MD5] |
md5 :exclamation: | |
| 1.85 | :broken_heart: |
| [RIPEMD] |
ripemd | |
| 1.85 | :green_heart: |
| [SHA-1] |
sha1 | |
| 1.85 | :broken_heart: |
| [SHA-1 Checked] |
sha1-checked | |
| 1.85 | :yellow_heart: |
| [SHA-2] |
sha2 | |
| 1.85 | :green_heart: |
| [SHA-3] (Keccak) |
sha3 | |
| 1.85 | :green_heart: |
| [SHABAL] |
shabal | |
| 1.85 | :green_heart: |
| [Skein] |
skein | |
| 1.85 | :green_heart: |
| [SM3] (OSCCA GM/T 0004-2012) |
sm3 | |
| 1.85 | :green_heart: |
| [Streebog] (GOST R 34.11-2012) |
streebog | |
| 1.85 | :yellow_heart: |
| [Tiger] |
tiger | |
| 1.85 | :green_heart: |
| [Whirlpool] |
whirlpool | |
| 1.85 | :green_heart: |
NOTE: the blake3 crate implements the digest traits used by the rest of the hashes in this repository, but is maintained by the BLAKE3 team.
Security Level Legend
The following describes the security level ratings associated with each hash function (i.e. algorithms, not the specific implementation):
| Heart | Description | |:--------------:|-------------| | :green_heart: | No known successful attacks | | :yellow_heart: | Theoretical break: security lower than claimed | | :broken_heart: | Attack demonstrated in practice: avoid if at all possible |
See the Security page on Wikipedia for more information.
Crate Names
Whenever possible crates are published under the same name as the crate folder.
Owners of md5 declined to participate in this project.
This crate does not implement the digest traits, so it is not interoperable with the RustCrypto ecosystem.
This is why we publish our MD5 implementation as md-5 and mark it with the :exclamation: mark.
Note that the library itself is named as md5, i.e. inside use statements you should use md5, not md_5.
License
All crates in this repository are licensed under either of
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Related Skills
himalaya
338.7kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
coding-agent
338.7kDelegate coding tasks to Codex, Claude Code, or Pi agents via background process
