# argon2 (RustCrypto)

> Pure Rust implementation of the Argon2 password hashing function.

Source: https://talira.ai/catalog/argon2-rustcrypto-5spp967x
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [security / auth / libraries](https://talira.ai/categories/security/auth/libraries), [security / encryption](https://talira.ai/categories/security/encryption), [languages / rust](https://talira.ai/categories/languages/rust)
- Platforms: linux, macos, windows
- Licence: MIT OR Apache-2.0
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Backed by: [RustCrypto](https://talira.ai/orgs/rustcrypto.md)

The argon2 crate from the RustCrypto project implements Argon2, the winner of the Password Hashing Competition and RFC 9106, in pure Rust: Argon2d, Argon2i and Argon2id (the default). It hashes and verifies passwords as PHC strings through the password-hash crate's traits, so stored hashes carry their algorithm and parameters, and it also derives raw keys from passwords. It works without the standard library (no_std), and can zero secrets in memory when they are dropped (the zeroize feature).

## Links

- Website: https://github.com/RustCrypto/password-hashes/tree/master/argon2
- GitHub: https://github.com/RustCrypto/password-hashes
- Docs: https://docs.rs/argon2

## Problems it solves

- hash user passwords in my Rust web app so a database leak doesn't expose them
- store passwords with Argon2id instead of bcrypt or SHA-256 in a Rust server
- verify a password against a stored PHC string like $argon2id$v=19$m=19456,t=2,p=1$...
- derive an encryption key from a passphrase in Rust
- a password hashing library in pure Rust with no C dependencies or OpenSSL
- build email and password sign-in for a Loco or Axum app
- hash passwords in a no_std or embedded Rust target

## Features

- Argon2d, Argon2i and Argon2id (default)
- PHC string hashing and verification via the password-hash traits
- raw key derivation (hash_password_into)
- configurable memory, time and parallelism parameters
- no_std support
- optional zeroize of secrets
- pure Rust, no C code

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.51 out of 1.
Signals: maintenance 0.71, adoption 0.59, momentum 0.29, community 0.72, backing 0.30, extensibility 0.00.

- last commit 14 days ago
- 17 commits in the last 90 days
- 923 GitHub stars
- 63 contributors
- backed by RustCrypto
