Argon2i
The Password Hashing Competition winner: memory-hard hashing standardised in RFC 9106
About Argon2i
Argon2i is one of 3 Argon2 variants in the NextSSL registry, a password hashing function. It uses a 16–1,024-byte output and a 16–64-byte salt. It takes the parameters m_kib (default 65536), out_len (default 32), p (default 1) and t (default 3). Its registry entry cites RFC 9106. NextSSL lists it in the standard tier and exposes it through the safe API.
Overview
Argon2 is a memory-hard password hashing and key derivation function designed at the University of Luxembourg. It won the Password Hashing Competition in 2015, is standardised in RFC 9106, and is the recommended choice for new password storage.
Argon2 fills a large memory array of 1 KiB blocks, each computed from previous blocks through a compression function based on the BLAKE2b round. Memory is organised into lanes that can be filled in parallel. After several passes over memory, the final blocks are combined and hashed with BLAKE2b to produce the output. Cost is set by three parameters: memory size, number of passes and degree of parallelism.
NextSSL includes all three variants. Argon2d picks earlier blocks based on data, which maximises resistance to GPU cracking but leaks timing information. Argon2i uses data-independent addressing, which resists side channels. Argon2id, the RFC 9106 recommendation, uses data-independent addressing for the first half pass and data-dependent addressing thereafter. Argon2id is the default choice.
History
2013–2021Password Hashing Competition announced
Password Hashing Competition24 candidates submitted; nine finalists named in December
Password Hashing CompetitionArgon2 wins the Password Hashing Competition
Specified in RFC 9106
How it works
- Hash password, salt and parameters into a seed with BLAKE2b
- Fill memory blocks lane by lane from earlier blocks
- Repeat for the configured number of passes
- XOR the last block of each lane and hash to the output length
Security notes
Argon2id is considered secure when parameters are set appropriately; RFC 9106 gives recommended settings such as 2 GiB with one pass, or 64 MiB with three passes for constrained environments. Argon2i with few passes has known time–memory trade-off attacks, so Argon2id is preferred.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 16 – 1,024 | Output |
| salt | 16 – 64 | Salt |
Parameters
| Name | Type | Range | Default | Required |
|---|---|---|---|---|
| m_kib | u32 | 8 – 4194304 | 65536 | no |
| out_len | u32 | 16 – 1024 | 32 | no |
| p | u32 | 1 – 255 | 1 | no |
| t | u32 | 1 – 1024 | 3 | no |
Parameters are passed as a string, for example nextssl_mac("hmac", "hash=sha512", …). Omitted parameters take their declared default.
Use it
from nextssl_demo import NextSSL
ns = NextSSL() # safe API: safe and standard tiers
phc = ns.call("pwhash", "argon2i", None, b"correct horse")[0] # PHC string, fresh salt
ok = ns.check("pwhash_verify", "argon2i", None, b"correct horse", phc)
nextssl_pwhash("argon2i", NULL, password, out);
nextssl_pwhash_verify("argon2i", NULL, password, phc);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_pwhash_in(reg::all(), Policy::Safe, "argon2i", &Params::new())?;
let phc = alg.hash(b"correct horse")?; // PHC string
let ok = alg.verify(b"correct horse", &phc)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other Argon2 variants
2More password hashing
All 30Frequently asked questions
What is Argon2i?
Argon2i is a password hash in the Argon2 family. Argon2 is a memory-hard password hashing and key derivation function designed at the University of Luxembourg.
What are the Argon2i sizes?
In NextSSL, Argon2i uses: output 16 to 1,024 bytes.
Who designed Argon2i and when?
Argon2i belongs to the Argon2 family, first published in 2015 by Alex Biryukov, Daniel Dinu, Dmitry Khovratovich. Its origin: Password Hashing Competition winner; RFC 9106.
Which standards define Argon2i?
Argon2i is referenced by RFC 9106.
Is Argon2i safe to use?
Argon2i is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.
What other Argon2 variants are there?
NextSSL also registers argon2d, argon2id in the Argon2 family.
Related families
A fast, secure successor to BLAKE with built-in keying, salting and tree hashing
BLAKE2A fast, secure successor to BLAKE with built-in keying, salting and tree hashing
bcryptThe Blowfish-based adaptive password hash, a long-standing default in web frameworks
PBKDF2The iterated-HMAC password-based key derivation function from PKCS #5 and NIST SP 800-132
scryptColin Percival's memory-hard key derivation function, standardised in RFC 7914
yescryptAn scrypt-derived memory-hard password hash, now the default in many Linux distributions