What It Actually Means
That one-way property is what separates hashing from encryption. Encryption is designed to be undone by whoever holds the key. Hashing is designed so that nobody can undo it, including the people who run the system.
Why Passwords Use It
When you set a password, a well-built system does not store it. It stores the hash. When you sign in, it hashes what you typed and compares the results.
The consequence is that the business cannot see your password. Not the developers, not support, not an attacker who reaches the database. What leaks in a breach is a set of hashes, which is meaningfully different from a set of passwords.
This produces a test any non-technical person can apply. If a service can email you your existing password, it is not hashing them. It is storing them in a recoverable form, which means the staff can read them and so can anyone who gets in. A password reset link is correct behaviour. A password reminder containing the password is a finding.
Not All Hashing Is Equal
Speed is a virtue in most computing and a liability here.
Fast general-purpose hashes such as MD5 and SHA-1 were widely used for passwords and are unsuitable. An attacker holding stolen hashes can try billions of guesses per second against them, so common passwords fall almost immediately. Both are also broken for other purposes and should not appear in anything current.
Password hashing needs algorithms built to be slow and memory-hungry: bcrypt, scrypt or Argon2. The delay is imperceptible for one login and ruinous for an attacker attempting to work through a stolen file.
Salt is the other half. A random value is added to each password before hashing, so identical passwords produce different hashes. Without it, an attacker cracks one and immediately knows everyone who shares it, and precomputed tables do the work for them. Any competent implementation salts automatically.
What To Ask
- Are passwords hashed with bcrypt, scrypt or Argon2? A supplier should answer immediately. Hesitation is informative.
- Can anyone in the business see a user’s password? The answer must be no.
- What happens if the database leaks? With proper hashing, the passwords are not usable.
Where Else It Turns Up
Hashing is not only for passwords, and the other uses are worth recognising because they show up in ordinary conversation.
It verifies that a file has not changed, since any alteration produces a different hash. It underpins version control, where each commit is identified by a hash of its contents. It lets two systems check they hold the same data without exchanging the data itself.
In all of those the value is the same: a short fingerprint that is cheap to compare and effectively impossible to forge. Passwords are just the case where the consequences of getting it wrong arrive publicly.
More terms are in the glossary.