The stupid question is the question not asked | |
PerlMonks |
Re: Re: What's the idea of different salts in crypt()?by derby (Abbot) |
on Sep 20, 2001 at 16:59 UTC ( [id://113578]=note: print w/replies, xml ) | Need Help?? |
oneiros,
I agree with you about the need for random salt but not about "knowing it is half the battle." You always know the salt - it's right there out in the semi-open. It's always going to be the first two characters of the stored "hashed" value (I hate to call it an encrypted value because the value is normally the output of a crypto hash algrorithm). Consider the code for checking passwords: The whole purpose of the salt is to slow down an attacker from comparing a list of pre-generated hashes against the target hash. Instead of needing to pre-compute one "hashed" value for each plaintext password, an attacker needs to precompute 16384 "hashed" values for each plaintext password (2^7 * 2^7). That kinda pales today but was pretty big when the crypt function was first developed - the computational power to pre-compute that many passwords times the number of plaintext password you suspect (dictionary) was pretty high. Not so much today which is why we have things like shadow passwords, other core password functions besides crypt and every sysad wanting you to pick a password that would not show up in a dictionary. -derby
In Section
Seekers of Perl Wisdom
|
|