Password Strength
Mark Burnett's release of 10M passwords got me wondering just how strong people's passwords are on average. SPOILER: NOT VERY. So I designed a Python tool to estimate how many bits of entropy a password has against a strong attacker. It considers several plausible strategies an attacker might use, and returns the lowest number of bits the password has relative to any strategy.
The strategies used are:
- Random passwords using various charsets. This includes guessing that small subsets of charsets are being used, e.g. "aaaaaaaaaaaaaaaaaaaaa" is not a good password.
- Dictionary attacks using a list of common formats (including capitalization, l33t and symbols),
in order of increasing complexity, and several possible sets of dictionaries:
- Names
- Nouns, both short and long lists
- Words, both short and long lists
- Recursive strategies where passwords are assumed to consist of multiple plausible passwords concatenated.
These strategies cover most common methods of password creation. To use XKCD's example, "Tr0ub4dor&3" is a bad password while "correcthorsebatterystaple" is good. This is actually slightly off: "Troubador" is actually spelled "Troubadour". With corrected spellings, we have:
| Password | XKCD's estimate | My estimate |
| Tr0ub4dour&3 | 28 | 30 |
| correcthorsebatterystaple | 44 | 50 |
Applied to Mark's password list, the results are alarming:
| Threat Model | Appropriate Services | Bits of Entropy | # Users | % Users |
| Your little sibling | Piggy bank combination | 0-19 | 3178432 | 31.8% |
| Mischievous friends | Forum accounts | 20-29 | 3280626 | 32.8% |
| Jealous ex | Photo storage, social media | 30-39 | 1976416 | 19.8% |
| Organized crime | Financial accounts | 40-49 | 1009985 | 10.1% |
| Governments | Email, keyrings | 50-59 | 308812 | 3.1% |
| Determined governments | PGP keys, underground networks | 60-999 | 245702 | 2.5% |
What caused this situation, and what can we do about it? The primary problem is that we've trained anti-patterns into users. The usual process of creating a password goes something like this, breaking as soon as the user is allowed:
> Enter