On 5/4/2014 3:47 AM, Joseph Rushton Wakeling via Digitalmars-d wrote:

About a more general "isRNG" template: can you be more precise about
what you are interested in achieving with this?  Generally speaking I
would find it rather dangerous to go passing around sources of
randomness without having some understanding of their properties :-)


Fair enough point, I'll explain my situation:

On a general level, I'm trying to grok the whole intent of isUniformRNG and see whether or not anything else may ever be needed in addition to isUniformRNG. I'm not trying to push an "isRNG", just trying to understand std.random's current intentions and reasoning, so I know how to work with it appropriately.

But more immediately, since Phobos lacks a crypto-secure RNG, I'm implementing NIST's Hash_DRBG (backed by the OS-provided RtlGenRandom/CryptGenRandom and "/dev/random" as entropy sources). Hopefully I can get it into a Phobos-acceptable state.

Now, I can follow the spec for the Hash_DRBG algorithm well enough, but I'm not really solid on random-number theory, so I can't be certain whether or not isUniformRNG is appropriate for this. I would assume "yes", but I don't want to assume. Hence my inquiries.

Reply via email to