A collection of password hashing algorithms and key derivation functions implemented in pure Rust.
RustCrypto/password-hashes is a collection of password hashing algorithms and key derivation functions implemented in pure Rust. It provides secure implementations of algorithms like Argon2, bcrypt, PBKDF2, and scrypt for storing and verifying passwords in Rust applications. The project solves the problem of securely handling user passwords by offering modern, audited cryptographic primitives.
Rust developers building applications that require secure password storage and authentication systems, particularly those implementing user login functionality or password-based encryption.
Developers choose this collection because it provides pure Rust implementations of multiple password hashing algorithms with a unified API, eliminating C dependencies and ensuring memory safety. It follows cryptographic best practices and references OWASP guidelines for secure password storage.
Password hashing functions / KDFs
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports seven algorithms including Argon2, bcrypt, and scrypt, providing flexibility to choose based on security needs and compatibility, as detailed in the README's table.
Implemented entirely in Rust with no C dependencies, ensuring memory safety and eliminating FFI complexities, which is emphasized in the project's philosophy.
Offers a common trait-based interface (PasswordVerifier) for verifying passwords across different algorithms, simplifying code as shown in the usage example.
References the OWASP Password Storage Cheat Sheet directly, helping developers select secure algorithms following modern best practices.
Dual-licensed under Apache 2.0 or MIT, allowing easy integration into both open-source and commercial projects without licensing conflicts.
Each algorithm is a separate crate, requiring multiple dependencies and potentially increasing setup complexity and maintenance overhead.
Prioritizes correctness and safety over performance optimizations, which may result in slower hashing compared to optimized C libraries, as noted in the philosophy.
Lacks a recommended default algorithm or configuration, forcing developers to make informed choices that could lead to suboptimal or insecure setups.
MSRV bumps are treated as breaking changes with minor version updates, potentially causing disruption in long-term projects, as stated in the MSRV policy.