markjugg has asked for the wisdom of the Perl Monks concerning the following question:
MD5 hash: I believe these are guaranteed to be unique if they are based on a unique sequence. However, since they depend on a 'secret phrase' for security, if the secret phrase was discovered, then all the sessions might be able to be comprimised, right?
random strings: Since these are random, it seems like eventually the same string could be generated twice, but with large strings and lots of characters, this should be very, very rare. However, since there is no "secret" behind them, they should otherwise be harder to comprimise.
In either case, it makes sense to also include the IP address of the user as part of the security check, adding security to either system.
I assume that MD5 is "better" for some reason since that is what's in the widely-used Apache::Session module. Is so, what specific advantages does it have over the random string method, and what trade-offs are there, if any? Thanks,
-mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: sessions: MD5 versus random strings
by Ovid (Cardinal) on Oct 16, 2000 at 23:03 UTC | |
|
(tye)Re: sessions: MD5 versus random strings
by tye (Sage) on Oct 16, 2000 at 22:15 UTC | |
|
Re: sessions: MD5 versus random strings
by cianoz (Friar) on Oct 17, 2000 at 15:26 UTC |