CyberGlossary

Cryptography

bcrypt

Also known as: EksBlowfish hash, Provos-Mazières bcrypt

Definition

An adaptive password-hashing function based on the Blowfish cipher with a tunable cost factor, designed by Provos and Mazières in 1999.

bcrypt is a password-hashing scheme published in 1999 by Niels Provos and David Mazières that uses a modified Blowfish key schedule ("EksBlowfish") to derive a 192-bit hash from a salted password. Its cost parameter (log2 of the number of key-setup iterations) lets defenders increase the work factor over time as hardware improves. bcrypt has a hard-coded 72-byte input limit and a relatively small memory footprint, which makes it weaker than memory-hard functions against GPU/ASIC attackers. It remains widely deployed and is still acceptable for password storage if used with cost >= 12; however, new systems should prefer Argon2id or scrypt.

Examples

  • Django and Spring Security store user passwords with bcrypt at cost 12 by default.
  • A typical bcrypt hash starts with $2b$12$ followed by a 22-character salt and 31-character digest.

Related terms