in reply to Is this use of crypt() appropriate?
You could mitigate this risk significantly by using a random salt instead of the constant "01".
Basically, if anyone finds out that the salt is "01", they only have to make one pass to encrypt every word in a dictionary and guess passwords. Randomize the salt, and they have to make a lot more passes.
One way to do that:
Update: Another option would be to use Crypt::PasswdMD5, which has the same basic interface as good old crypt, but it supposed to be more resistant to dictionary attacks. (YMMV, I'm not a cryptographer)my @chars=(a..z,A..Z,0..9,'.','/'); my $salt= $chars[rand(@chars)] . $chars[rand(@chars)];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ichimunki) Re x 2: crypt
by ichimunki (Priest) on Nov 08, 2001 at 03:44 UTC | |
by Aristotle (Chancellor) on Nov 08, 2001 at 14:14 UTC | |
|
Re: Re: crypt
by Aighearach (Initiate) on Nov 08, 2001 at 05:59 UTC | |
|
Re: Re: crypt
by Anonymous Monk on Nov 08, 2001 at 02:25 UTC | |
by kschwab (Vicar) on Nov 08, 2001 at 02:33 UTC |