I have my soapboxes. A coworker at a previous job even presented me with a soapbox as a parting gift (Irish Spring, but it’s the thought that counts). Password complexity hype is one of my regular soapbox topics.
Password complexity: A lot of people tout the benefits of password complexity rules. Current Windows password complexity requirements include the need for at least 3 of 5 character groups in the password (upper case, lower case, digits, non-alphanumerics, and Unicode). Some sites require at least one each of upper case, lower case, and non-alphabetic.
Consider that “Password1″ passes all the usual complexity requirements, but it’s a terrible password. Consider also that “igympayldt” fails complexity requirements, yet it’s a pretty decent password. It’s also easy to remember (if you’ve seen the Wizard of Oz: “I’ll get you, my pretty, and your little dog too”). And in case you’re wondering, no, I haven’t just revealed my passwords!
Microsoft’s password checker looks for length and complexity. It claims that “Password1″ is a strong password. It claims that “KNxh,TJ” (a randomly generated string) is a weak password, apparently because it’s 7 characters long instead of 8. If I add a 0 to the end, it gets a strong rating. It gives “Aaaaaaa0″ a strong rating, but “igympayldt” is weak. Yeesh.
Do the math: Fans of complexity requirements tell us to “do the math.” The time needed to crack a password by brute-force methods is proportional to the number of possible passwords. (I admit now to the purists that I’m oversimplifying a complex discussion.)
The “do the math” defense for complexity runs like this. Compare an 8-character password of lower-case letters to an 8-character password that uses the 94 printable characters found on a typical U.S. keyboard. For the lower-case password, there are about 209 billion possibilities. For the password using the 94-character set, there are about 6 quadrillion possibilities. (I’m using U.S. terms for large numbers.) That’s a huge difference, like handling petabytes of data instead of gigabytes.
Given that the 94-character set allows about 29,000 times as many passwords, “complex” passwords must be about 29,000 times better, right? A password that could have been cracked within a couple of days using an ordinary laptop becomes a password that would probably take decades to crack. Sounds good, huh? Well, not so much…
Bride of do the math: Let’s face it. If you ask users to include at least one upper-case letter, it’ll probably be the first character. If you ask them to use at least one non-alphabetic, it’ll probably be a digit at the end. If, as a password guesser, you start with that pattern, you’ll probably succeed within your first 80 billion guesses, which you’ll achieve in less than 24 hours. That is, you have a good chance of success in the first 0.001% of the possible passwords. The complexity requirement wasn’t much help, was it?
Son of do the math: Now compare 8 “complex” characters against 11 lower-case letters. That’s 6.1 quadrillion possible passwords vs. 3.7 quadrillion. Adding 3 characters to the length is almost as good as adding 68 characters to the character set. Size matters more than complexity.
Return of do the math: Computing keeps getting faster, ya know? It’s pretty cool if complexity requirements can turn a 2-day attack into a 2-century attack. But what if the attack on the “simple” password takes only a few minutes with better compute resources? If we take the “do the math” approach at face value, complexity requirements turn an attack of a few minutes into an attack of several weeks. Given that many passwords last 90 days or longer, that’s not much help. The faster these attacks can happen, the less it matters whether you apply complexity requirements.
Entropy (oh yurg, a term from thermodynamics): Entropy is basically a measurement of how many random bits your password is equivalent to, in terms of guessability. Dictionary words have low entropy. An adult’s vocabulary might have around 15 bits of entropy, less than the entropy of 3 randomly generated characters.
NIST SP 800-63, Electronic Authentication Guideline, includes a discussion of entropy in Appendix A, Estimating Password Entropy and Strength.
According to NIST SP 800-63, an 8-character randomly generated password using a 94-character alphabet has 52.7 bits of entropy. If you let users pick their own 8-character passwords, you’re down to 18 bits of entropy, the equivalent of about 3 randomly generated characters. This means a random password is about 28 billion times better than a user-chosen password. If you add in a complexity requirement, you’re up to 24 bits of entropy, which is not quite as good as 4 randomly generated characters. The “do the math” crowd acts like you’ve got 8 random characters, when it’s more like 4. They’re off by a factor of about half a billion.
Per NIST, adding 2 characters to the password length (for user-chosen passwords) is about as effective as adding complexity requirements.
The human factor: Regardless of how strong a password is on its own, you still have to worry about the user’s inclination to write the password on a sticky note or to have client software remember the password. Complexity rules don’t help you with the human factor, and they might make things worse.
My advice for user passwords is to think of a memorable phrase of at least 8 words, preferably more, and then to use the initials as a password (”Maslwlaboc” from “Mama always said life was like a box of chocolates”).
My advice for privileged accounts is to use a pronounceable password generator like a Perl script on a Unix system (such as pass_gen), the OpenVMS password generator (see the HP OpenVMS Guide to System Security), or Xyzzy on Windows. These tools are also good for resetting user passwords.
My advice for non-user passwords (like service accounts for which no human has to remember the password), is to use the Ultra High Security Password Generator. Make the password the maximum length allowed and let it be permanent.