Bitcoin Forum

Bitcoin => Project Development => Topic started by: birkomester on November 06, 2013, 02:35:30 PM



Title: How to generate provably fair random number?
Post by: birkomester on November 06, 2013, 02:35:30 PM
I am making a bitcoin gamble site, but i dont know how to generate provably fair number.


Title: Re: How to generate provably fair random number?
Post by: charleshoskinson on November 06, 2013, 03:09:20 PM
If you're doing it in js, then lift gibson's code here https://www.grc.com/r&d/js.htm or use the stanford js library built by Dan Boneh et all http://bitwiseshiftleft.github.io/sjcl/doc/symbols/sjcl.random.html.

Make sure you send the js over an ssl connect to avoid a MITM code substitution. You can also sign the code with the websites cert. JS crypto is hard.


Title: Re: How to generate provably fair random number?
Post by: Buratino on November 07, 2013, 10:36:49 AM
RdRand (also RDRAND) is an instruction for returning random numbers from an on-chip random number generator.RdRand is available in Ivy Bridge processors and is part of the Intel 64 and IA-32 instruction set architectures. The random number generator is compliant with security and cryptographic standards such as NIST SP800-90, FIPS 140-2, and ANSI X9.82.