0

Possible Duplicate:
How does password salt help against a rainbow table attack?

Before you mention it, I already read this question. I didn't follow.

Here's my understand of salts/rainbow tables. Please correct me where I'm wrong.

  1. User inputs raw password.

  2. password is concatenated with salt to give passwordsalt or saltpassword.

  3. passwordsalt/saltpassword is hashed to value hash.

  4. Enter hacker.

  5. Hacker employs rainbow tables to reverse hash into passwordsalt/saltpassword.

  6. Hacker has in hands (example) the stringletmein1horse.

Given letmein1horse, doesn't this simply mean that there are two options:

  1. Password is letmein1 and salt is horse.

  2. Password is horse and salt is letmein1.

So you see why I'm confused. My understand is clearly flawed, because if this was how it worked, obviously salts would be useless.

OR: Is my understanding correct, and it's the whole iteration scheme that completely undoes this obvious weakness?

Community
  • 1
  • 1
temporary_user_name
  • 35,956
  • 47
  • 141
  • 220
  • Rainbow tables are huge and very long to compute, if you prefix all your passwords with the same string 16-bytes string, you're almost certain that hackers won't have a rainbow table for it. – zneak Nov 25 '12 at 22:18
  • .....off-topic vote? Weird. – temporary_user_name Nov 25 '12 at 22:20
  • Weird? What's weird is not reading the FAQ and assuming that it is on topic. Just because it interests you as a programmer does not make it on topic. This is clearly a crypto question rather than a programming. – President James K. Polk Nov 25 '12 at 23:10
  • 1
    @GregS, then why do we even have a cryptography tag? And why are all the similar/identical questions on topic? – temporary_user_name Nov 26 '12 at 03:13
  • A rainbow-table is only profitable, if you can crack more than 1 password, otherwise brute-forcing is faster (why not stop if you found a match). If every password has a different salt, you can indeed build rainbow-tables, but every rainbow-table can be used only for one single password (salt). – martinstoeckli Nov 26 '12 at 18:38
  • @Aerovistae: There is a cryptography tag because somebody created one. The existence of a tag doesn't imply that every subject conceivably related to that tag is on topic. stackoverflow is for programming questions. – President James K. Polk Nov 30 '12 at 00:05
  • The column of related questions with thousands of views and hundreds of upvotes (few of which have any code) seem to disagree. And under the FAQ, I would say this easily falls under both "a software algorithm" and "software tools commonly used by programmers," as well as being a "practical, answerable problem that is unique to the programming profession." But enough of this. – temporary_user_name Nov 30 '12 at 00:52

2 Answers2

2

Rainbow tables can help you go from hashes, to short sequences with limited character sets. For example, a rainbow table might support all alphanumeric sequences less than 10 characters long.

A salt is much longer and uses a wider character set. If you use a 128-bit random salt, creating a rainbow table becomes physically intractable.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
0

An attacker would not be able to create a precomputed lookup table (i.e. a rainbow table) of hashed values (password + salt), because it would require a large computation for each salt. A simple dictionary attack is still very possible, although much slower since it cannot be precomputed. source

Dillon Benson
  • 4,280
  • 4
  • 23
  • 25