Password Entropy, Cryptographic Hashing, and Authentication Security Guide
Technical guide to password strength, mathematical entropy calculations, modern hashing algorithms (Argon2id, bcrypt, scrypt), and credential security best practices.
1. Shannon Entropy Formula and Calculating Password Strength
Password strength is mathematically quantified in bits of entropy using information theory principles. The entropy $E$ of a password is given by:
$$E = L \times \log_2(R)$$
Where $L$ is password length and $R$ is the size of the character pool (e.g. lowercase = 26, alphanumeric + symbols = 94). A password with 60+ bits of entropy is generally resistant to casual online guessing, while 80+ to 100+ bits is recommended against high-performance offline dictionary attacks. Generate strong, verifiable credentials locally with the Password Security Hub.
2. The Mechanics of Password Cracking: Dictionary Attacks, Rainbow Tables, and GPUs
Modern password crackers (such as Hashcat) execute on GPU rigs capable of testing billions of candidate SHA-256 hashes per second. Attackers use precomputed lookup databases (rainbow tables) to reverse fast hashes instantly unless unique cryptographic salts are incorporated.
3. Cryptographic Hashes vs. Password KDFs: Why SHA-256 is Not for Passwords
General-purpose cryptographic hashes (such as MD5, SHA-1, SHA-256) were designed to be blazingly fast to verify file integrity and sign packets. Because they are fast, they are disastrous for password storage. Passwords must be hashed using Key Derivation Functions (KDFs) that are deliberately slow, computationally heavy, and memory-intensive.
Recommended password hashing standards:
• Argon2id: Winner of the Password Hashing Competition; resists both GPU brute-forcing and side-channel timing attacks using memory-hard operations.
• bcrypt: Established industry standard since 1999; automatically embeds a 128-bit random salt and configurable work factor cost.
• PBKDF2: Standard FIPS-compliant algorithm; relies primarily on CPU iterations but lacks memory hardness against specialized ASIC crackers.
5. Modern Authentication Architectures: Salts, Peppers, and Passkeys
Always generate a cryptographically secure random salt (at least 16 bytes) per user to ensure identical passwords produce completely different hash digests. For ultimate authentication resilience, consider implementing FIDO2/WebAuthn Passkeys, which replace passwords with asymmetric public-key cryptography resistant to phishing.
Key Takeaways
Password entropy depends exponentially more on length than on character complexity.
Never store passwords with raw fast hashes (SHA-256/MD5); use slow KDFs like Argon2id or bcrypt.
Salts prevent rainbow table precomputation by guaranteeing distinct hashes for identical passwords.
Generate passwords using browser-native cryptographically secure pseudo-random generators (CSPRNG).