bcrypt
A long-established password hashing function with a built-in salt and an adjustable cost factor that makes each guess slower.
In more detail
Bcrypt was published in 1999 and is based on the Blowfish cipher. Each step up in its cost factor doubles the work, so it can be made slower as computers get faster, and the salt and cost are stored inside the hash string itself. It uses only a small amount of memory, so graphics cards attack it more easily than Argon2id or scrypt. It also reads only the first 72 bytes of a password, which matters for very long passphrases.
Example
$2b$12$ at the start of a hash means bcrypt with cost factor 12Related terms
- password hashing — Storing a password as the output of a deliberately slow, salted hash function, so a stolen database does not reveal the passwords.
- 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.
- salt — An extra value mixed into data before hashing so that otherwise identical inputs produce different hashes.
- password cracking — Recovering the actual passwords behind stolen password hashes by guessing candidates, hashing each one and looking for a match.
Taught in
- Cryptographic Hashing: SHA-256, SHA-3 & Passwords — Cybersecurity Fundamentals, GRC & Cryptography