Bitcoin Forum

Other => Off-topic => Topic started by: blub on October 29, 2013, 09:17:23 PM



Title: Mixing multiple randomness sources
Post by: blub on October 29, 2013, 09:17:23 PM
If I have multiple sources of randomness, is there a way combining them with the result beeing no weaker than the best initial randomness source?

Naively I would say Xor all of them would quite do the trick, but I am no expert in cryptography and might miss something important


Title: Re: Mixing multiple randomness sources
Post by: BurtW on October 30, 2013, 12:08:53 AM
This was covered in a thead a while back.  I will try to find the thread to be sure but from personal knowlege and from my memory of the thread the best way was:

1) Concatenate all of the sources of entropy into one big string.  In other words just go get all of the entropy you can find and put it in one long array/file.

2) Calculate the secure hash of the entire file/array, for example SHA256 if you need a 256 bit random number/seed/nonce.