Re: [PHP4BETA] CVS update: php4/ext/session

From: Date: Mon, 07 Jun 1999 22:06:27 +0000
Subject: Re: [PHP4BETA] CVS update: php4/ext/session
References: 1 2 3  Groups: php.version4 
Request: Send a blank email to php-version4+get-1385@lists.php.net to get a copy of this message
On Jun 07, Sascha Schumann wrote: > Well, a hash algorithm with no collisions does not exist to the > best of my knowledge. Hence, we can only hope that we don't > produce any collisions. > > As Kristian said before, the algorithm must not be > deterministic. Using some kind of randomness to make the ids > unguessable is what I think I'll go for. > > I'll do some work on the user-level hooks as well today. Unless you are drawing your randomness from something like /dev/random, it is deterministic, because all you're doing then is using the "srand($deterministic_seed); rand();" steps as a glorified hash function. The session id should be composed of both deterministic and random components -- the deterministic part makes it so you can guarantee there's no collisions, and the random part to make it harder for people to hijack sessions. Jim

« previous php.version4 (#1385) next »