Skip to content

Glossary

Memory-hard function

A memory-hard function deliberately requires a large amount of RAM per guess, closing the GPU/ASIC speed advantage that makes compute-bound hashes crackable at billions of guesses per second.

A memory-hard function is a password-hashing algorithm designed so that every guess needs a large, hard-to-reduce amount of RAM, not just CPU or GPU cycles. Argon2 is the current reference example: its parameters set a memory cost in kilobytes that each hash computation must allocate, alongside a time cost and a parallelism factor. scrypt pioneered the same idea earlier with its N/r/p parameters.

The point is closing off the advantage that makes a purely compute-bound hash like MD5 or SHA-1 so cheap to attack: a GPU packs thousands of cores that can compute those hashes in parallel almost for free, but GPUs have comparatively little memory per core. Force every guess to hold, say, 64 MB in memory and an attacker can no longer run thousands of guesses side by side on the same card — the memory requirement, not the arithmetic, becomes the bottleneck, and it's far more expensive to scale than raw compute.

Memory-hardness complements, rather than replaces, a cost factor: the two parameters are typically tuned together. See Argon2 vs bcrypt vs scrypt for how the memory, time and parallelism parameters interact, and tuning hashcat for real GPU throughput for why memory-hard hashes crack at a tiny fraction of the speed of a raw digest.