When a password database is stolen, attackers can guess passwords repeatedly. Argon2 makes each guess costly in time and memory, slowing large-scale attacks. section 2.6
Argon2 protects password storage through two related ideas:
- Salts give each user a different customization value, preventing attackers from reusing precomputed rainbow tables across the database. section 2.6
- Slow password hashing makes guessing expensive; Argon2 is memory-hard, so attackers gain little by optimizing computation without also optimizing memory access. section 2.6
- Other choices include PBKDF2, bcrypt, and scrypt, but insecure parameters can make several schemes difficult to configure safely. section 2.6
Figure 2.18 In this chapter, you saw four types of hash functions: (1) the normal kind that provide a unique random-looking identifier for arbitrary-length inputs; (2) extendable output functions that are similar but provide an arbitrary-length output; (3) tuple hash functions that unambiguously list hash values; and (4) password-hashing functions that can’t be easily optimized in order to store passwords safely.
Places Argon2 among four hash-function categories and identifies password-hashing functions by their resistance to easy optimization. section 2.6

