Course contentsShow
← Computer Science
Lesson 2511 of 2,87256. Authentication and AuthorizationFree lesson

Password Strength and Entropy

Measuring password strength through entropy, common patterns, and realistic security levels.

Password Strength and Entropy

You'll learn: How to mathematically measure password strength using entropy and understand why common patterns create security risks.

What Is Password Entropy?

Password entropy measures unpredictability in bits. Each bit of entropy doubles the number of possibilities an attacker must try. Think of it like a combination lock: a 2-digit lock has 100 combinations, but a 4-digit lock has 10,000—each added digit increases the search space exponentially.

Entropy is calculated as: log₂(possible_combinations)

For example:

  • An 8-character password using only lowercase (26 options per character) has 26⁸ possibilities
  • Entropy = log₂(26⁸) ≈ 37.6 bits

Why Common Patterns Weaken Security

Real passwords rarely use truly random characters. Common patterns drastically reduce effective entropy:

  • Dictionary words: "password" isn't 47 bits (8 random characters × 6 bits each)—it's one item from ~170,000 English words ≈ 17 bits
  • Predictable substitutions: "P@ssw0rd" adds minimal entropy because attackers check these patterns
  • Common patterns: "Qwerty123!" follows keyboard layouts and date formats
  • Personal information: Names, birthdays, pet names are in attacker dictionaries

Realistic Security Levels

Security experts recommend:

  • 50-60 bits: Minimum for online accounts (rate-limiting helps)
  • 80+ bits: Strong protection against offline attacks
  • 128+ bits: Cryptographically secure

A truly random 12-character alphanumeric password provides ~71 bits. But "fluffy2023!" might provide only 30-35 bits due to dictionary words and predictable patterns.

Key Takeaway: Password strength depends not on length alone, but on unpredictability measured by entropy—common words and patterns dramatically reduce effective security compared to random character selection.