What Argon2 packs into a PHC string when variant, memory, time, and lanes are chosen
Argon2 turns a password into a single printable PHC line. The password is the UTF-8 bytes of the text that was typed. The line names the variant after the first dollar block, then v=19 for the Argon2 version, then m=, t=, and p= for memory in KiB, time iterations, and parallel lanes, then two URL-safe Base64 segments for salt and digest separated by another dollar sign.
A typical fresh hash on this page looks like $argon2id$v=19$m=65536,t=3,p=4$ followed by salt and hash segments. Defaults are argon2id, 65536 KiB memory, t=3 iterations, and p=4 lanes. Hashing the same password twice never yields the same line because a new random salt is drawn each time. Only compare against one full stored line can confirm a password.
Password storage also uses bcrypt with embedded cost and slow PBKDF2 with iteration counts beside the salt. A single fast digest without salt belongs under hash digest. Human-chosen secrets are easier to reason about with a password generator before they are hashed.
How variant, v=19, m, t, p, salt, and digest fit one hash or verify step
Why argon2id, argon2i, and argon2d label three tradeoffs inside the same PHC layout
- argon2id is the hybrid default here and the variant most new password hashes should use. The prefix in the stored line reads $argon2id$ when that mode is chosen.
- argon2i favors side-channel resistance because addresses depend less on the password. argon2d favors resistance to time-memory tradeoff attacks when memory is large.
- All three share v=19 and the same m=, t=, p= comma layout. Verify libraries read the variant from the string; the dropdown only affects newly generated lines.
Why memory m is counted in KiB inside the hash and why 65536 is the default here
- The m= field in $argon2id$v=19$m=65536,t=3,p=4$ names 65536 KiB, which is 64 MiB of working memory for the hash function during hashing.
- Higher memory makes each guess cost more RAM on offline attackers with parallel GPUs. This page allows memory from 8 KiB up through 524288 KiB within clamp rules.
- The memory value is part of the stored string. Verify reads the same m= digits that were used when the hash was created, not the slider position during verify.
Why time t and parallelism p sit beside m and scale work per password attempt
- t=3 means three passes over memory according to Argon2 rules. p=4 means up to four parallel lanes inside one hash computation on this page.
- Raising t multiplies CPU time for honest logins and for offline guessing. Raising p uses more cores but must stay consistent between hash and verify for the same line.
- Defaults t=3 and p=4 match common starter profiles. Changing them on the form only affects new PHC output. An old line still carries its own t= and p= inside the dollar block.
Why verification must paste the entire PHC line including every parameter byte
- Verify parses variant, v=19, m, t, p, salt, and digest from the hash field. A truncated copy without $argon2id$ or without the parameter block is invalid input.
- The regular shape is dollar, variant name, dollar, v=19, dollar, m=number, comma, t=number, comma, p=number, dollar, then Base64 salt, dollar, then Base64 digest.
- Matching means the password bytes pair with that full string. m, t, and p are not re-read from the sliders during verify; they are taken from the pasted hash alone.
Where the stored PHC line and the typed password quietly disagree
The same short password hashed twice at argon2id with default m, t, and p
Run hash twice on the word password with argon2id, 65536 KiB, t=3, and p=4. Both lines begin with $argon2id$v=19$m=65536,t=3,p=4$ and name the same parameters. The Base64 salt and digest segments differ because salt is new each time. A test that expected identical strings is misunderstanding Argon2. Verification still accepts either line when the password field holds password and the hash field holds the matching full PHC string.
A verify attempt that changed memory on the slider but kept an old hash
An existing row might read $argon2id$v=19$m=131072,t=3,p=4$ while the slider still shows 65536 KiB. Verify mode ignores the slider for m, t, and p and follows the pasted line. Expecting verify to use 65536 when the hash says 131072 is a common debugging mistake. Production compares password against the database copy. Parameter tuning on the form affects only the next hash action.
A login stack that still stores bcrypt while evaluating Argon2 for new accounts
bcrypt lines start with $2a$ or $2b$ and encode cost in two digits, not m and t in KiB. PBKDF2 often stores iterations beside a separate salt column rather than one self-contained PHC line. Argon2 unifies variant, memory, time, lanes, salt, and digest in one field. hash digest pages cover unsalted one-shot digests. Policy may keep bcrypt for legacy rows and Argon2 for new registrations without mixing formats in one column.