memory-hard function
A function that cannot be computed quickly without using a large amount of memory, which makes mass guessing on specialised hardware expensive.
In more detail
Password crackers rely on graphics cards and custom chips that run thousands of simple calculations side by side but have little fast memory for each one. A memory-hard function forces every single guess to fill and reread a big block of memory, so the attacker's advantage shrinks to roughly what a normal computer can do. Argon2 and scrypt are memory-hard; bcrypt and PBKDF2 are not.
Example
scrypt with n=2**14 and r=8 needs 16 MiB for every password guessRelated terms
- Argon2 — A modern password hashing function that is deliberately slow and needs a lot of memory for every guess, which makes stolen password hashes very expensive to crack.
- scrypt — A memory-hard password hashing function that is slow and needs lots of memory, so guessing passwords in bulk is expensive.
- password cracking — Recovering the actual passwords behind stolen password hashes by guessing candidates, hashing each one and looking for a match.
- password hashing — Storing a password as the output of a deliberately slow, salted hash function, so a stolen database does not reveal the passwords.
Taught in
- Cryptographic Hashing: SHA-256, SHA-3 & Passwords — Cybersecurity Fundamentals, GRC & Cryptography