About Bcrypt Hash Generator & Verifier
Bcrypt is the industry standard cryptographic password-hashing algorithm based on the EksBlowfish (Extended-Key-Schedule Blowfish) cipher. It protects authentication credentials by combining a random 128-bit cryptographic salt with an adaptive work factor that exponentially increases computational difficulty to defend against modern ASIC and GPU brute-force attacks.
❓ How to Use This Tool
1. Enter your plaintext password or click 🎲 Random to generate a strong 16-character credential.
2. Select your desired Salt Cost Factor from Cost 4 (fast development) up to Cost 14 (maximum security).
3. (Optional) Paste an existing Bcrypt hash into the verification input to confirm if it matches your plaintext password.
4. Click Copy Bcrypt Hash or Download .txt to save the generated hash string.
Bcrypt vs Modern Password Hashing Algorithms
| Algorithm | Type | Work Factor | GPU Defense | Recommended Use |
|---|---|---|---|---|
| Bcrypt ($2b$) | CPU & Cache-Hard | 2^Cost (16 to 16,384+) | High (Complex branching) | General Web, Node.js, Django, Rails |
| Argon2id | Memory & Time Hard | Memory + Iterations | Maximum (Memory saturation) | Modern enterprise systems |
| PBKDF2 | CPU Iterative | Linear Iterations | Moderate | Legacy FIPS compliance |
| SHA-256 / MD5 | Fast Digest | None (Single round) | None (Billions/sec) | Do NOT use for passwords |
Frequently Asked Questions (FAQ)
What is Bcrypt and why is it preferred for password hashing?
Bcrypt is an adaptive cryptographic password-hashing function designed by Niels Provos and David Mazières based on the Blowfish cipher. It incorporates a 128-bit random salt and an exponential work factor (cost) to defend against custom hardware, GPU, and FPGA brute-force attacks.
What is the 72-byte password limit in Bcrypt?
Due to the underlying Blowfish key schedule structure, Bcrypt algorithms truncate input passwords at exactly 72 bytes. Any characters beyond 72 bytes are discarded during key setup without affecting the resulting hash. If passwords might exceed 72 bytes, pre-hashing with SHA-256 or SHA-512 before Bcrypt is standard practice.
Which salt cost factor should I choose for production authentication?
OWASP recommends a minimum Bcrypt cost factor of 10 (1,024 rounds) for general web applications and Cost 12 (4,096 rounds) for high-security environments like banking or healthcare. Higher cost factors increase verification latency, making brute-force attacks economically infeasible for adversaries.
How do the $2a$, $2b$, and $2y$ prefix identifiers differ?
$2a$ is the original OpenBSD specification. $2y$ is a PHP-specific patch that fixed an 8-bit sign-extension bug in crypt_blowfish. $2b$ is the current modern standard adopted by OpenBSD, Node.js, Python, and Go that resolves length-handling edge cases while remaining universally compatible.
Can Bcrypt hashes be reversed or cracked?
No, Bcrypt is a strictly one-way cryptographic hash function that cannot be mathematically decrypted or inverted. The only way an attacker can recover a password from a Bcrypt hash is through exhaustive dictionary search or brute-force trial, which is heavily throttled by Bcrypt's high computational cost.