Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I've given myself the task of writing code that determines the strength of a password, and really want to break out of a lot of already established ways we do that, as they're often lacking, not designed the right way, or quickly become irrelevant.

Generally, we'll see patterns where you enter a password, and a boolean "you need 7 chars with letters and numbers" is presented. Later, we had a reasonless graphic that shows a "strong to weak" scale ranking (and variations where this is a percentage). We've been getting better at this pattern, a lot better actually, where we think about showing user time to brute-force, explicitly showing reasons for why that score was assigned,

Now, I really like the presentation of these last two ideas, but that's not my primary concern here, and my question has nothing to do with presentation of this tool.

My question is what should a program that generates an estimated range of password security take into consideration?

After looking through the source of howsecureismypassword.net, we see it does a few neat things, like keep a list of top 500 common passwords, groups passwords by character classes that are involved, and relates a meta-score to an estimated time to crack a bunch of hash values in that range. There's some problems with this, such as the top 500 passwords don't reflected present "top 500," but rather the ones at time of writing the code, same goes for password cracking speeds, and attacks that may not end up using brute-force.

I see similar issues with passwordmeter.com, but more in the sense that it runs best-case rather than worst-case scenarios.

So my question is

What do I need to think about to measure a password's security score at time "now"?

share|improve this question
1  
Very closely related, but not duplicate: security.stackexchange.com/questions/2687/… –  AviD Jun 18 '11 at 23:03
1  
Just a cautionary note about usability of passwords. Strong passwords are good only to the point at which people remember them and keep them confidential. –  this.josh Jun 19 '11 at 3:08
    
One of the mathematically cool things about true randomness is that you can't measure it accurately. Because the kolmogorov complexity of a string is noncomputable, you can never say how random a string is. All you can say is how random a string isn't, based on the best compression of it you've found so far. –  user502 Jun 20 '11 at 12:56
1  
@user502 Thanks for that, searching for untruths is often a powerful problem solving tool that so many people forget to think about. –  Incognito Jun 20 '11 at 13:21
1  
@user502 And with true randomness you could have a key of all ones or all zeroes, which we specifically try to avoid. You could even improbably have a hundred keys of all ones or zeroes. Thats why we like pseudorandomness: the great taste of randomness with half the calories! –  this.josh Jun 23 '11 at 7:03
add comment

2 Answers

up vote 12 down vote accepted

The best work in this area I've seen is by Matt Weir in Reusable Security: New Paper on Password Security Metrics (2010). He describes the difference between "Shannon entropy" and "guessing entropy". He also has an interesting method of taking a password for a user, analyzing it, and offering suggestions to make it better:

....other methods for password creation policies, including our proposed method to evaluate the probability of a human generated password by parsing it with a grammar trained on previously disclosed password lists. This allows us to build a more robust reject function compared to a simple blacklist, while attempting to provide the most user freedom possible, given the security constraints of the system, when selecting their passwords.


Update: as user185 notes, Appendix A of the NIST Electronic Authentication Guideline from 2006 is also very helpful. It goes into detail on calculating these two terms:

” As applied to a distribution of passwords the guessing entropy is, roughly speaking, an estimate of the average amount of work required to guess the password of a selected user, and the min-entropy is a measure of the difficulty of guessing the easiest single password to guess in the population.


Note that this question is closely related:

share|improve this answer
add comment

Appendix A of the NIST Electronic Authentication Guideline details the method they use to construct the entropy vs. password length table A.1, including a few references for further reading.

share|improve this answer
    
That's an awesome resource, do you happen to know of any posts where people scrutinize any potential problems with that section? –  Incognito Jun 20 '11 at 13:23
    
No, I don't :-( –  user185 Jun 21 '11 at 16:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.