1286

How accurate is this XKCD comic from August 10, 2011?

linked and maintained alt-text

I've always been an advocate of long rather than complex passwords, but most security people (at least the ones that I've talked to) are against me on that one. However, XKCD's analysis seems spot on to me.

Am I missing something or is this armchair analysis sound?

9
  • 53
    A practical note: I have used Diceware to help me select random words before. I found I could remember 5 words really easily. I did roll a couple of times to find a sequence that felt nice to say (in my head) though, without necessarily making sense.
    – Alex Bowe
    Aug 10, 2011 at 23:03
  • 316
    New most common passwords: onetwothreefour passwordpasswordpasswordpassword teenagemutantninjaturtles Aug 11, 2011 at 8:35
  • 39
    I think commentors here have brought up all of these points already but, for the record, here's some elaboration by the comic's author, Randall Munroe: ask.metafilter.com/193052/…
    – Michael
    Aug 11, 2011 at 15:56
  • 152
    Makes you wonder why some banks limit your password to 6 or 7 characters. Aug 11, 2011 at 19:06
  • 70
    @LotusNotes Mine requires exactly FIVE! And every stupid forum requires a >8 chars, upper+lowercase+numbers+punctiation... Aug 11, 2011 at 20:28

23 Answers 23

1605
+500

I think the most important part of this comic, even if it were to get the math wrong (which it didn't), is visually emphasizing that there are two equally important aspects to selecting a strong password (or actually, a password policy, in general):

  • Difficulty to guess
  • Difficulty to remember

Or, in other words:

  • The computer aspect
  • The human aspect

All too often, when discussing complex passwords, strong policies, expiration, etc (and, to generalize - all security), we tend to focus overly much on the computer aspects, and skip over the human aspects.

Especially when it comes to passwords, (and double especially for average users), the human aspect should often be the overriding concern.
For example, how often does strict password complexity policy enforced by IT (such as the one shown in the XKCD), result in the user writing down his password, and taping it to his screen? That is a direct result of focusing too much on the computer aspect, at the expense of the human aspect.

And I think that is the core message from the sage of XKCD - yes, Easy to Guess is bad, but Hard to Remember is equally so.
And that principle is a correct one. We should remember this more often, AKA AviD's Rule of Usability:

Security at the expense of usability comes at the expense of security.

16
  • 770
    Your last quote deserves a thousand upvotes. Mar 20, 2012 at 4:07
  • 43
    For an in-depth analysis of the maths behind the xkcd, see Thomas's answer below. His answer shows why the xkcd got the math right, a perfect complement to why it doesn't actually matter.
    – AviD
    Mar 16, 2013 at 21:56
  • 5
    @njzk2 It sounds a lot like a phrase that people who keep their passwords on a desk post-it would use to reassure themselves by fooling themselves into thinking they are safe. If my home gets robbed I would be much more concerned about the robbers having my banking password than about having lost my cash, jewelry etc; especially if I find out about the burglary only when I get home at the end of the day. The only remotely potentially tenable justification for keeping passwords on desk post-its is that they are passwords to something not important so it's no big deal if someone steals them. Feb 9, 2016 at 10:07
  • 6
    @SantiBailors agreed, it is not a good practice. But I think it is better for someone who would have difficulties in remembering a good password than choosing something trivial, like the name of their dog.
    – njzk2
    Feb 10, 2016 at 14:55
  • 16
    Another thing that makes the battery staple method better (via AviD's observation on usability) is the increasing number of mobile devices. On a mobile keyboard, the 'leetspeak' method requires a lot of pecking and symbol table shifting to and fro, while the battery staple method can be typed in much more easily with less risk of error. Try timing yourself how quickly you can enter either sample password on an iPhone's screen keyboard. Dec 2, 2017 at 14:20
563

Here is a thorough explanation of the mathematics in this comic:

The little boxes in the comic represent entropy in a logarithmic scale, i.e. "bits". Each box means one extra bit of entropy. Entropy is a measure of the average cost of hitting the right password in a brute force attack. We assume that the attacker knows the exact password generation method, including probability distributions for random choices in the method. An entropy of n bits means that, on average, the attacker will try 2n-1 passwords before finding the right one. When the random choices are equiprobable, you have n bits of entropy when there are 2n possible passwords, which means that the attacker will, on average, try half of them. The definition with the average cost is more generic, in that it captures the cases where random choices taken during the password generation process (the one which usually occurs in the head of the human user) are not uniform. We'll see an example below.

The point of using "bits" is that they add up. If you have two password halves that you generate independently of each other, one with 10 bits of entropy and the other with 12 bits, then the total entropy is 22 bits. If we were to use a non-logarithmic scale, we would have to multiply: 210 uniform choices for the first half and 212 uniform choices for the other half make up for 210·212 = 222 uniform choices. Additions are easier to convey graphically with little boxes, hence our using bits.

That being said, let's see the two methods described in the comic. We'll begin with the second one, which is easier to analyze.

The "correct horse" method

The password generation process for this method is: take a given (public) list of 2048 words (supposedly common words, easy to remember). Choose four random words in this list, uniformly and independently of each other: select one word at random, then select again a word at random (which could be the same as the first word), and so on for a third and then a fourth words. Concatenate all four words together, and voila! you have your password.

Each random word selection is worth 11 bits, because 211 = 2048, and, crucially, each word is selected uniformly (all 2048 words have the same probability of 1/2048 of being selected) and independently of the other words (you don't choose a word so that it matches or non-matches the previous words, and, in particular, you do not reject a word if it happens to be the same choice as a previous word). Since humans are not good at all at doing random choices in their head, we have to assume that the random word selection is done with a physical device (dice, coin flips, computers...).

The total entropy is then 44 bits, matching the 44 boxes in the comic.

The "troubador" method

For this one, the rules are more complex:

  1. Select a random word in a given big list of meaningful words.
  2. Decide randomly whether to capitalize the first letter, or not.
  3. For the letters which are eligible to "traditional substitutions", apply or not apply the substitution (decide randomly for each letter). These traditional substitutions can be, for instance: "o" -> "0", "a" -> "4", "i" -> "!", "e" -> "3", "l" -> "1" (the rules give a publicly known exhaustive list).
  4. Append a punctuation sign and a digit.

The random word is rated to 16 bits by the comic, meaning uniform selection in a list of 65536 words (or non-uniform in a longer list). There are more words than that in English, apparently about 228000, but some of them are very long or very short, others are so uncommon that people would not remember them at all. "16 bits" seem to be a plausible count.

Uppercasing or not uppercasing the first letter is, nominally, 1 bit of entropy (two choices). If the user makes that choice in his head, then this will be a balance between user's feeling of safety ("uppercase is obviously more secure !") and user's laziness ("lowercase is easier to type"). There again, "1 bit" is plausible.

"Traditional substitutions" are more complex because the number of eligible letters depends on the base word; here, three letters, hence 3 bits of entropy. Other words could have other counts, but it seems plausible that, on average, we'll find about 3 eligible letters. This depends on the list of "traditional substitutions", which are assumed to be a given convention.

For the extra punctuation sign and digit, the comic gives 1 bit for the choice of which comes first (the digit or the punctuation sign), then 4 bits for the sign and 3 bits for the digit. The count for digits deserves an explanation: this is because humans, when asked to choose a random digit, are not at all uniform; the digit "1" will have about 5 to 10 times more chances of being selected than "0". Among psychological factors, "0" has a bad connotation (void, dark, death), while "1" is viewed positively (winner, champion, top). In south China, "8" is very popular because the word for "eight" is pronounced the same way as the word for "luck"; and, similarly, "4" is shunned because of homophony with the word for "death". The attacker will first try passwords where the digit is a "1", allowing him to benefit from the non-uniformity of the user choices.

If the choice of digit is not made by a human brain but by an impartial device, then we get 3.32 bits of entropy, not 3 bits. But that's close enough for illustration purposes (I quite understand that Randall Munroe did not want to draw partial boxes).

Four bits for punctuation are a bit understated; there are 32 punctuation signs in ASCII, all relatively easy to type on a common keyboard. This would mean 5 bits, not 4. There again, if the sign is chosen by a human, then some signs will be more common than others, because humans rarely think of '#' or '|' as "punctuation".

The grand total of 28 bits is then about right, although it depends on the precise details of some random selections, and the list of "traditional substitutions" (which impacts the average number of eligible letters). With a computer-generated password, we may hope for about 30 bits. That's still low with regards to the 44 bits of the "correct horse" method.

Applicability

The paragraphs above show that the maths in the comic are correct (at least with the precision that can be expected in these conditions -- that's a webcomic, not a research article). It still requires the following conditions:

  • The "password generation method" is known by the attacker. This is the part which @Jeff does not believe. But it makes sense. In big organizations, security officers publish such guidelines for password generation. Even when they don't, people have Google and colleagues, and will tend to use one of about a dozen or so sets of rules. The comic includes provisions for that: "You can add a few more bits to account for the fact that this is only one of a few common formats".

    Bottom-line: even if you keep your method "secret", it won't be that secret because you will more or less consciously follow a "classic" method, and there are not that many of those.

  • Random choices are random and uniform. This is hard to achieve with human users. You must convince them to use a device for good randomness (a coin, not a brain), and to accept the result. This is the gist of my original answer (reproduced below). If the users alter the choices, if only by generating another password if the one they got "does not please them", then they depart from random uniformity, and the entropy can only be lowered (maximum entropy is achieved with uniform randomness; you cannot get better, but you can get much worse).

The right answer is of course that of @AviD. The maths in the comic are correct, but the important point is that good passwords must be both hard to guess and easy to remember. The main message of the comic is to show that common "password generation rules" fail at both points: they make hard to remember passwords, which are nonetheless not that hard to guess.

It also illustrates the failure of human minds at evaluating security. "Tr0ub4dor&3" looks more randomish than "correcthorsebatterystaple"; and the same minds will give good points to the latter only because of the wrong reason, i.e. the widespread (but misguided) belief that password length makes strength. It does not. A password is not strong because it is long; it is strong because it includes a lot of randomness (all the entropy bits we have been discussing all along). Extra length just allows for more strength, by giving more room for randomness; in particular, by allowing "gentle" randomness that is easy to remember, like the electric horse thing. On the other hand, a very short password is necessarily weak, because there is only so much entropy you can fit in 5 characters.

Note that "hard to guess" and "easy to remember" do not cover all that is to say about password generation; there is also "easy to use", which usually means "easy to type". Long passwords are a problem on smartphones, but passwords with digits and punctuation signs and mixed casing are arguably even worse.


Original answer:

The comic assumes that the selection of a random "common" word yields an entropy of about 11 bits -- which means that there are about 2000 common words. This is a plausible count. The trick, of course, is to have a really random selection. For instance, the following activities:

  • select four words randomly, then remember them in the order which makes most sense;
  • if the four words look too hard to remember, scrap them and select four others;
  • replace one of the words with the name of a footballer (the attacker will never guess that !);

... all reduce the entropy. It is not easy to get your users to actually use true randomness and accept the result.

The same users will probably complain about the hassle of typing a long password (if the typing involves a smartphone, I must say that I quite understand them). An unhappy user is never a good thing, because he will begin to look for countermeasures which will make his life easier, such as keeping the password in a file and "typing" it with a copy&paste. Users can often be surprisingly creative that way. Therefore long passwords have a tendency to backfire, security-wise.

18
  • 37
    One crucial thing I believe this answer is missing is a mention of dictionary attacks. It may be obvious to anyone versed in this stuff that dictionary attacks are considered in the entropy calculation, but every single time I've heard someone criticise this xkcd strip, it's on the grounds that the author only considers brute force attacks and that a real attacker can use a more sophisticated dictionary attack. The thinking there is wrong, but I think dictionary attacks need a mention just to nay-say the naysayers and clear up the confusion here. Apr 10, 2016 at 1:47
  • 5
    An error here : A string of 4 Randomly chosen words out of your dictionary...is also a string of characters chosen out of the 26 letter alphabet.... and its entropy has to be seen in that regard too. Hence the total number of letters in the string have to be such that that they do not reduce the entropy as seen from a 'Word' POV .
    – ARi
    Oct 13, 2016 at 7:00
  • 12
    @Score_Under On the contrary, this answer assumes a dictionary attack, as does the comic. Jun 8, 2017 at 18:03
  • 6
    I love how you and AviD linked to each other's answers.
    – NH.
    Aug 14, 2017 at 2:01
  • 9
    @NH It happens.
    – jpaugh
    Oct 10, 2017 at 14:40
256

The two passwords, based on rumkin.com's password strength checker:

Tr0ub4dor&3

  • Length: 11
  • Strength: Reasonable - This password is fairly secure cryptographically and skilled hackers may need some good computing power to crack it. (Depends greatly on implementation!)
  • Entropy: 51.8 bits
  • Charset Size: 72 characters

and

correct horse battery staple

  • Length: 28
  • Strength: Strong - This password is typically good enough to safely guard sensitive information like financial records.
  • Entropy: 104.2 bits
  • Charset Size: 27 characters

It is certainly true that length, all other things being equal, tends to make for very strong passwords -- and we're seeing that confirmed here.

Even if the individual characters are all limited to [a-z], the exponent implied in "we added another lowercase character, so multiply by 26 again" tends to dominate the results.

In other words, 7211 < 2728.

Now, what is not clearly addressed:

  1. Will these passwords have to be entered manually? And if so, how difficult is it, mechanically, to enter a each character of the password? On a keyboard it's easy, but on a smartphone or console... not so much.

  2. How easy are these passwords to remember?

  3. How sophisticated are the password attacks? In other words, will they actually attempt common schemes like "dictionary words separated by spaces", or "a complete sentence with punctuation", or "leet-speak numb3r substitution" as implied by xkcd? Crucially, this is how XKCD justifies cutting the entropy of the first password in half!

Point 3 is almost unanswerable and I think personally highly unlikely in practice. I expect it will be braindead brute force all the way to get the low-hanging fruit, and the rest ignored. If there isn't any low-hanging password fruit (and oh, there always is), they'll just move on to the next potential victim service.

Therefore I say the cartoon is materially accurate in terms of its math, but the godlike predictive password attacks it implies are largely a myth. Which means, IMHO, that these specific two passwords are kind of a wash in practice and would offer similar-ish levels of protection.

2
  • 214
    @Jeff, this answer is flawed. You rely upon rumpkin for password entropy estimation, but rumpkin's estimates are apparently bogus. Look at the xkcd comic again: it visually depicts the justification for its entropy estimate (that's what the little boxes are doing). xkcd's entropy estimates look about right to me, and your entropy estimates look wrong (overly optimistic). I totally disagree with your conclusion, and I don't see where you get it from.
    – D.W.
    Aug 11, 2011 at 2:46
  • 2
    Comments are not for extended discussion; this conversation has been moved to chat.
    – Rory Alsop
    Oct 27, 2015 at 8:22
77

I agree that length is often preferable to complexity. But I think the controversy is less around that, and more around how much entropy you want to have. The comic says that a "plausible attack" is 1000 guesses/second:

"Plausible attack on a weak remote web service. Yes, cracking a stolen hash is faster, but it's not what the average user should worry about"

But I see more of a consensus that web site operators can't keep their hash databases secure over time against attackers, so we should engineer the passwords and hash algorithms to withstand stealing the hashes for offline attack. And an offline attack can be massive, as described at How to securely hash passwords?

This makes the problem even harder, and sites should really be looking at options besides requiring users to memorize their own passwords for each web site, e.g. via OpenID and OAuth. That way the user can get one good authentication method (perhaps even involving a hardware token) and leverage it for web access.

But good password hashing can also be done via good algorithms, a bit more length, and bookmarklet tools. Use the techniques described at the above question on the server (i.e. bcrypt, scrypt or PBKDF2), and the advice at Is there a method of generating site-specific passwords which can be executed in my own head? on the use of SuperGenPass (or SuperChromePass) on the user/client end.

12
  • 4
    interesting, so this means from the user's perspective, the choice of password is almost -- except for "Password1" type brain damage -- irrelevant! Aug 11, 2011 at 0:02
  • 5
    Right, it depends on what the threat is. I may just start writing risk = threat x vulnerability x exposure on every question. And for Thomas those are multidimensional cross product operations, and I am assuming a right handed coordinate system in Euclidean space.
    – this.josh
    Aug 11, 2011 at 5:11
  • 2
    You don't need strong password for website. Just force 2^attempts miliseconds delay between two consecutive login attempts, or block the password after 10 wrong trials. 10,000 different passwords are enough for a decent protection if we only need to protect a website. Aug 11, 2011 at 6:13
  • 5
    @Elazar I've had access to all kinds of databases in my various jobs. In most of them, nobody would notice if I dumped a copy to a file and walked out with it, reversed those short, irrelevant passwords that users have handily re-used on other sites, then went from there. Database compromise by an external actor isn't the only reason for hashing passwords properly, or for users choosing strong passwords.
    – user2213
    Aug 11, 2011 at 21:58
  • 3
    `` @nealmcb @elazar it isn't just a convenience thing. If you allow weak passwords or strong ones, people use passwords in patterns, like youtotallywouldnotguessthis01 then youtotallywouldnotguessthis02. Also, if additional services don't make the same restriction, they're then affected. Good hashing is therefore critical - plan is if the database is already compromised. Although you're right that if you're actually experiencing frequent compromise you've probably got bigger issues.
    – user2213
    Aug 12, 2011 at 8:34
72

I think most of the answers here are missing the point. The final frame is talking about ease of memorization. correct horse battery staple (typed from memory!!) eliminates the fundamental danger of password security -- The Post-IT note.

Using the first password, I've got a Post-IT note in my wallet (if I'm smart) or in my desk drawer (if I'm dumb) which is a huge security risk.

Lets assume that the pass phrase option is only as secure as the munged base word option, then I'm already better off because I've eliminated the human failing in password storage.

Even if I wrote down the pass phrase, it wouldn't look like a password. It might be a shopping list - Bread Milk Eggs Syrup. But 5t4ck3xCh4ng3 is very obviously a password. If I came across that, It would be the first thing I would try.

8
  • 5
    I have trouble with the odd order of the words. The funny thing is, I think the FINAL frame image, with "Horse: That's a battery staple. Me: Correct!" is even simpler and easier to remember since it's how the actual sentence would work. And much stronger.. Aug 11, 2011 at 16:43
  • 6
    Maybe we should just introduce graphical passwords, where you have to draw the horse and battery staple in the final frame image. ;-)
    – TrojanName
    Aug 12, 2011 at 11:23
  • 2
    Absolutely, as I said in my answer too - password security is not just about entropy, it's about the human aspect, and how the user remembers it (or doesn't). Entropy is absolutely important, but that's not the end of the story.
    – AviD
    Aug 13, 2011 at 21:11
  • 15
    Having a post-it with a very complex password sure beats having a bad password memorized. Usually you're protecting yourself from remote attacks, not someone sneaking around on your desk (that is an issue for office security). Also, with post-its you can easily disguise the password or alter it slightly ("every 1 is a 2", or the password is only half of what is written etc.) to make it useless for anyone else. You're oversimplifying. (Also, just realized how old this is, sorry, but I still think it applies)
    – pzkpfw
    Mar 1, 2013 at 7:09
  • 2
    6 years later from memory- "Correct Horse Battery Staple". (Scroll up and check - YES!) Aug 4, 2017 at 12:55
57

To add to Avid's excellent answer, the other key messages of the comic are:

  • the appropriate way to calculate the entropy of a password generation algorithm is to calculate the entropy of its inputs, not to calculate the apparent entropy of its outputs (as rumkin.com, grc.com etc. do)
  • minor algorithm variations such as "1337-5p34k" substitutions and "pre/append punct & digits" add less entropy than most users (or sysadmins) think
  • (more subtly) passphrase entropy depends on wordlist size (and number of words), not number of characters, but can still provide easily sufficient entropy to protect against "generation algorithm aware" brute force attacks

To those messages we might wish to add:

  • as a user you can't generally control whether the web site operator uses salting, bcrypt/scrypt/PBKDF2, keeps their password hashes safe, or even whether they hash passwords in the first place -- so you should probably choose passwords that matter on the basis that they don't (e.g. assume 10^9 guesses per second when sizing passwords/phrases, don't reuse passwords and don't use simple "append the site name" techniques) - which probably makes using LastPass/KeePass/hashpass inevitable
  • long complicated words don't add much to the entropy unless you use more than a couple of them (there are only ~500K words in English, which is only 19 bits -- just 8 bits more than a word from Randall's 2048-word list)
  • the "random words" need to be really random for this to work -- picking song lyrics/movie quotes/bible verses gives much lower entropy (e.g. even with perfectly random choice, there are only 700K words in the bible, so there are only ~4M 5-10 word bible phrases, which is only 22 bits of entropy)
2
  • 4
    Have you considered that from the Bible, there are potentially dozens of different translations? King James, NIV, New American Standard, Strong's Concordance, the list goes on. And that's just English. Suppose some American knew a number of verses in Klingon (with appropriate accents, if appropriate). The flip side of this coin is also an interesting concept. Password cracking libraries may become the repositories (out of order) of all knowledge, because college term papers, news broadcasts, and everything else will get included.
    – killermist
    Apr 14, 2015 at 1:25
  • 1
    @killermist. That already exists. (Search for Klingon at the link)
    – jpaugh
    Oct 10, 2017 at 15:06
53

I love xkcd and agree with his basic point -- passphrases are great for adding entropy, but think he low balled the entropy on the first password.

Let's go through it:

  • Random dictionary word. xkcd: 16 bits, Me: 16 bits. A random word from a dictionary with ~65000 words is lg(65000) ~ 16. Very reasonable
  • Adding in capitalization. xkcd: 1 bit, Me: 0 bits (deal with in common subsitutions). 1 bits means its there or not there -- which seems very low for the complexity added by adding capitalization to a password -- generally when capitalization to a password its in a random place or I can think of other many possible capitalization schemes (capitalize everything, capitalize the last letter). I'm going to group this with common substitutions.
  • Common substitutions. xkcd: 3 bits, Me: 13 bits. Only 8 choices for leet speak substitutions, even when only sometimes used? I can think of on average ~2 ways to leet alter each letter (like a to @,4; b to 8,6; c to (,[, <) and add in the original or capitalizing the letter, then for a 9 letter password, I've increased the entropy by 18 (lg(4**9)=18), if I randomly choose each letter to leet alter or not. This is too high for this password, however. A more reasonable approach would be say I randomly chose say 4 letters to "common substitutions" to (one of two leet options, plus capitalization for three options for each letter being substituted). Then it gets to lg( nCr(9,4) 3*4) ~ 13 bits.

  • Adding two random characters '&3' to the end. xkcd: 8 bits, Me: 15 bits. I'm considering it as two characters to one of ~4 places (say before the word, one before and one after, both after, or both smack in the middle of the word). I'll also let non-special characters be in these two added letters. So assuming an 88 character dictionary (56 characters+10 digits, plus 32 symbols) you add lg(4 * 80**2) ~ 15 bits of entropy.

So I have the calculation as not being 16+2+2+8=28 bits of entropy, but being 16+13+15=44 bits very similar to his passphrase.

I also don't think 3 days at 1000 guesses/sec is by any means "easy" to guess or the plausible attack mechanism. A remote web service should detect and slow down a user trying more than 10000 guesses in a day period for any specific user.

Much more likely are other attacks (e.g., key loggers on public computers, a malicious admin at a service logging passwords and reusing them, eavesdropping if ssl not used, get access to the server somehow (e.g., SQL injection; break into server room; etc)).

I use a passphrase when its necessary -- e.g., strong encryption (and not 44-bits more like 80-bits -- typically 8 word diceware passphrase plus two or three modifications -- e.g., misspell a word or substitute a word for a non diceware word starting with the same two letters; E.g., if you had "yogurt" come up maybe substitute it for "yomama"). For websites (no money involved or security permissions), I don't care about trivial passwords are typically used.

I do notice that for often used passwords, I'm much much better at typing passwords then I am at typing my passphrases (which get annoying when you have to re-key in a ~50 character sentence a few times). Also for passwords, I often prefer finding a random sentence (like a random song lyric -- to a song no one would associate with you that's not particularly meaningful) and come up with a password based on the words (like sometimes use first letter; last letter; or substitute a word for a symbol; etc). E.g. L^#g&B9y3r from "Load up on guns and bring your" from Smells Like Teen Spirit.


TL;DR: Randall is right, if you (a) assume you can check passwords at 1000/s for three days without getting slowed down, and (b) can make many assumptions about the password: constructed based on a rare dictionary word, that is capitalized, has some leet substitutions for some commonly substituted letters, and has a symbol and number added at the end. If you only slightly generalize the allowed substitutions (like I did) and characters added at the end, you get a similar entropy to the passphrase.

In summary, both are probably secure for most purposes with a low threat level. You are much more vulnerable by other exploits, something Randall would likely agree with [538] [792]. In general having password requirements like having a upper/lower/symbol/number is good, as long as long high-entropy passphrases are also allowed. Force additional complexity for shorter passwords, but allow over ~20 characters to be all lower case. Some users will choose poor passphrases just as they choose poor passwords (like "this is fun" which is idiotically claimed to be ridiculously secure here or using their child's name or their favorite sports team). Requiring special characters may make it non-trivial to easily guess (say by a factor of 100-1000 -- changing a password from being 10 likely guesses to 10000 is very significant). Sure it won't prevent any bot on a weak web service that allows thousands of bad login attempts per second, but it forces an addition of a modest level of security which would hinder efforts at sites that limit bad logins or from the unsophisticated manually guessing the password. Sort of like how a standard 5-pin house lock is fundamentally insecure as anyone can learn to pick it in minutes (or break the glass window); however in practice locking your door is good as it provides some safety against the unsophisticated who don't have tools handy (and breaking windows comes with its own dangers of alerting others).

8
  • 1
    "A remote web service should detect and slow down a user trying more than 10000 guesses in a day period for any specific user." <-- Note that the strip says "insecure web service". Of course a secure webservice does slow things down. Not all webservices are secure though. Aug 11, 2011 at 5:35
  • 10
    the comic is saying that all these thing which could increase entropy are done stupidly by users (only capitalise first letter; use a word and only add random number and symbol to the end; etc).
    – DanBeale
    Aug 11, 2011 at 6:31
  • 4
    @DanBeale: If you don't trust the users to make a password in a suitably random way, how do you trust them to make a passphrase in a suitably random way? "this is fun" or "let me in" or "fluffy is puffy".
    – dr jimbob
    Aug 11, 2011 at 13:44
  • 2
    @Billy ONeal: I read the insecure web service part, but think its irrelevant. Most services worth hacking into (banks, major email accts, major seller (amazon), etc.) should be doing basic login throttling. stackoverflow.com/questions/549/… Insecure web services won't; but then again you probably shouldn't be giving any information to insecure web services anyhow -- they may be storing your password in plaintext on computer with known well-known exploits that would take someone much less than 3 days to crack.
    – dr jimbob
    Aug 11, 2011 at 13:55
  • 9
    @DanBeale I think the point is that (some) users will always do the minimum required of them, and that services which force users to use a "strong" password with at least one number, one capital letter, one punctuation mark, etc are actually counterproductive (though they look really good to management!)
    – RoundTower
    Aug 11, 2011 at 17:53
41

Looking at the XKCD comic, and at examples of real world passwords, we see that most users have passwords much much weaker than the XKCD example.

A bunch of users will do exactly as the first panel says - they'll take a dictionary word, capitalize the first letter, do some gentle substituting, then add a number and symbol to the end. That's quite bad, especially if they re-use that password (because they think it's strong) or if their account has privs.

As has been mentioned in comments, Diceware is a nice way to generate a passphrase. I'd like to see the easy read version of a formal analysis of Diceware. (I suspect that even if the attacker has your dictionary and knows that your passphrase is 5 or 6 words long that Diceware is better than a bunch of other password generation systems.

But, whatever password they have, many users can be persuaded to change it to a known value:

http://passwordresearch.com/stories/story72.html

During a computer security assessment, auditors were able to convince 35 IRS managers and employees to provide them with their username and change their password to a known value. Auditors posed as IRS information technology personnel attempting to correct a network problem.

9
  • 8
    good old social engineering... the forever hack. codinghorror.com/blog/2007/05/phishing-the-forever-hack.html Aug 11, 2011 at 16:41
  • 2
    Not sure why you want a "formal" analysis of Diceware. The concept is simple and it works. There's no fancy math needed. Its dictionary has almost 8000 (= 2^13) words, so a random four-word passphrase has about 52 bits of entropy (i.e., there are about 2^52 possible such passphrases, all equally likely; i.e., an attacker would need to try about 2^52 guesses to find your passphrase).
    – D.W.
    Aug 12, 2011 at 5:23
  • 2
    @D.W. Diceware is good, but users are poor. There's a comment on this page from someone who says that they roll more than once to get a memorable passphrase. So, if the phrases given to the users it's okay, but what happens if users are allowed to use diceware themselves? How many re-roll? Which diceware dictioary words are least / most popular?
    – DanBeale
    Aug 12, 2011 at 6:46
  • 8
    @DanBeale, re-rolling a couple of times doesn't significantly harm the entropy. (If you re-roll up to 4 times, the decrease in entropy is at most 2 bits, from 52 bits to 50 bits. Not a big deal.) On the whole, the practice of re-rolling to find a memorable passphrase is probably positive, because it makes passphrases more memorable and hence increases the likelihood that users will use / keep using the Diceware scheme. As you say, the greatest challenge is usability; for that, what's needed is a usability study, not a formal mathematical analysis.
    – D.W.
    Aug 12, 2011 at 19:13
  • 3
    @DanBeale: even re-rolling 16 times decreases the entropy by 4 bits, from 52 to 48. You're still few orders of magnitude better than l33t-speak passwords. Sep 9, 2012 at 15:59
39

The issue is still, sadly, a human one.

Will pushing users to alphanumeric + punctuation passwords be safer, or longer passwords?

If you tell them to user alpha + numbers, they will write their name + birthday. If you tell them to use also use punctuation, they will replace an "a" with "@", or something similarly predictable.

If you tell them "use four simple words", they will write "i love my mother", "i love your mother", "thank god its friday" or something else banally predictable.

You just can't win. The advantage of 4 word passwords is, they can memorize it, so if you are going to force users to have strong passwords (which you generate) then at least they won't need to write it down on a post-it note, or email themselves the password, or something else stupid.

1
  • 17
    But what you've missed is that the xkcd comic was probably advocating that a random four-word password be generated for the user by randomly sampling from a 2048-word dictionary, not asking the user to pick four arbitrary words. This may not have been obvious if you aren't familiar with the history of the field, but the basic idea has been mooted before by cryptographers.
    – D.W.
    Aug 11, 2011 at 20:10
34

Randall is mostly correct here. A few additions:

Of course you have to choose the words randomly. The classic method is Diceware, which involves rolling 5d6, giving almost 13 bits of entropy per word, but the words are more obscure.

There may be 2048 common words in English, but there aren't 2048 short common words in English. The Diceware list (which has 6^5 = 7776 words under 6 letters long) has some pretty obscure stuff in it, plus names, plurals, two-letter combinations, two-digit combinations, 19xx, etc, and I don't think the top quarter of that would be much better. If you just take the top 2k word in English, you get stuff like "multiplication" which is a bit long as part of a 4-word password. So I'd be interested to see Randall's suggested word list.

There are more obvious variations of "Tr0ub4dor&3"-type passwords than of Diceware ones, so in practice the former will have a couple more bits of entropy. Also, in my experience, "Tr0ub4dor&3" type passwords are not actually that hard to remember if you use them often. In the past, I've generated several passwords with strings /dev/urandom, and had no trouble using them as login passwords. Today, though, I couldn't tell you which of the letters were capitalized. On the other hand, I'm not sure I could recite some of my Diceware passwords without confusing homophones, pluralization, etc.

If the password database is stolen, a strengthener like PBKDF2 would add a word or more to to the effective length of one of these passwords, but many sites don't use it. 5 words + one for the strengthener would yield some 66 bits, which is probably too big for a rainbow table. This puts you well out of range of casual attackers, so unless you have something really important on your account you should be fine.

In sum, Diceware-type passwords are ideal for things you type occasionally, but not necessarily every day. If you use a password every day, then Diceware would work, but a strings /dev/urandom password will be shorter and you should be able to memorize it anyway. If you log in rarely, then choose a password in any way you like, toss it into your password manager (which you should use for the more commonly-used passwords too), and forget it.

If a site has some odd restriction, like "no spaces, at least one upper-case letter and at least one number", then string the words together with 5s between them and cap the first letter. This loses epsilon entropy for Diceware and none for Randall's scheme.

4
  • 9
    I think you overestimate the ability for the average person to memorize random data. Aug 12, 2011 at 18:13
  • For your password database, you should use a salt anyway, so rainbow tables are of no use. Jan 27, 2013 at 18:13
  • 7
    Example output of strings -n 10 /dev/urandom has stuff like t!AF|r)WlB, <^p!*P,gvv and -WAWkG;]%>(. Are you really claiming that you can remember any of those? The correct horse battery staple beer sounds like a winner to me and still has roughly the same entropy. Mar 8, 2013 at 10:34
  • 1
    The Mnemonic word list has 1626 words (entropy: 10.66 bits/word) with average length of 5.76 chars (4-7 chars/word). All words are real, internationally recognizable and phonetically different. As a non-native English speaker I find them quite easy to understand. About Diceware: I use Diceware method with Finnish word list to generate passphrases that I type many times every day at my work (the length is not a problem for me). The Finnish word list is much better than the original because all words are real and there is much less oddities.
    – mgronber
    Jun 18, 2014 at 6:51
32

The Openwall Linux pwqgen tool generates passwords with a specific amount of entropy along these very lines.

However, instead of using spaces to separate words, punctuation characters and digits are used instead. Here's ten examples with 49 bits of entropy:

Cruise!locus!frame
tehran!Commit6church
Seller7Fire3sing
Salt&Render4export
Forget7Driver=Tried
Great5Noun+Khaki
hale8Clung&dose
Ego$Clinch$Gulf
blaze5vodka5Both
utmost=wake7spark

The words are harder to read without their spaces, but in the years that I've been using passwords generated with this tool, I haven't found the punctuation to be difficult to remember.

3
  • 2
    Thanks for the pointer! But I think you have a typo there. I'm guessing you're providing a list with 44 bits of entropy, not 64. It starts generating 4-word phrases at 48 bits. And for the record, via for i in {26..81}; do echo -n $i " "; pwqgen random=$i; done: At 26 bits it has 2 word phrases, at 27 it adds punctuation separators, at 31 it has 3 word phrases, with punctuation at 40, at 48 it has 4 word phrases, with punctuation at 53, at 65 it moves to 5 word phrases, with punctuation at 66, all the way up to 81 bits. Seems a bit odd there.
    – nealmcb
    Dec 19, 2014 at 5:53
  • 4
    The passwdqc source code reveals a tiny 4096 word dictionary, Meaning the true bit entropy of these "64 bit" examples is actually 49.8 bits: log₂(⟨4096×2⟩×42×⟨4096×2⟩×42×⟨4096×2⟩) (2x for random-cased 1st letter, 42 printable non-letter chars on a en_US keyboard). Diceware is 7776 words and a standard dictionary is 100k words. passwdqc would need 155k words for 64 bits of entropy. See also my pw entropy table.
    – Adam Katz
    Jul 27, 2015 at 19:04
  • 1
    @AdamKatz, yikes. I've always assumed it used /usr/share/dict/words on my system, which is ~100k words, which would have lead to ~60 bits of entropy for this format. I'll amend my answer. Thanks.
    – sarnold
    Aug 1, 2015 at 0:48
27

I'm not a security expert, but I think there's a mistake here.

The point of the comic seems to indicate that by increasing the length of the password, you will increase the complexity.

The complexity of a four word password is actually significantly reduced. Essentially you've swapped 8-11 semi randomly selected characters for 4 randomly selected words. The length of the pass-phrase is less important than the number of words. All that is required is that the attacker attempts various combinations of words from a dictionary. Words used are likely to be fairly common if they are to be remembered and are likely to be short if they must be typed.

Dictionary attacks are already used to great effect. We don't commonly use 260,000 words. We only know around 12,000 to 20,000 words. Of these we commonly use less than 8,000. I can't imagine regular users are going to create passwords which contain long and complicated words to type which further reduces the subset of possible words. Assuming that everyone were to start using this method of password selection, then dictionary attacks would actually become far more effective.

Now, a combination of the two may be more secure, although this defies the point of the exercise.

13
  • 13
    11 bits of entropy are assumed for a dictionary word. That translates to 2000 words, much less than 8K that you mentioned previously. So, the argument would still hold. Aug 11, 2011 at 0:45
  • 28
    This answer ignores the numbers used in XKCD analysis and thus is completely unfounded!
    – Rotsor
    Aug 11, 2011 at 1:36
  • 11
    "the comic seems to indicate that by increasing the length of the password, you will increase the complexity" - No, that's not what the comic is saying at all. Read it again, more carefully this time.
    – D.W.
    Aug 11, 2011 at 2:50
  • 20
    I think you're confusing between complexity and entropy. The point of the comic is that the passphrase lowers the complexity, while offering higher entropy. Complexity affects humans, not computers - while entropy is what prevents the bruteforce.
    – AviD
    Aug 11, 2011 at 8:10
  • 7
    You have a choice between 96^NumOfChars or of 7776^NumOfWords. (7776 is Diceware's dictionary size.) 96^11 == good but hard to remember. 7776^6 == better and easier to remember.
    – DanBeale
    Aug 11, 2011 at 20:05
22

Reading the comment, I have a few thoughts.

  1. The entropy count on the password is rated quite low. At the very least, you should add in another 1-3 bits for character substitutions. In this example, it seems like the exact formula is known, which seems a bit unlikely.
  2. The entropy count of the longer password seems correct to me.
  3. The base word seems to be "Troubador", if I'm deciphering the common substitutions correctly. I don't think that's a common word, so limiting the entropy of a dictionary based word to only 11 bits of entropy is a bit low. I'm guessing that it would still be in a dictionary, but should be expanded to at least a 15 bit entropy, or a selection of 32K words. That seems to be about the level it would be at using a dictionary based attack.

It is true that in principal, a long password composed of random words is at least as good of a password as a short password with more characters, but the words must be random. If you start quoting a well known phrase, or even anything that could be a sentence or part of one, it severely limits the entropy.

4
  • 10
    The xkcd comic assumes there are about 8 commonly used substitutions that an attacker would need to try (3 bits of entropy). You seem to be arguing that there are about 128-256 commonly used substitutions that an attacker would likely need to try (7-8 bits of entropy). Where's your justification for that? Personally, I think xkcd's estimate is better than yours.
    – D.W.
    Aug 11, 2011 at 2:52
  • The justification is you can either use them or not. If you substitute 0 for o sometimes, that's 1 bit of substitution. If you might use * and -, for instance, that's 2 bits of substitution for each time you find such a character, as there's four combinations. I think 1-2 upon reflection is more accurate, giving it 4-5 bits instead of 3. Oct 16, 2014 at 22:11
  • 2
    You are assuming that every password has 8 different letters that each provide an independent opportunity for substitutions. For most passwords, I anticipate that won't be the case.
    – D.W.
    Oct 16, 2014 at 22:50
  • 1
    On point 1: If you assume that an attacker won't be able to guess your password scheme, then you can indeed strengthen your assumed password strength. However, a) attackers are better at guessing schemes than you are at inventing them; b) mandatory password policies make it easier to guess schemes; c) you would also have to question whether an attacker knows the exact length and dictionary of the passphrase, so that gets stronger too. On point 3: Randall actually granted 'Troubadour' 16 bits of entropy for being an uncommon word, compared to just 11 bits for his 'common words'.
    – ThrawnCA
    May 30, 2017 at 4:12
22

In an empirical test, passphrases don't seem to help as much as XKCD would have you believe: dl.acm.org/citation.cfm?id=2335356.2335366

Users tend to create passwords that are easy to guess, while system-assigned passwords tend to be hard to remember. Passphrases, space-delimited sets of natural language words, have been suggested as both secure and usable for decades. In a 1,476-participant online study, we explored the usability of 3- and 4-word system-assigned passphrases in comparison to system-assigned passwords composed of 5 to 6 random characters, and 8-character system-assigned pronounceable passwords. Contrary to expectations, system-assigned passphrases performed similarly to system-assigned passwords of similar entropy across the usability metrics we examined. Passphrases and passwords were forgotten at similar rates, led to similar levels of user difficulty and annoyance, and were both written down by a majority of participants. However, passphrases took significantly longer for participants to enter, and appear to require error-correction to counteract entry mistakes. Passphrase usability did not seem to increase when we shrunk the dictionary from which words were chosen, reduced the number of words in a passphrase, or allowed users to change the order of words.

1
20

A lot of the responses to this question raise the obvious point that even if you ask users to use several words separated by spaces for readabilty, too many users will choose words in "banal" phrases, like "i love my mom", which, if crackers were cognizant that such simple phrases were in common use, would be quickly cracked. I assume that some crackers may already be doing this -- they're not stupid after all! But all is not lost.

Too many websites that I have login relationships with require me to make my password more complex (using leetspeakish and other combination requirements for upper/lowercase, numerics and symbols). They enforce making my passwords hard to remember.

What if instead of requiring complexity, a password validattion check was performed that first checked a recognized password dictionary, and once a dictionary attack was eliminated as a problem, it would calculate the strength against a bruteforce attack, and require only that a password be able to hold off bruteforce attack for a trillion years? In that instance, Tr0ub4dor&3 would not pass -- Steve Gibson's search space calculator at https://www.grc.com/haystack.htm says it could be brute-forced in only 1.83 billion centuries, but "hold wine fine cold" could withstand it for 1.43 billion trillion centuries.

What I am trying to say here is to stop forcing users to come up with bizarre character combinations, and actually vet their passwords against dictionary and brute force attacks. I think security could only improve as a result.

7
  • Or just force people to use tools like Keepass -- does the job excellently. Aug 11, 2011 at 22:30
  • 5
    Welcome to securitySE! I'm tempted to -1 for mention of GRC. But you have a good point.
    – DanBeale
    Aug 12, 2011 at 5:22
  • 1
    Heh. And what's wrong with GRC, exactly? :-) Aug 12, 2011 at 15:56
  • 3
    @Cyberherbalist, welcome to Information Security! Sadly Steve Gibson is recognized as clueless and a charlatan, at least according to attrition.org...
    – AviD
    Aug 13, 2011 at 21:29
  • 1
    @Cyberherbalist It's not about having haters, it's about being a better marketer than anything else, even if he doesn't understand the words he is repeating out of context, or making up altogether. But here is really not the place for a discussion on his expertise...
    – AviD
    Aug 16, 2015 at 7:05
17

Bruce Scheiner loves long passphrases but he also has been pointing out the practical difficulties of a long passphrase for many years. Passwords are not echoed on the screen when you type them. You see an asterisk or a big fat black dot on the screen per letter. Even when typing out 7-8 character passwords you occasionally wonder in the middle if you have typed it right. So you backspace everything and start again. Occasionally we forget where we are in the middle of the password & count number of characters already typed and comparing it mentally with the password to figure out where we are. It would be even more difficult to do this with a long passphrase if it's not being echoed. I think long passphrases will happen only after this problem has been effectively solved.

3
  • 6
    I've been using "simple" passpharses (as in, just lower case letters, actual words) exclusively for the past few years. While I enter different ones at least 6 times a day, I don't have to backspace the whole passphrase because of a typo more than once a week. I am reasonably sure that this is the case for anyone that regularly writes using keyboard... Jun 29, 2013 at 10:02
  • 1
    I had to change our WiFi password, as it was too complex to type into a iPhone! Feb 4, 2014 at 12:43
  • 1
    I wonder what the security implications would be of having the password-entry logic look to see if any word is duplicated and, if a password doesn't work, trying the password that would result from striking out any duplicated word and anything between the duplicates? So `correct horse batteru horse battery staple" would be turned into "correct horse battery staple"?
    – supercat
    Jun 10, 2014 at 16:03
15

I agree with Jeff Atwood. Also, I have taken a (not the) English dictionary I have here in MSSQL with 266,166 words in it (and also 160,086 German and 138,946 Dutch words) and taken a random selection of 10 words for each language.

These are the results for English:

  1. clever-handed
  2. wolframinium
  3. muth
  4. unvolcanic
  5. contradictorily
  6. desperadoism
  7. unpreternatural
  8. placability
  9. recondensation
  10. Remi

Now take any combination of any words that will give you enough entropy and you're good to go. But as you might see from this example it's not very easy to make something easy to remember out of this wordjumbo. So entropy goes down a lot when you're trying to create "understandable (not correct or logical) sentences".

For completeness' sake (random) results for German and Dutch:

German:

  1. torlos
  2. Realisierung
  3. hinterhaeltigsten
  4. anbruellend
  5. Orthograpie
  6. vielsilbigen
  7. lebensfaehig
  8. drang
  9. festgeklebtes
  10. Bauernfuehrer

Dutch:

  1. spats
  2. bijstander
  3. Abcoude
  4. vergunningsaanvraag
  5. schade-eis
  6. ammoniakuitstoot
  7. onsentimenteel
  8. ebstand
  9. radiaalband
  10. profielschets
12
  • 25
    This has no technical argument, and it misunderstands the xkcd proposal. The xkcd proposal is not to select 4 words at random from a 200,000-word dictionary. Rather, it is to select 4 words at random from a smaller dictionary of the 2000 most common words. If you follow what xkcd actually recommended, you'll find that the resulting passphrases are easier to memorize.
    – D.W.
    Aug 11, 2011 at 2:50
  • 4
    Most of the words suggested for German are not part of a real dictionary anyway. With "real" I mean the kind of dictionary ordinary people think of, not the one used by software for spell checking and password cracking. Aug 11, 2011 at 8:32
  • 3
    @TRiG: That's the combination I have on my luggage! Aug 11, 2011 at 14:35
  • 5
    So we're agreed: Germans need two words, the rest of us need four words? :)
    – sarnold
    Aug 12, 2011 at 7:34
  • 10
    @user3992, it is a bit subtle. You have to read the xkcd comic closely and be familiar with the security literature and past work in this area (e.g., Diceware). Tips for groking the xkcd comic: 1. One panel says "four random common words". 2. The next panel says "44 bits of entropy", which implies 11 bits of entropy per word -- which in turn suggests that it is proposing you should pick each word randomly from a dictionary of about 2000 common words. (Not a dictionary of 266,000 words; that'd be 72 bits of entropy, rather than 44 as quoted in the comic.)
    – D.W.
    Sep 7, 2011 at 17:54
9

The XKCD comic does not explicitly depict that passphrases may contain separator symbols between the words. A natural choice is to add the same symbol between all words. If the app has a show password option, the phrase can be red easily. In theory that adds 5 bits of strength, downgraded to 4 bits, see The "troubador" method of explanation of the mathematics in this comic

The exact downgrading also depends on how easy it is for an attacker to guess the symbol, or first try specific separator symbols. That's why I use 3 distinct sets of symbols to calculate this type of strengthening. Set1: 13 symbols from the iPhone number-symbols, 31 symbols for all of them, and a special set of 3, for the often used separator symbols: space - _

I use the following for the calculation (Excel notation, only if a separator symbol is being used):

strength = >> see below for a simplification =log( NumWordsInCurrentDict*((sepaClassSize^(SepratorLen)+1)*(NumWordsInCurrentDict)^(nWordInPhrase-1)) , 2)

4 Diceware words give the following strengths: No separator: 51.7 bits; A space separator: 53.3 bits; and a separator from all 31 symbols like ^ : 56.7 bits

============= edit en edit2: forgot the log 2, fixed

The simplified formula for the above one is: log( ((sepaClassSize+1)^SepratorLen)*(NumWordsInCurrentDict^numWordsInPhrase) , 2 )

The XKCD comic depicts extensive modification/substitution options for passwords. The Diceware Passphrase Home Page mentions a special modification that is not in the comic pass phrase part: insert just 1 random letter in just 1 of the words of the phrase chosen. That would add another 10 bits of entropy.(see the section "Optional stuff you don't really need to know")

9

I've wondered about this one as well, and I would like to analyze it not from a philosophical point (if users write down their passwords, it becomes something you have instead of something you know... 2-factor becomes 1-factor), but a mathematical and scientific standpoint.

I recently downloaded a GPU password cracking software to play around with. I'd like to crack both of these passwords using that (since it's my new toy) and determine which is better.

For a hypothesis, I would like to also throw out a possible variation--the attacker may know you only use dictionary words and don't enforce symbols and numbers (decreasing the key space).

Scenario 1

- Attacker knows you only used dictionary words. (Keyspace = 26 letters + 26 capitals + 1 space = 53).
- Password requirement is must have 4 dictionary words with a minimum total characters of 20.  

Scenario 2

- Same as Scenario 1, except Attacker doesn't know only dictionary words are used (keyspace increases).

Against 2 control groups where the random passwords contain a 2 numbers, a 2 special characters and is 16 characters long.

Would this be an appropriate test? If not, let me know, and I'll edit the parameters.

3
  • Not really an appropriate test; because the first random password the GPU picks may very well be the password. There's a probabilistic nature here that would have to be considered for this to work. Jan 12, 2012 at 15:07
  • I guess a more appropriate "test" would just be to show which is longer via math?
    – Jeff
    Jan 12, 2012 at 15:13
  • I don't understand where you got those length requirements from. They don't look reasonable to me. (The randomness effect can be easily controlled for by repeating the test a few times.)
    – D.W.
    Dec 19, 2012 at 20:52
7

Seems that most agree that regarding maths, Horse method is superior--to what extent seems to be mostly about limitations like how uniform the choices are, or what are these "easy to remember" or "easy to type" phrases.

Fair enough, but I'll teach you a magic trick on how to make these limitations a "bit" less relevant:

  1. Use Horse method as platform for building new phrases. Use properly random method to choose the words. This may get you some hard words that you never heard and may find hard to remember, but...

That's for following the Horse method blindly. The magic trick is that you don't stop here. Unless you are a desperately boring and un-creative person, you can get a great advantage from the next steps.

  1. Make use of your brain.

    I mean, not just think, have your brain fart out completely new words for you, or completely new methods to distort the existing ones.

    You are allowed (or even encouraged) to replace some words in the phrase with these.

    Also, this rule also applies to everything I write from now on: just go ahead and change the methods arbitrarily ;)

  2. Make use of your other languages.

    Most of us know more than one language. Mix them as you see fit.

    (Special case of this can be making use of different keyboard layout used in your country. For example, in Czech layout, letters with diacritics share keys with numbers---the row above the alphabetic part. This, in fact, creates a mapping of letters and numbers that can supplement or replace the "traditional" L33T. Think about how you can benefit from it.

  3. Invent your own methods.

    ...how to further distort the phrase. You can re-use the method for new passwords, it all depends on how complex method you will create---more complex, more re-usable but don't overdo it :)

  4. Make the process fun!

    Generating a password does not have to be boring. In fact, funnier you make it, the more likely you are to actually remember the password.

    But don't get me wrong: don't make it funny at the cost of uniqueness. Try to use that kind of funny which is funny only to you (ask your brain).

    (Oh and don't make it too funny--you don't want to giggle and blush every time you type your passphrase ;))

If done right, every bit of the above will give the Horse method a great advantage.

1
  • 7
    Human brains are heavily biased against randomness and toward patterns, and we just are dreadful at generating or verifying randomness. So no, getting the human to choose their own arbitrary words will not improve a truly-random passphrase's entropy.
    – bignose
    Dec 28, 2015 at 6:08
1

My simples users point of view

In complement to all previous answer I will just add some reflexions and return from my usage and some users.

My usage

I've read this strip more than ten years ago today. I wrote a Perl script: passphrase.pl which was already discussed here, on April 2013.

Some reflexions

  1. before considering Acoustic Keyboard Eavesdropping or worst: A Practical Deep Learning-Based Acoustic Side Channel Attack on Keyboards, Usually space have significantly different sonority than the rest of keyboard. For this, I will all space between words. So my phrase become:

    correcthorsebatterystaple
    
  2. In order to avoid keyboard or system compatibility problems, I avoid UTF-8 and any accented characters. This will drop down dictionary size, but I could agree with anything human user will accept (and memorize), like flatten (replace accented character by non-accented one), etc.

  3. In short:

    • A password width 14 random character chosen from a bunch of 73 characters:

      log(73^14)/log(2) = 86.657
      
    • A passphrase of 25 characters from 26 alphabeticals:

      log(26^25)/log(2) = 117.51
      

    In brute force, by characters, this is a lot more hard, having 25 limited characters than having 14 characters from a large bunch.

    But if my dictionary is known and limited to 73'181 words, the calculation becomes:

    grep '^[[:alpha:]]\{4,99\}$'  /usr/share/dict/american-english | wc -l
    73181
    bc -l <<<'l(73181^4)/l(2)'
    64.63672603770731827118
    bc -l <<<'l(73181^5)/l(2)'
    80.79590754713414783898
    

    I will need 5 words to obtain ~80 bits of entropy.

    But again any out of directory words is welcome, as long the user could ensure they won't forget them (some kind of salt).

  4. But there is still a lot of interface who refuse a password without special characters, numbers, and capitalized... For this I have no real answer: Each user had to choose a way (regular or personal) to satisfy this requirement.

    A good and simple workaround is to use a password vault to store all this kind of passwords separately.

Return from some users

Mostly this new method is welcome. User could memorize a lot better! The bad is the time to log in, mostly for user who don't like to hit on keyboard...

But from some years now, I have to say: Yes!! It's a lot more user friendly and still very efficient!

1
  • 1
    in my view, this scheme is mainly a good fit for a mnemonic you actually need and want to have secure. such as the one you use for your password vault. the others can just be managed by the Password vault and have true pseudorandom characters from the space it operates in. (so add back in those accents, yeah to more character space). and of course a offline, distributed password vault with multifactor is best... but a single password vault already enhances security be so much that I would still recommend to begin with that.
    – LvB
    Sep 7, 2023 at 11:44
-5

Totally wrong. There's more than math at work here. Human beings creating passwords out of human language != bots creating randomized strings out of buckets of char. If you start with that assumption, entropy is radically reduced as a factor in the time necessary to crack the password. As Don Corleone, the great philosopher, said: Think like the people who are around you.

2
  • 12
    If you read the XKCD comic, you'll notice that it's suggesting you select common dictionary words at random (i.e., from a bot). The entropy is still there, since they're chosen at random from a set of thousands of possibilities. They just happen to be possibilities that humans are good at recognizing.
    – Zach
    Aug 11, 2011 at 5:20
  • 7
    Yes, the XKCD system will be just as weak as other approaches, if you let users pick the password. If you generate the password for users (corporate IT does, sometimes), the XKCD approach is great, as the user will be more likely to remember it.
    – wisty
    Aug 11, 2011 at 14:55
-8

As some people already stated (so I'm not going to repeat that), it depends on the mechanism of brute-force attacks and dictionary attacks being used.

First of all, the best way to keep an attacker from attacking is taking away the target in the first place. None of my servers have SSH running on port 22 and root login is most always deactivated in sshd configuration. But that's just an example. Don't give away the user name and you can save yourself a lot of trouble.

That's the simplest of math: Avoid attacks by others by hiding :)

So, for the rest: Those who actually guess the username right and find your service, will try very common brute-force attacks. Short passwords are always a bad idea, because there's no dictionary needed. Cycling through all the alphanumberic combinations in both lower and uppercase and common 'salt' like commas, semicolons and so on would take a few days to crack. Based on my own experience (had an old OpenBSD routing machine setup, but the internet provider password changed and I didn't have physical access to the machine). The password turned out to be [Firstname][Lastname][Number] of some celebrity.

I was curious, so I tried different cracking tools. A name-based one took only six hours to crack the same password. Guess it was cycling through common name/number combinations.

The trick with those brute-force attacks is to know what you're dealing with. A password that is based on something personal, that is encrypted with your own method is still safe from most dictionary attacks and can only be guessed by a simple brute-force attack, which would take years to cycle through all the possibilities.

Give you an example: My name is Andreas, so my password is kinda safe.

MyN4me,A->PwKndSf

According to rumkin, this is kinda safe :) 87.1 bits entropy. Wow. Not bad for a first try. I can actually remember that and most mechanisms will not attempt to 'guess' that kind of a password, because it doesn't make any sense to any of the systems.

Either it's short and complex, like L5q3CR,-F - which is kind of hard to remember but easy to guess, or it consists of variations of actually existing words. It's a human weakness, to help yourself remember things or go for something really simple, or common.

I know, this is a little bit off-topic, but: if you don't want to become a victim of a brute-force attack, lock most of the doors first, or even better: remove/hide the doors :)

  • don't offer the login mechanisms that crackers expect, if you can.
  • protect web-services with client authentication
  • if you're totally paranoid, filter access to your service by IP-address, too
  • secure and totally paranoid setup: (this is unfair to crackers :)) ) after a failed password attempt, for the following 5 seconds, every following attempt for the same user (even a correct one) will fail, too.

If somebody manages to get around all that, you're dealing with pros anyways :) but keep your password secure by doing something human, that nobody expects and no computer can guess or predict: do your own thing, just remember that your own thing has to be long enough to avoid the simple attacks and stay out of the dictionary for the most part. Use something, that only makes sense in YOUR brain and scatter in a few special characters.

For a cracker, a fast way to guess a password is only offered when you do something predictable, like use something short, that's easy to memorize or something that consists of common words, or combinations of letters that you find in dictionaries.

Stay away from those, and you can even stick with rumkins calculations.

7
  • 9
    Unfortunately, rumkin is not a reliable judge of password strength.
    – D.W.
    Aug 12, 2011 at 5:35
  • 7
    I don't hide. My ssh ports are on 22. If anyone fails to login to any account 10 times within 5 minutes, then their ip address is firewalled off with iptables and a message is sent to their ISP warning them of a compromised machine on their network. Aug 12, 2011 at 8:39
  • 13
    Correction: the worst way to keep an attacker from attacking is taking away the target in the first place. Moving your server to a different port will only clean up your logs a little, it only saves you from attackers who are after the lowest-hanging fruits and wouldn't get into a reasonably secure (all security patches applied, no egregiously stupid passwords) system anyway. Aug 12, 2011 at 8:47
  • 12
    Congratulations, you've just invented Security by Obscurity :). And relegated basic safeguards (timed lockouts) to the realm of totally paranoid...
    – AviD
    Aug 14, 2011 at 7:09
  • 10
    Someone should write a tool that can discover which port you are running ssh on! ;) Apologies for the snark. Sep 28, 2011 at 21:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .