Live data from Hacker News

Xkcd Password Generator

preshing.com

21–30 of 299 posts

Re: Xkcd Password Generator

#21
post #10

Not a good idea, sadly. In fact I'd go so far to say this is a really bad suggestion ; because it gives a false sense of security. There is potentially a lot less entropy in this password than "Tr0ub4d0r&3", assuming the hacker is smart enough to realise he can trivially test combinations of dictionary words in very short amount of time. (EDIT: I'm way out of touch with this; it's not as trivial as perhaps I figured.…

> he can trivially test combinations of dictionary words in very short amount of time. Explain the reasoning behind this, please. Start with: You don't know the dictionary I used, but have to use one that seems 'good enough' (i.e. a superset of mine, if possible). How many words are in there? How many combinations can you create for 'two word phrases'? (You don't know the length of my phrase) How many for three? How…

The XKCD criticism of the 'bad' password has the same problems. How does the hacker know I have this kind of password (starting with a real english word, for example)?

Re: Xkcd Password Generator

#22
post #10

Not a good idea, sadly. In fact I'd go so far to say this is a really bad suggestion ; because it gives a false sense of security. There is potentially a lot less entropy in this password than "Tr0ub4d0r&3", assuming the hacker is smart enough to realise he can trivially test combinations of dictionary words in very short amount of time. (EDIT: I'm way out of touch with this; it's not as trivial as perhaps I figured.…

> he can trivially test combinations of dictionary words in very short amount of time. Explain the reasoning behind this, please. Start with: You don't know the dictionary I used, but have to use one that seems 'good enough' (i.e. a superset of mine, if possible). How many words are in there? How many combinations can you create for 'two word phrases'? (You don't know the length of my phrase) How many for three? How…

In fact, even if the attacker:

1) Knows this scheme was used.

2) Knows the list of words you used.

3) Knows how many words you used.

You will still have that amount of entropy. Diceware entropy values are calculated with all three of these assumptions already made.

Re: Xkcd Password Generator

#23
A lot of comments here seem to be missing the point.

The main point is to use passwords that give you the most "bang for the buck" in the sense of adding the most bits of entropy for the least difficulty of remembering. Adding an extra number, or punctuation, or certain numbers of repetitions generally adds only a little bit of entropy for a significant cost in additional challenge to your memory.

Our minds are well suited to remembering combinations of common words, and by stringing a few such words together, you can generate a larger search space than using a single word with a few substitutions. Even if the attacker knows the scheme you're using, he still must search through the space of combinations of common words, which XKCD is pointing out is quite large.

Re: Xkcd Password Generator

#25
post #10

Not a good idea, sadly. In fact I'd go so far to say this is a really bad suggestion ; because it gives a false sense of security. There is potentially a lot less entropy in this password than "Tr0ub4d0r&3", assuming the hacker is smart enough to realise he can trivially test combinations of dictionary words in very short amount of time. (EDIT: I'm way out of touch with this; it's not as trivial as perhaps I figured.…

> he can trivially test combinations of dictionary words in very short amount of time. Explain the reasoning behind this, please. Start with: You don't know the dictionary I used, but have to use one that seems 'good enough' (i.e. a superset of mine, if possible). How many words are in there? How many combinations can you create for 'two word phrases'? (You don't know the length of my phrase) How many for three? How…

> Start with: You don't know the dictionary I used, but have to use one that seems 'good enough' (i.e. a superset of mine, if possible).

People are likely to use a standard English dictionary. In my experience (which is exactly within this field) people use a fairly tight subset of the English vocabulary.

So I would be quite happy to test for a dictionary of, say, 100,000 words and be hopeful of a good hit rate (note that XKCD says common words, which is easily missed)

Our software has a test (which runs about third in its list of tests) which does dictionary combinations up to three words (two words is quite a commonly used password based on our statistics) with a dictionary size of 175,00017,500. (Edit: sorry, apparently it is an order of magnitude smaller, I checked with one of the engineers :)) This includes English words plus a few commonly used foreign/slang terms. The hit rate on this is fairly high.

(we crack document/windows passwords mainly)

You could of course choose deliberately obscure words to invalidate this - but they aren't so easy to remember (so people will tend not to).

If someone is going out of their way to secure a password, sure, you're going to hit a brick wall. But what every password scheme tends to forget is the "human factor" whereby people not concentrating on being secure will introduce attack vectors.

Re: Xkcd Password Generator

#26
post #11

Assuming that this method for generating passwords gets popular enough, brute force tools will begin to create an optimized attack for these passwords. As there are so little words available, if I were to write a brute-forcing tool, I would try combinations of four words in my wordlist once I failed with my one-word-dictionary attack before I start trying out all characters. But all is not lost: Either use more words…

https://secure.wikimedia.org/wikipedia/en/wiki/Diceware Properly executed, this will protect you against brute force attacks. No need to do nonsense like adding more spaces. Of course XKCD botched it and said an inadequate minimum length... Notable quote from the article: "This level of unpredictability assumes that a potential attacker knows both that Diceware has been used to generate the passphrase, the particular…

Even 4 words is good enough for many use cases.

Re: Xkcd Password Generator

#28

Earlier quoted context omitted.

https://secure.wikimedia.org/wikipedia/en/wiki/Diceware Properly executed, this will protect you against brute force attacks. No need to do nonsense like adding more spaces. Of course XKCD botched it and said an inadequate minimum length... Notable quote from the article: "This level of unpredictability assumes that a potential attacker knows both that Diceware has been used to generate the passphrase, the particular…

Was just about to quote that to you. Don't you think that you should take this quote into account when you say xkcd botched it?

That's not how people in crypto roll :)

He calculated the entropy assuming that knowledge was had, I think he botched it in saying that 44 bits were enough. Of course if he were to recalculate it without those assumptions, but make it clear that he were doing that, then it would be better.

Re: Xkcd Password Generator

#30
How about (NOT SECURE YET, IT NEEDS MORE ENTROPY):

    from nltk.corpus import wordnet as wn
    
    all_animals = set()
    def add_to_set(animal):
        all_animals.add(animal.name.split('.')[0].replace('_',' '))
        for child in animal.hyponyms():
            add_to_set(child)

    add_to_set(wn.synset('animal.n.01'))
    all_animals = list(all_animals)

    actions = ['ate','chased','killed','fought','kissed',
               'talked to','hated','loved','ambushed','fled'] # can add more

    def make_password():
        import random
        random = random.SystemRandom() # is this secure?
        choice = random.choice
        return 'the %s %s the %s'%(choice(all_animals), choice(actions), choice(all_animals))
If you pruned out 90% of the animals (i.e. the obscure, hard to spell, or scientific names), this is still about 20 bits. And the passwords are kind of memorable (I've gotten such gems as "the dodo chased the guppy" or "the tigress killed the king charles spanial").

You could also add a humorous adjective ("rabid", "talking", "magic", "invisible", "evil" ...) or adverb ("roughly", "quickly", "quietly", "secretly" ...).

You could also add a place name.

Post reply on HN