3
$\begingroup$

In my home, I have a coin. I can use that coin to generate random bits. These bits are mostly secure unless someone is watching me flip it. They're also only random-ish... maybe I'm a "bad flipper"?

I also have a computer. I can use it to generate bits that are sort of random, but not really. These are secure if you trust the algorithm and the machine. /shrug

I'd like to generate random numbers with the materials I have at hand, and for them to be secure. Can I do better than a coin flip in terms of security or randomness?

$\endgroup$
1

2 Answers 2

3
$\begingroup$
$\endgroup$
1
$\begingroup$

I recommend that unless you're especially paranoid and don't trust modern cryptographic algorithms like block and stream ciphers or hashes, you should use your PC. It's the easiest approach by far.

It either has \dev\urandom for *nix machines, or the random number generator from the new Windows' (Windows Server 2008 and Windows Vista and later) Cryptography API: Next Generation (CNG). A lot of programming languages wrap these two sources up into easier to use functions/libraries.

Both are pseudo random number generators providing a perfectly acceptable security level. And they are pretty much endless in output so should suffice for all non one time pad applications. Computational indistinguishability means that it is infeasible to distinguish their outputs from a truly random distribution.

If you are a tin foil hat type (I am), I suggest that you review the random number generator, randomness and one time pad tags. That use case is too involved to post as a single general answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.