RFC 9106: Argon2 for password hashing
Summary
In September 2021, Alex Biryukov, Daniel Dinu, Dmitry Khovratovich and Simon Josefsson described the password hashing function Argon2 in version 1.3 in RFC 9106. Argon2 deliberately makes each computation memory-hungry so that attackers cannot guess passwords massively in parallel on graphics cards or special hardware. The document gives priority to the Argon2id variant and names two concrete parameter sets.
Three variants, one recommendation
Argon2d accesses memory in a data-dependent way and suits proof-of-work, but is vulnerable to side channels via access timing. Argon2i accesses memory independently of the data and protects against this, but needs more passes.
Argon2id works like Argon2i for the first half of the first pass and like Argon2d afterwards. RFC 9106 requires Argon2id for every implementation; the other two are optional. BLAKE2b serves as the internal hash function.
Parameters instead of gut feeling
The first recommendation is Argon2id with one pass, four lanes and 2 GiB of memory. Where that much memory is not available, the RFC recommends three passes with 64 MiB, each with a 128-bit salt and 256-bit output.
Argon2 won the Password Hashing Competition in 2015. Standardisation via the Crypto Forum Research Group then took another six years.
Ideas
- Memory requirements make parallel guessing on GPUs and ASICs expensive.
- Argon2id combines side-channel protection with resistance to time-memory trade-offs.
- Every implementation must support Argon2id.
- A random salt prevents precomputed tables.
- Passes, memory and lanes are configurable.
- BLAKE2b serves as the internal hash function.
Insights
- The security of a password hash depends more on the parameters than on the name of the method.
- A method that enforces memory shifts the advantage of special hardware back to the defender.
Facts
- RFC 9106 appeared in September 2021 as an Informational document of the Crypto Forum Research Group.
- The document corresponds to version 1.3 of Argon2.
- The first recommendation uses 2 GiB of memory, the second 64 MiB.
- Argon2 won the Password Hashing Competition in 2015.
References
- RFC 9106: Argon2 Memory-Hard Function for Password Hashing and Proof-of-Work Applications
- Argon2 reference implementation (P-H-C)
Remarks
- Simon Josefsson is also known as the developer of the GNU libraries Libidn and GNU SASL.
Recommendations
- Implement new password storage with Argon2id from a maintained library.
- Choose parameters so that a login on your own hardware takes measurable but tolerable time.
- Store parameters and salt in the hash string so that values can be raised later.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.