Monday, 7 March 2016

Longer Is Not Necessarily Better For Passwords

Passwords are a fact of life and despite the advances seen in fields such as biometrics they are likely to remain part of the online landscape for the foreseeable future.  Not surprisingly then there is much advice on how to choose your passwords.  Unfortunately we all know that the best passwords are those you cant remember.  It's all about Entropy - a subject I discussed here several years ago.

One piece of advice often seen is that longer passwords are better.  That would be good advice if the characters were truly random but one often sees advice also being given (and I've done it myself) to choose a phrase or saying that will help you remember a longer password/passphrase.

However, being human we choose passwords that are not random, even when we think we are creating random strings by substituting unusual characters in our passphrase/password. Research presented in recent months suggests that we as our languages are theoretically very limited and predictable (within the meanings defined in Information Theory developed by Shannon in the late 1940s).  We all like to choose phrases that are linguistically correct and this is a problem.

As such, rather than simply try to crack passwords by brute force there is a possibility that one could create models that predict these phrases, and hence increase the speed at which passwords could be cracked over simple brute force.  Having said that, the increase in computing power, the availability of rainbow tables and similar techniques, makes cracking passwords frighteningly quick unless entropy is high.  This was made clear by a recent survey into password cracking and countermeasures.

One particular paper caught my attention: Linguistic Cracking of Passphrases using Markov Chains. Having used Markov chains in many applications previously I know how useful they can be.  For those not familiar with Markov chains this is a good visual explanation of the subject.  Also, although anyone who has spent any time in cryptanalysis will understand n-grams, if not it is worth understanding n-grams before trying to understand this paper.

This work was presented at PasswordsCon 2015 in Canbridge:

The researchers applied the Markov process to model the language used in the set of passwords leaked from LinkedIn in 2012. It appeared to show promise, but it didn't quite reach the goal theoretically possible.  However, what it did show was that this approach is that this is approach appears to be a viable, computationally efficient method of cracking passwords that might pose difficulties for existing techniques.

One thing it has most definitely demonstrated is that increasing the length of a password/passphrase may not mitigate the risk of cracking in quite the way that had previously been advised.  Doubtless there will be further developments in this area in the near future.