Why long passwords are strong
The number of guesses a password needs grows with every extra place. See the sums for length, for random words and for passwords that follow a habit. The speeds are made up, and this is not security advice.
Key takeaways
- The strength of a random password is its length times the base 2 logarithm of the size of the set it is drawn from. Each bit doubles the tries.
- One more place multiplies the number of tries by the size of the set. Length matters more than odd mixes of characters.
- Four words picked at random from 7776 are about as strong as eight random characters from 94.
- A password that follows a habit has far fewer real possibilities than it looks.
- The speeds of the attacks on this page are made up. The page explains the maths and gives no security advice.
Sources
Some of these sites could not be opened while this page was written, so some facts were checked through search results that quote them. That strength is the length times the base 2 logarithm of the size of the set, and the arithmetic of 26 to the 8 and 94 to the 8, are plain maths and were computed. That guidance has moved from forced mixes of characters towards length, that it asks services to block passwords that have leaked and to limit failed guesses, and that passwords should be stored hashed, appeared in several places, but sources disagree on the exact minimum length (8, 12 or 15), so the page gives none. That slow hashes cut the speed of a stolen file attack from billions of guesses a second to thousands, that a web login can be limited, and that attackers try likely passwords first, appeared in several places. The speeds on the page, one a second, ten thousand a second and ten billion a second, are round numbers made up for the page, inspired by the order of magnitude in the sources. A word list of 7776 words and 12.9 bits a word is general knowledge about dice-picked passphrases and was not confirmed in the search, so the page says only that such lists are used. The sizes of the sets of habits are made up. Nothing here is security advice.
- Wikipedia: password strengthEntropy in bits and the strength of passwords.
- Wikipedia: password policyThe move from complexity rules to length.
- Wikipedia: password crackingDictionary and brute force attacks.
- arXiv: system password security, attack and defenceAttack and defence mechanisms.
- Hive Systems: the password tableGuess speeds against different hashes.
- Password Strength: how hackers crack passwordsBrute force and dictionary attacks.
- DEV Community: SHA-256 vs bcryptWhy a slow hash cuts the guess rate.
- Have I Been Pwned: NIST-compliant password checkingChecking passwords against leaked lists.
- SailPoint: NIST 800-63BGuidance on length and blocklists.
- Start-up Defense: NIST password guidelinesWhat the guidance asks for.
- Captain DNS: NIST password recommendationsChanges in the guidance.