From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-07-03 17:37:44
Sean Parent wrote:
> If you know of a good library for cryptographic quality random
> numbers I'm interested - that's the core issue right now for the ZUID
> library is ensuring enough entropy for the node ID.
I don't know of a portable library for obtaining entropy; I'd expect
/dev/urandom to be one on POSIX OSes but its quality would probably vary.
For Windows XP, there is RtlGenRandom:
and the algorithm behind it is explained in:
For GUIDs, one would typically obtain "a sufficient amount" of entropy only
once at startup and use it as a seed for a high quality PRNG, so speed
shouldn't be an issue. I haven't needed a portable PRNG implementation so
far (usually I also need other crypto facilities and use whatever the crypto
library provides) so I'm not sure whether a de-facto standard has emerged as
is the case with encryption (AES) and hash functions (SHA2).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk