BCrypt Password Hashing Utility
Generate secure, salted BCrypt hashes with customizable work factors (rounds) for database authentication storage.
How It Works
- Enter a plaintext password and select a cost work factor (between 4 and 14).
- The tool generates a unique cryptographically random 128-bit salt and computes the Blowfish key expansion.
- A standard modular crypt format string (e.g. $2a$10$...) is generated containing algorithm identifier, cost factor, salt, and hash.
Primary Use Cases
- Hashing user credentials for secure database storage.
- Benchmarking server work factors to balance login response time with brute-force defense.
- Verifying existing bcrypt hash formats during authentication system migrations.
Common Security Pitfalls
- Using a work factor that is too low (e.g. cost < 10) on modern servers, leaving passwords vulnerable to GPU cracking.
- Trimming passwords at 72 bytes without understanding that native bcrypt truncates inputs at 72 bytes.
Frequently Asked Questions
- What does the bcrypt cost factor mean?
- The cost factor determines the number of hashing rounds (2^cost). Increasing the cost by 1 doubles the calculation time, allowing defenses to scale as hardware gets faster.
- Why is a salt necessary in password hashing?
- A salt ensures that two identical passwords produce completely different hash outputs, defeating precomputed rainbow table attacks.
References & Standards