Re: Confused by salt
- From: clark <clark@xxxxxxxxxxx>
- Date: Mon, 28 May 2007 18:06:27 -0700
On 28 May 2007 15:00:25 -0700, ianpiper@xxxxxxxxx wrote:
Hi all,
I hope someone can help clear my confusion. I wrote a program some
time back that used a hash function to store a password. Someone
advised me that I really ought to use a salt with this in order to add
greater security. Having done some reading I am a bit confused. I
understand the principle of adding a number of random characters to
the string before hashing it in order to increase its security. What
confuses me is how you then store the salt in such a way that you can
use it but the bad guys can't. I read somewhere that you can just
store the salt in plain text along with the hashed salted password,
but then surely that defeats the object - your attacker just needs to
prepend or append any dictionary words with that salt and hash the
result before comparing to your stored password. But if you encrypt
the salt, you need a key to decrypt it.
Any illumination greatly welcomed.
Ian.
Roger Schlafly describes it fairly clearly.
If your password is strong, and hard to guess, and the hash is
cryptograhically strong, then adding a random salt to the password,
hashing that value, and prepending the plain salt to the hash is good.
You can have a million representations of the exact same passphrase
that look different and for all intents and purposes are different.
Storing the salt in plain view gives the attacker nothing extra
special, and makes them do the work without cutting corners.
It thwarts pattern recognition.
Salting is an aspect of simple crypto that works.
.
- References:
- Confused by salt
- From: ianpiper
- Confused by salt
- Prev by Date: Re: making SHA-512 as fast as MD5
- Next by Date: Re: Entropy sources under WinXP
- Previous by thread: Re: Confused by salt
- Next by thread: Re: Confused by salt
- Index(es):
Relevant Pages
|