Computational cryptography › Hashes and symmetric ciphers
PASSWORD HASHINGPrimitive

Argon2, scrypt, bcrypt

In plain words

Store passwords as deliberately slow fingerprints, so a stolen password database is expensive to crack.

The idea: A website shouldn't store your password, only a fingerprint of it, so it can check logins without keeping the password. But fingerprints can be guessed: a thief with the database can hash millions of common passwords and look for matches. Password hashing makes every guess expensive on purpose, slow and memory-hungry, so millions of guesses per second become a handful. A random salt per user stops one round of guessing from cracking everyone at once.

Why it matters: Protects your password when a website gets breached.

The details

Store passwords as deliberately slow, memory-hungry hashes (Argon2, scrypt, bcrypt)[1, 2, 3], so a stolen password database is expensive to crack offline.

It relies on preimage resistance plus the deliberate cost. Argon2 won the Password Hashing Competition in 2015[4, 5].

Rests on

If any of these breaks, this breaks too.

If it falls

If this breaks, these break with it.

Nothing on the map depends on it: it is an end point, something people use directly.

References

  1. Alex Biryukov, Daniel Dinu and Dmitry Khovratovich. Argon2: New Generation of Memory-Hard Functions for Password Hashing and Other Applications. 2016 IEEE European Symposium on Security and Privacy (EuroS&P). doi:10.1109/eurosp.2016.31
  2. C. Percival and S. Josefsson. The scrypt Password-Based Key Derivation Function. RFC 7914, 2016. rfc-editor.org/rfc/rfc7914
  3. Niels Provos and David Mazières. A Future-Adaptable Password Scheme. USENIX Annual Technical Conference 1999. usenix.org/legacy/events/usenix99/provos/provos.pdf
  4. PHC panel. Password Hashing Competition. 2015. password-hashing.net
  5. A. Biryukov, D. Dinu, D. Khovratovich and S. Josefsson. Argon2 Memory-Hard Function for Password Hashing and Proof-of-Work Applications. RFC 9106, 2021. rfc-editor.org/rfc/rfc9106