r/askscience • • Dec 01 '17
Computing Why are PassPhrases better than AlphaNumeric Passwords?
I read very recently that our password system is completely backwards. We encourage long passwords that include Special Characters and Numbers and these end up being hard to remember but easy for a computer to crack. Meanwhile, an easy-to-remember PassPhrase is supposedly much harder for a computer to guess. Is this true and if so, why is this? If a computer is only seeing characters, what does it matter if they’re in an order that WE can understand? For an example, does a computer see Dg(hV6<h1s differently than it sees What1sThis
7
Upvotes
36
u/mfukar Parallel and Distributed Systems | Edge Computing Dec 01 '17 edited Dec 01 '17
Before we begin, take a few minutes and read this comic [1] very carefully.
Done? Alright, let's take it from the basics.
Assumptions
Passwords, as a method of authentication, are ideally supposed to bear these necessary properties:
If passwords had all of those properties, they would be excellent as a method of authentication. Being secret and hard to guess means they wouldn't be easily discovered by attackers, being secret and easy to remember would make them very easy to manage without automated help, and being hard to guess but easy to remember would mean they provide a sizable advantage for their owners over their adversaries.
The panel also assumes the selection of a random English word like 'troubadour' yields an entropy of ~11 bits, in other words there are ~2000 common words. This is plausible, and the lost precision does not invalidate the point either. We will see why.
The panel also assumes really random (random and uniform) selection of a password from that list of common words. For instance, the following activities:
..all reduce the entropy of our password choice. It is not easy to get your users to actually use true randomness, and accept the result. To prove it to you, pick your fantastically random passwords out of a CSPRNG by
openssl rand -base64 32. Good luck memorising that. (Contrary to your misconception, these passwords are hard to guess and hard to remember).Humans will likely also complain about the hassle of typing a password like that - if the typing involves our shitty smartphones, I must say that I quite understand them. An unhappy user is never a good thing, because they will begin to look for countermeasures which favour usability, such as keeping the password in a file and "typing" it with a copy & paste, rather than plausibly unique passwords. Humans are surprisingly creative, especially in bypassing threat models of other humans. Therefore long & complicated passwords have a tendency to backfire, security-wise. It is a demonstrated fact [2] that system users will pick the password that doesn't hinder usability over the password that does, and we will proceed with this assumption in place.
The selection process
Just to prevent any nonsense around what constitutes a "password" and a "passphrase", let's be more stringent:
The password selection process comprises of:
The passphrase selection process comprises of:
The question
Are passphrases better than passwords?
We defined 3 desired properties for password quality. The ability to keep them secret (password management) is independent of the selection, and the guessing game, so we consider it an orthogonal quality to our evaluation.
Entropy
Passwords must also be hard to guess. To be on equal footing, assume an adversary applies the same guessing principles and process to both passwords and passphrases. What this means is that the adversary, like a system user, has knowledge of the password rules, i.e what constitutes a valid password/passphrase. If the adversary does not have this knowledge then we're looking at another problem altogether, period. We also assume the adversary has no additional information that pertains to the password/passphrase of a single user (i.e. they can't know that John in particular worships pop singers), and they have the same benefit by guessing any system user's password/passphrase (i.e. it is not more profitable to guess Alice's password rather than Bob's).
With these rules as our threat model, we can use a very useful piece of software, password strength estimators. [3] We can input our choice(s) of password into the estimator and get an entropy estimate for it, as well as estimated time to crack based on its codified assumptions (note: these are slightly different between zxcvbn and the comic panel, which is why we talk about entropy). Input some passwords based on the rules imposed by, say, your bank, an email provider, your university, and some passphrases of 4 or 5 words that you generate. Take note of those results, compare them. Do passphrases win?
Why? Back to our assumptions. For N = 2048 and M = 4, each random word selection is worth log*22048 = 11 bits; crucially, each word was selected uniformly (Pword* = 1/2048), and independently of the other words (you neither chose nor rejected a word so that it matches or non-matches the previous words). Since humans are not good at all at doing random choices in their head (see our FAQ), we assume the random word selection is done with a physical device.
The total entropy is then 44 bits (44 boxes in the comic).
Contrast this with the password method, which I'll put in a comment here.
At this point we've done a lot of work. Pour yourself some of your favourite beverage, or a little snack, and we'll come back.
Recall
Alright, so we started by stating that passwords must be easy to remember.
Without looking at the list of passwords you might've noted down with their corresponding entropy estimates, try to recall some of them, and try to recall some of your passphrases. How many did you get right?
We don't yet know what makes strings of words easy to recall. We can demonstrate consistently, however, we are able to memorise long poems, presentation materials, complex abstract definitions, factoids of more than four words. This ability gives us the chance of selecting long passphrases, and length allows for more entropy of choice.
Length on its own does not make for a better password. If you're unconvinced of this, compare the complexity of 'troubadou' and 'troubadour'.
Takeaway
First of all, I hope your take away from this is NOT to always use a specific passphrase, and I really really hope you don't pick "correct horse battery staple" as your passphrase. The selection process for passwords is important, and it is where this whole process is based on. If you're not picking your password randomly and uniformly, an attacker who knows YOU knows what to look for.
Secondly, be aware of when you're making tradeoffs for the sake of usability. It might mean you're using a badly designed system, that's just waiting to fail.
Thirdly, the rules of the game are given to you by the authentication system. If you're ever in doubt whether a password or passphrase will be better, put your combinatorics skill to the test. Use a password estimator.
Fourthly (?), admit your fallibility, use an audited and reviewed password manager that fits your needs. Concede that you can't possibly know the randomness in a password like "Tr0ub4dor&3", let alone compare it with "science divers speak prophetic gongoozlers". Consult your IT department(s). Seek advice from PROFESSIONALS, and advise your bank to seek that same advice.
Lastly but not least, common password choice rules fail at BOTH generating hard to guess passwords, AND generating easy to remember passwords. This is the main thing to take away from this. Cheerio.
[1] I'm really sorry if you, like me, are not a fan, but this panel is right on point.
[2] Analyses of published compromised system/service passwords repeatedly show that weak passwords are widely used.
[3] zxcvbn is based on solid, and extensive, research. It may not apply universally, but is an extremely good guide on our common use-cases.
8
u/UncleMeat11 Dec 01 '17 edited Dec 01 '17
To add to what has already been said. I really think that the discussion about password hardness is a super huge red herring that has little impact on security.
Online password crackers are basically nonexistent. If you throw up an SSH service on port 22 on AWS and watch what password attempts you get, they won't be complicated. This is largely because rate limiting works well and attackers would rather try to absolute most common passwords.
So why is a hard password useful? The problem is data breaches where salted and hashed password databases get leaked. Now you can use an offline attack to try to crack the passwords much much much more effectively than an online attack. So a more complex password will take longer to break.
But wait you say, if somebody already has breached a system and stolen the password database why do they need my password! And this is generally reasonable. The service has already been breached and your password for that service is no longer protecting whatever you had there.
The problem is when you reuse the password across multiple services. When your credentials are extracted from stolen database contents, attackers will attempt to reuse them on other services. This approach has a much higher success rate than guessing passwords at random because people are dumb and reuse passwords.
How do you solve this? Don't reuse passwords. If you use a password manager to ensure that all of your passwords are absolutely unique, the strength of your password really does not matter all that much beyond the most trivial things. I understand that this is a pretty controversial opinion but I really think that all of this discussion about password selection strategies really just gives people a reason to believe that they are doing the right thing when really they will be reusing these passwords everywhere because no human can remember dozens of unique passwords even if they use this passphrase trick. Users only have so much attention for security advice so the important thing is to give only the most useful advice rather than inundating them with options. For most people, the security benefit of a password manager is greater than the security benefit of harder passwords so I default to just suggesting the former.
All this said, if you are a high value person and expect people to target you specifically, most of this advice goes out the window.
1
u/Zaphod1620 Dec 01 '17
Question: Does a dictionary attack not work anymore? It has been probably 15 years since I have played with them, but using (Cane&Abel?), a dictionary attack was able to pick out the words in a password, even around the random letters, numbers and special characters. For example, if i had a known password of beaver56<;94*tail69iht45, the dictionary attack woukd almost immediately reveal beaver#######tail####### before moving on to brute force. Woukd the paraphrase not be immediately broken this way?