<story><title>Towards Reliable Storage of 56-bit Secrets in Human Memory [pdf]</title><url>http://www.usenix.org/system/files/conference/usenixsecurity14/sec14-paper-bonneau.pdf</url><text></text></story><parent_chain><item><author>harshreality</author><text>1 and 2 are easy.  Sort the words and use levenshtein distance to correct unrecognized words to the nearest valid word, prior to doing the password hashing.  3 is slightly more difficult; for 7-of-8 you&amp;#x27;d have to store 9 hashes, one for the full list, and 8 more hashes resulting from removing one of the 8 words.  What you gain in user friendliness costs you since you have to store several times the hashes, and you have to run multiple hash computations for each attempted login.&lt;p&gt;It should be noted that 1 and 3 both reduce entropy significantly.&lt;p&gt;A system that lets users omit one of the words in their passphrase will end up with users omitting one of the words all the time (why would you type more than you have to, particularly for passphrases of 20-40 characters?); the effective security of an 8 word passphrase with that system is worse than if it was a 7 word passphrase with no leeway for forgetting words.  With a strict comparison but a passphrase of one less word, attacker then has to guess the right 7 words.  By allowing a word to be forgotten, the attacker can guess any of 8 different 7-word passphrases and get in.&lt;p&gt;Any system that reminds you of the full passphrase has to store the passphrase unhashed (or equivalent, like, with each sub-hash, storing a hint for the missing word), which is unacceptable.</text></item><item><author>twotwotwo</author><text>Humans being the error-prone creatures we are, I wonder how it could work better to a longer word-based code, but allow for certain kinds of errors: for example, 1) word order doesn&amp;#x27;t matter, 2) it tries to correct a word not in the built-in word list to the &amp;quot;closest&amp;quot; word in it, 3) maybe you only need, say, seven of the eight words to be right to get in (then it might remind you of the real code). You can do a little calculation to see how many words you need to get to the desired number of bits then.&lt;p&gt;Pretty different from passwords as we know them (#3 means you can&amp;#x27;t simply store a bcrypt&amp;#x2F;scrypt&amp;#x27;d code--you could build something complicated tricks to square &amp;quot;allow one word wrong&amp;quot; with not storing plain PWs: each word is 10 bits and what you tell the user is really their secret code + a parity&amp;#x2F;ECC word, and correction happens before a convnetional password check--that rabbit hole goes deep, though.) But if all this gets average folks remembering more entropy than before, that makes it kind of interesting.&lt;p&gt;On the study (which I admit just skimming), survey in 2010 suggested about half of Mechanical Turk users were located in the US (&lt;a href=&quot;http://www.behind-the-enemy-lines.com/2010/03/new-demographics-of-mechanical-turk.html)--folks&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.behind-the-enemy-lines.com&amp;#x2F;2010&amp;#x2F;03&amp;#x2F;new-demographi...&lt;/a&gt; who learned English at school would probably do better at memorizing a password in their native language. (I studied French many years in school, but I doubt I&amp;#x27;d memorize a set of random French words as easily as English words.)</text></item></parent_chain><comment><author>twotwotwo</author><text>Yeah, I did some rough calcs (after my anti-procrastination timer expired and I couldn&amp;#x27;t waste more time here, haha). If you have ~1000 words, ~10 bits&amp;#x2F;word, seven words is 70 bits, and you lose about 12 of those by allowing reordering, and obviously 10 if you let them flub a word (via a parity word or storing 8 hashes). Seven words could be 48 bits with both kinds of variation allowed, or 58 or 60 with only one kind allowed. It might also help users remember to give them limited choice of code (pick one of 4 or 8 codes, say), which could cost you up to 2-3 more bits (on the paranoid assumption that users will pick according to predictable patterns).&lt;p&gt;How much entropy you target depends on the system. If it needs to work as a crypto key, then you really need entropy, and good luck to you. (Maybe you have folks remember a piece and write a piece down, and use an expensive key scheduley thing to stretch the concatenated result out.) If it&amp;#x27;s for a login system where you can rate-limit, then, hey, even 32 bits is a lot if the attacker has to wait one second between tries.&lt;p&gt;Just realized, if you use a parity word to recover from the user flubbing one word in a login system, you don&amp;#x27;t need to store the cleartext in order to correct the word they missed--you just redo the parity calculation on the remaining words to recover it. Yay. Also, to recover after a parity error in a seven-word phrase, you have to check seven different potential passphrases (assume word 1 was erased, apply parity to recover it, check, repeat), so I guess it takes another three bits off your security on top of the 10 of losing a word.&lt;p&gt;On users just omitting a word all the time if the system lets them, I think 1) you require them to enter the full number of words every time, 2) if you see an error recoverable using parity, first you tell them which word was wrong and ask them to re-enter it, 3) if they still can&amp;#x27;t get it, you tell them what the word was (shoulder-surfer issues obv) and they have to type it. Then you minimize how much you show, you (try to) keep the user from slowly forgetting the passphrase one word at a time, and you make sure that entering your whole passphrase is the fastest way to log in.&lt;p&gt;Though it&amp;#x27;s nice what weird stuff you can do while keeping a hashed cred DB, if it were a login code (not crypto key) and there were big wins to other aspects of the system to keeping the clear version around (for example, it let you do some significantly better error-tolerance strategy), I&amp;#x27;m not sure you have quite the same level of obligation around a random token that you give out specifically for your app as you do around a password the user entrusts you with that they also use elsewhere.</text></comment>
<story><title>Towards Reliable Storage of 56-bit Secrets in Human Memory [pdf]</title><url>http://www.usenix.org/system/files/conference/usenixsecurity14/sec14-paper-bonneau.pdf</url><text></text></story><parent_chain><item><author>harshreality</author><text>1 and 2 are easy.  Sort the words and use levenshtein distance to correct unrecognized words to the nearest valid word, prior to doing the password hashing.  3 is slightly more difficult; for 7-of-8 you&amp;#x27;d have to store 9 hashes, one for the full list, and 8 more hashes resulting from removing one of the 8 words.  What you gain in user friendliness costs you since you have to store several times the hashes, and you have to run multiple hash computations for each attempted login.&lt;p&gt;It should be noted that 1 and 3 both reduce entropy significantly.&lt;p&gt;A system that lets users omit one of the words in their passphrase will end up with users omitting one of the words all the time (why would you type more than you have to, particularly for passphrases of 20-40 characters?); the effective security of an 8 word passphrase with that system is worse than if it was a 7 word passphrase with no leeway for forgetting words.  With a strict comparison but a passphrase of one less word, attacker then has to guess the right 7 words.  By allowing a word to be forgotten, the attacker can guess any of 8 different 7-word passphrases and get in.&lt;p&gt;Any system that reminds you of the full passphrase has to store the passphrase unhashed (or equivalent, like, with each sub-hash, storing a hint for the missing word), which is unacceptable.</text></item><item><author>twotwotwo</author><text>Humans being the error-prone creatures we are, I wonder how it could work better to a longer word-based code, but allow for certain kinds of errors: for example, 1) word order doesn&amp;#x27;t matter, 2) it tries to correct a word not in the built-in word list to the &amp;quot;closest&amp;quot; word in it, 3) maybe you only need, say, seven of the eight words to be right to get in (then it might remind you of the real code). You can do a little calculation to see how many words you need to get to the desired number of bits then.&lt;p&gt;Pretty different from passwords as we know them (#3 means you can&amp;#x27;t simply store a bcrypt&amp;#x2F;scrypt&amp;#x27;d code--you could build something complicated tricks to square &amp;quot;allow one word wrong&amp;quot; with not storing plain PWs: each word is 10 bits and what you tell the user is really their secret code + a parity&amp;#x2F;ECC word, and correction happens before a convnetional password check--that rabbit hole goes deep, though.) But if all this gets average folks remembering more entropy than before, that makes it kind of interesting.&lt;p&gt;On the study (which I admit just skimming), survey in 2010 suggested about half of Mechanical Turk users were located in the US (&lt;a href=&quot;http://www.behind-the-enemy-lines.com/2010/03/new-demographics-of-mechanical-turk.html)--folks&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.behind-the-enemy-lines.com&amp;#x2F;2010&amp;#x2F;03&amp;#x2F;new-demographi...&lt;/a&gt; who learned English at school would probably do better at memorizing a password in their native language. (I studied French many years in school, but I doubt I&amp;#x27;d memorize a set of random French words as easily as English words.)</text></item></parent_chain><comment><author>jannic</author><text>The system may only store a hash of the correct password, and then try to brute force it with the entered (slightly wrong) password as a starting point.&lt;p&gt;This has several advantages:
- Nearly as secure as only accepting the correct password (as an attacker could do the brute forcing as well, without help from the system)
- Incentive for the user to remember and type the correct password, as logging in with an incorrect password takes longer
- After successfully brute forcing the password, the system can remind the user of the correct one - without having to store it!&lt;p&gt;Of course, this is not without disadvantages:
- Much more load on the server, which probably can&amp;#x27;t be offloaded to the client without leaking the hash. (But perhaps it can, by offloading parts of the calculation to the client, and only doing the final comparison on the server.)
- Depends on efficiently generating a list of likely passwords given an imperfect starting point - one needs to develop a model of likely user errors.&lt;p&gt;Assuming 56 bit passwords, and 2^20 hashes per second, one could try all 4-bit-errors in 9s and all 5-bit-errors in 8min. But &amp;#x27;all possible n-bit errors&amp;#x27; is not a realistic measure, as errors wouldn&amp;#x27;t be random.&lt;p&gt;56 bit would be about 10 random letters, and e.g. assuming that the only possible errors are omissions of letters, one could forget 3 letters and would still be able to login in about 1 minute. On the other hand, an attacker without any knowledge of the password would need ~2000 CPU years to brute force the password.
(Of course the values should be tuned according to the intended security level.)</text></comment>