4 words for a password is not enough

ยท

Originally published 2016 on my old blog, preserved as-is.

(For a short explanation on entropy in context of passwords, check the bottom)

There's a particular xkcd strip regarding the strength of passwords vs passphrases that I see being circulated quite often in discussions regarding password security.

I love xkcd, but this strip presents the problem of sufficient password entropy in a little too optimistic light.

The problem

Firstly, the number of guesses a second being placed at 1000 is a major underestimation for offline attacks (a situation where the hash of your password is available to the attacker). Software such as hashcat, which utilize the power of modern GPUs, can generate up to 1000 million hashes a second. In this case, the amount of entropy presented in the xkcd comic would be overcome not in 550 years, but in 4.5 hours.

Secondly, a dictionary size of roughly 2000 words is assumed. It's not made clear that "random" should mean computer generated. Due to what is called Zipf's law, the amount of words from which the average person draws their phrase would likely be much smaller than 2000. Assuming a word pool of 500, our password would be cracked in a single minute.

Even if the words in the phrase were randomized, a 2000 word dictionary for a 4-word phrase is simply not enough. Against a well-funded attacker, even 10 000 words would not be enough. Though a single modern GPU would take over 100 days to crack a 4-word passphrase with a 10 000 word dictionary, hash generation is a task which scales fairly linearly with the addition of more GPU units. If the attacker has access to a node of 100 GPU units, we would again be down to a single day to crack the password.

https://blog.codinghorror.com/speed-hashing/

The solution

In order to ward off a non-dedicated offline attack as of at the time of writing this post, the entropy we need is likely to be at around 60 bits, meaning that we need a way to form a password that can lead up to 2^60 unique combinations.

If we increased our word amount to 5 and utilized EFF's list of 7776 words for passphrases, then we would reach log2(7776^5), or ~64, bits of entropy. At 584 years for a single-GPU setup to break our password, we're now close to the 550 years referred to in the xkcd strip.

This might not be sufficient against a well funded attack, but it should be enough for most uses. (For the most important passwords, I would use an ordinary password generator and either write the password down or store it in a secure master space. A 12 character random password taking use of all 95 printable ASCII characters would feature entropy of 78 bits.)

The most important thing to remember with passphrases is to guarantee the randomness of the phrase. As we all know, humans are terrible as random number generators, so computer generation should be utilized. In summary, use a large enough word dictionary and use enough words in your phrase.

TL;DR

4 words in a passphrase is too little. 2000 word dictionary is too small. Use 5 or more words per passphrase and use a dictionary with ~7000 words.

Bonus resource!