Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Argon2

Direct answer

Argon2 (Argon2id) is the recommended modern password hashing algorithm. It is memory-hard and configurable in memory, time and parallelism, making GPU and ASIC cracking expensive.

When to use this

Use this when storing passwords with the recommended modern algorithm.

First 30 seconds

1. Argon2id: winner of the Password Hashing Competition, memory-hard.

2. Recommended default.

3. OWASP: e.g. m=19 MiB, t=2, p=1 minimum.

4. Encode parameters in hash string.

5. Rehash when increasing parameters.

Operational verification

password + salt + m,t,p → Argon2id

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Using Argon2i or Argon2d instead of Argon2id for passwords.
  • Memory set so high that many simultaneous logins exhaust the server.
  • Not storing the parameters, making later verification impossible.
  • Tuning by guesswork — measure: aim for ~100–500 ms per hash on your hardware.
Platform / version applicability
Cryptography, PKI and secrets
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCryptography, PKI and secrets
Scope / prerequisiteUse this when storing passwords with the recommended modern algorithm.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Argon2id is memory-hard.
  • Tune memory, time and parallelism.
  • Use a unique salt per password.
Key checks
  • python3 -c "from argon2 import PasswordHasher;print(PasswordHasher().hash('pw'))" — Argon2id hash
  • Parameters: memory, iterations, parallelism — OWASP minimums
  • argon2 <salt> -id -m 16 -t 3 -p 1 <<< pw — CLI test
ReferenceWhy it matters1 section · depth on demand

Variants and parameters

VariantUse
Argon2idPassword hashing (recommended)
Argon2iSide-channel resistant, used for key derivation
Argon2dFastest, GPU resistant but leaks via side channels

Tune memory first (e.g. 64 MiB), then iterations until a hash takes 0.1–0.5 s on your server; parallelism to the number of cores you can spare. The encoded string $argon2id$v=19$m=65536,t=3,p=4$... stores all parameters.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Argon2 won the Password Hashing Competition in 2015 and is the recommended password hashing algorithm. Argon2id — a hybrid of the data-dependent Argon2d and data-independent Argon2i — resists both GPU cracking and side-channel attacks.

Parameters (OWASP recommendations, choose one):

MemoryIterationsParallelism
19 MiB21
46 MiB11
from argon2 import PasswordHasher
ph = PasswordHasher(memory_cost=19456, time_cost=2, parallelism=1)
h = ph.hash(password)
ph.verify(h, password)
if ph.check_needs_rehash(h): h = ph.hash(password)

Increase memory cost as far as your servers allow under peak login load; memory hardness is what makes large-scale guessing expensive.

Example

argon2 "somesalt" -id -t 2 -m 16 -p 1 <<< "password"   # m=2^16 KiB = 64 MiB

Documented example, not captured output. In code use libraries such as argon2-cffi (Python) or PHP password_hash($p, PASSWORD_ARGON2ID). Store the full encoded string ($argon2id$v=19$m=...,t=...,p=...$salt$hash), which includes the parameters.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCryptography, PKI and secrets current

Authoritative/upstream documentation reviewed for bounded claims in Hashing → Argon2. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://csrc.nist.gov/pubs/fips/180-4/upd1/final · confidence 94%
Confirmation

Confirm action

Continue?