TTech
Privacy & Security 6 min readUpdated Oct 15, 2026

How Password Entropy Works (Why Length Beats Complexity)

The mathematics of cryptographic entropy, why replacing "E" with "3" fails, and how the Web Crypto API creates unbreakable random strings.

M
Marcus Vance
Staff Quantitative Analyst, TTech
Key Questions Answered in this Guide
  • How many bits of entropy make a password uncrackable?
  • Why is an 18-character passphrase stronger than an 8-character complex password?
  • Why is Math.random() insecure for password generation?
  • How long would a modern supercomputer take to brute force an alphanumeric password?

1. What Password Entropy Actually Measures

Password entropy is a mathematical measure of randomness, expressed in bits. It quantifies how many guesses an attacker would need in the worst-case scenario to crack a credential through systematic brute-force exhaustion.

A password with 40 bits of entropy has 2^40 possible permutations (roughly 1.1 trillion). A password with 80 bits of entropy has 2^80 permutations (over 1.2 septillion), rendering offline brute force physically impossible with current computational hardware.

2. The Mathematical Entropy Formula

The Shannon entropy of a randomly selected password is calculated by multiplying its character length (L) by the binary logarithm of the character pool size (R):

If you generate a 16-character password using lowercase letters, uppercase letters, digits, and standard symbols (pool size = 26 + 26 + 10 + 33 = 95 characters), your entropy is: 16 * log2(95) = 16 * 6.57 = 105.1 bits of security.

Shannon Entropy Formula
Entropy (Bits) = L * log2(R) Where L = Password Length, R = Pool Size of Unique Characters

3. Why Length Beats Symbol Complexity

For decades, corporate IT rules forced users to create 8-character passwords with symbols and numbers (e.g., "P@ssw0rd"). This led users to predictable leetspeak substitutions that modern dictionary cracking algorithms like Hashcat solve in seconds.

Increasing password length expands the permutation space exponentially. A simple four-word diceware passphrase (e.g., "correct horse battery staple") selected from a dictionary of 7,776 words yields 4 * log2(7776) = 51.7 bits of pure entropy and is trivial to memorize.

4. Modern GPU Brute-Force Benchmarks

High-end graphics card rigs (e.g., 8x NVIDIA RTX 4090) test billions of NTLM or MD5 hashes every second. Here is how password length and pool variety dictate theoretical offline cracking survival:

Password CompositionLengthTotal CombinationsTime to Crack (100 Billion Hashes/sec)
Numbers Only8 digits10^8 (100M)Instant (< 1 millisecond)
Lowercase Letters8 chars26^8 (208B)2 seconds
Mixed Case + Digits8 chars62^8 (218T)36 minutes
Mixed Case + Digits + Symbols10 chars95^10 (59 quintillion)18.7 years
Mixed Case + Digits + Symbols16 chars95^16 (4.4e31)14 billion years
Alphanumeric Passphrase24 chars62^24 (3.7e42)Trillions of centuries

5. Pseudo-Random vs. Cryptographic Randomness

Never use JavaScript's standard Math.random() for passwords or security keys. Math.random() is a deterministic pseudo-random number generator (PRNG) typically powered by the xorshift128+ algorithm, which allows an observer to predict future values after observing a few outputs.

TTech utilizes the browser's native Web Crypto API (crypto.getRandomValues()), which collects hardware entropy from OS-level thermal fluctuations, mouse movements, and CPU timing interrupts to provide CSPRNG guarantees.

// Cryptographically secure buffer generation const buffer = new Uint32Array(length); window.crypto.getRandomValues(buffer);

CSPRNG generation compliant with FIPS 140-2 standards.

Frequently Asked Questions

Direct answers to the most common questions people ask online about this topic.

What is the minimum recommended password length today?

The National Institute of Standards and Technology (NIST SP 800-63B) recommends a minimum length of 16 characters for critical administrative accounts and personal password managers.

Do regular password expirations every 90 days make accounts safer?

No. NIST and Microsoft actively advise against mandatory periodic expirations because they encourage employees to make minor predictable variations (e.g., Summer2025! to Autumn2025!) rather than using strong unique credentials.

Does multi-factor authentication (MFA) replace the need for strong passwords?

MFA adds an essential second layer of defense, but credential stuffing and session hijacking attacks can still succeed against compromised weak passwords on accounts that do not strictly enforce FIDO2 WebAuthn keys.