I would like to generate unique 64-bit keys (pseudo)-randomly to identify objects in our model. I need the keys to be as unique as possible (minimize the probability of collisions when any N keys are used together) across all users of the system.
Usual GUIDs are out of the question for now because we're data cheap :). Because I don't foresee needing more than 1 million keys used in the same context, I would think 64-bit is enough (probability of collision would be about ~10e-7).
As a side-note, I will also need a scheme to fold/hash tuples of those keys into a single 64-bit key that also needs to be well distributed/unique.
Since I need a good (well distributed) hashing function anyway, would it be ok to fold a GUID in half (maybe accounting for the fixed bits in a GUID in some way)? Or is it better to use a local RNG? How would I seed the RNG to maximize uniqueness across space/time of generation? How strong a RNG would I need?
I'm not particularly looking for efficiency (up to a point) but I'd really like to ensure that the probabilities hold up their promise!