{"action":"created","issue":{"url":"https://api.github.com/repos/dropbox/zxcvbn/issues/35","labels_url":"https://api.github.com/repos/dropbox/zxcvbn/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/dropbox/zxcvbn/issues/35/comments","events_url":"https://api.github.com/repos/dropbox/zxcvbn/issues/35/events","html_url":"https://github.com/dropbox/zxcvbn/issues/35","id":21782146,"number":35,"title":"bruteforce should score by frequency/rank","user":{"login":"tewalds","id":256625,"avatar_url":"https://avatars.githubusercontent.com/u/256625?v=3","gravatar_id":"","url":"https://api.github.com/users/tewalds","html_url":"https://github.com/tewalds","followers_url":"https://api.github.com/users/tewalds/followers","following_url":"https://api.github.com/users/tewalds/following{/other_user}","gists_url":"https://api.github.com/users/tewalds/gists{/gist_id}","starred_url":"https://api.github.com/users/tewalds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tewalds/subscriptions","organizations_url":"https://api.github.com/users/tewalds/orgs","repos_url":"https://api.github.com/users/tewalds/repos","events_url":"https://api.github.com/users/tewalds/events{/privacy}","received_events_url":"https://api.github.com/users/tewalds/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-10-29T19:35:48Z","updated_at":"2015-09-24T10:03:01Z","closed_at":"2015-09-24T06:38:03Z","body":"A very common password style is take the first letter of each word in a sentence/phrase, possibly with some substitutions. This leads to a fairly random looking password that is easy to remember, but hard to brute force. The letters are not randomly distributed however, as they're related to the frequencies of letters as the first letter of words. There are far more words starting with s,c,p than with x,z,y,q or numbers. Thus instead of treating it as cardinality 26 for any lower case letter, treat each letter individually based on its rank in the list of 95 printable characters. \r\n\r\nYou could get this rank by using something like this:\r\n$ cat /usr/share/dict/american-english | cut -c 1 | uniq -c | sort -n\r\nor $ cat /usr/share/dict/american-english | cut -c 1 | tr A-Z a-z | sort | uniq -c | sort -n\r\nAlternatively you could get the rank based on the character frequencies in the password lists, which would help with the frequencies for numbers and special characters."},"comment":{"url":"https://api.github.com/repos/dropbox/zxcvbn/issues/comments/142879980","html_url":"https://github.com/dropbox/zxcvbn/issues/35#issuecomment-142879980","issue_url":"https://api.github.com/repos/dropbox/zxcvbn/issues/35","id":142879980,"user":{"login":"tewalds","id":256625,"avatar_url":"https://avatars.githubusercontent.com/u/256625?v=3","gravatar_id":"","url":"https://api.github.com/users/tewalds","html_url":"https://github.com/tewalds","followers_url":"https://api.github.com/users/tewalds/followers","following_url":"https://api.github.com/users/tewalds/following{/other_user}","gists_url":"https://api.github.com/users/tewalds/gists{/gist_id}","starred_url":"https://api.github.com/users/tewalds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tewalds/subscriptions","organizations_url":"https://api.github.com/users/tewalds/orgs","repos_url":"https://api.github.com/users/tewalds/repos","events_url":"https://api.github.com/users/tewalds/events{/privacy}","received_events_url":"https://api.github.com/users/tewalds/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T10:03:01Z","updated_at":"2015-09-24T10:03:01Z","body":"Instead of simply closing this as wontfix, why not check the character frequencies in passwords that don't follow simple patterns. You've got a large password database so this should be pretty easy to check. If this is a valid way of reducing the entropy as shown in real passwords, then real password crackers probably use it effectively and it should be used here. If it doesn't reduce entropy much, then wontfix seems perfectly reasonable. I've read articles about password crackers downloading giant corpuses (lyrics, movie quotes, wikipedia, etc) and using sentences from there fairly effectively, though I'm having trouble finding a reference for that. What I did find is another similar idea of using markov chains, which should have similar effects: https://www.trustwave.com/Resources/SpiderLabs-Blog/Hashcat-Per-Position-Markov-Chains/ ."}}