argon2

A pure-Rust implementation of the Argon2 password hashing function

Library
Cargo
v0.6.0-rc.8
906stars
MIT OR Apache-2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
57/100Fair
Development Activity64
Maintenance16
Community60
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
81/100Excellent
Architecture85
Code Quality88
Innovation80
Learning Curve70

argon2 is a pure-Rust implementation of Argon2, the memory-hard password hashing function that won the Password Hashing Competition in 2015. It implements all three algorithmic variants — Argon2d (GPU-cracking resistant), Argon2i (side-channel resistant), and Argon2id (the recommended hybrid default) — and integrates with the RustCrypto password-hash crate for PHC string encoding/decoding and trait-based password verification.

The crate is part of the RustCrypto password-hashes workspace, which also houses PBKDF2, scrypt, bcrypt-pbkdf, Balloon hashing, SHA-crypt, and yescrypt implementations sharing a common PasswordVerifier/PasswordHash (PHC string) interface. It supports no_std environments (including without alloc), making it usable in embedded targets as well as standard server-side authentication code.

What You Get

  • All three Argon2 variants (Argon2d, Argon2i, and the default Argon2id hybrid)
  • Optional integration with the password-hash crate for PHC string encoding/parsing and a common PasswordVerifier trait shared with pbkdf2, scrypt, and other RustCrypto hashers
  • no_std support, including alloc-free configurations for embedded/constrained targets
  • Optional parallel feature (via rayon) for multi-threaded hashing and a zeroize feature for secure memory wiping of sensitive buffers
  • Configurable Params for memory cost, time cost, and parallelism tuning per OWASP recommendations

Common Use Cases

  • Hashing and verifying user passwords for authentication in a Rust web service or CLI tool
  • Building a multi-algorithm password verifier that can check hashes produced by Argon2, PBKDF2, or scrypt against a single PHC-format string
  • Deriving encryption keys from a low-entropy passphrase (e.g. for at-rest file/database encryption) using Argon2’s memory-hard KDF properties
  • Embedded or constrained targets that need password/key hashing without a standard allocator (no_std, no-alloc builds)

Under The Hood

Architecture: The crate is organized around algorithm.rs (Argon2 core: block filling, mixing, and the d/i/id variant dispatch), block.rs (the 1KB Argon2 memory block type and operations over it), memory.rs (the working-memory matrix the algorithm iterates over), blake2b_long.rs (the variable-output Blake2b hash used internally by Argon2), params.rs (memory/time/parallelism cost parameters and validation), and error.rs/version.rs; lib.rs ties these into the public Argon2 struct implementing the optional password-hash crate’s PasswordHasher/PasswordVerifier traits. Tech Stack: Rust 2024 edition (MSRV 1.85), no_std-first with alloc as an additive feature; depends on base64ct (constant-time base64 for PHC strings) and blake2 for the internal hash primitive, with optional rayon (parallel feature) and zeroize (secure memory wiping) as opt-in features. Code Quality: Ships an extensive [lints.clippy]/[lints.rust] block enforcing missing_docs, unwrap_used warnings, cast-safety lints, and undocumented-unsafe-block checks — a notably strict lint posture for a security-sensitive crate — plus a tests/ directory with known-answer vectors; CI badges reference a dedicated argon2.yml workflow. API Design: The crate offers both a minimal low-level API (Argon2::new(...).hash_password(...)) and, through the shared password-hash trait objects, a pluggable multi-algorithm verifier pattern (as shown in the repo’s own README) that lets callers check a PHC hash string against Argon2, PBKDF2, or scrypt without knowing in advance which algorithm produced it — a deliberate ergonomic win for migrating between hashing schemes.

Used by 10 apps in this directory

TypeScript
75%
GPL 3.0

Bramble

Password Manager · Security · Authentication

315

Local-first, end-to-end encrypted password manager that syncs your vault directly between your own devices over a private peer-to-peer mesh — no server, no account, no cloud in the middle.

View details
73
Repo Health
84
Technical
72
Dependency
Built with
TypeScript75%
Updated today
Rust
50%
Other

hoodik

File Storage · Security

1,446

Self-hosted, end-to-end encrypted cloud storage with browser-based encryption and S3-compatible storage support

View details
74
Repo Health
71
Technical
65
Dependency
Built with
Rust50%
TypeScript33%
Vue15%
Updated 4 days ago
Rust
41%
Other

Hook0

Devops

1,477

Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.

View details
83
Repo Health
82
Technical
70
Dependency
Built with
Rust41%
TypeScript17%
JavaScript15%
Updated today
Rust
47%
MIT

Kuku

Note Taking

204

A local-first, open-source Markdown knowledge workspace for macOS — plain files, personal wiki and Second Brain workflows, AI-assisted diffs, and encrypted sync, built as an Obsidian alternative.

View details
73
Repo Health
67
Technical
68
Dependency
Built with
Rust47%
TypeScript40%
Updated 1 months ago
JavaScript
57%
Other

Lokus

Note Taking · Knowledge Management

774

Local-first note-taking with graph view, canvas & AI plugins—your Markdown files, zero telemetry, blazing-fast Rust performance.

View details
78
Repo Health
75
Technical
65
Dependency
Built with
JavaScript57%
HTML24%
Updated 1 weeks ago
Rust
72%
Apache 2.0

mesh-llm

AI Development · AI Agents

3,258

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
83
Repo Health
91
Technical
70
Dependency
Built with
Rust72%
TypeScript16%
Updated today
Rust
77%
AGPL 3.0

Spacedrive

File Storage · Collaboration

38,790

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
60
Repo Health
84
Technical
65
Dependency
Built with
Rust77%
TypeScript20%
Updated 3 weeks ago
Rust
98%

Stalwart

Collaboration

14,255

All-in-one secure mail and collaboration server covering IMAP, JMAP, SMTP, CalDAV, CardDAV, and WebDAV in a single memory-safe Rust binary.

View details
89
Repo Health
81
Technical
68
Dependency
Built with
Rust98%
Updated yesterday
Rust
93%
Other

Tabby

AI Code Assistants

33,828

Self-hosted AI coding assistant — run GitHub Copilot-grade code completion on your own hardware with no cloud dependency.

View details
61
Repo Health
78
Technical
63
Dependency
Built with
Rust93%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search