Assuming a language-agnostic setup in which the rand()
function has a flawless implementation and returns a very large (let's say 128 bits), strong random unsigned integer, I should have fairly low chances of getting the same number twice considering the period of the RNG would be astronomically huge.
a = rand(); // very very low chances of getting twice the same number
However, if I XOR two such random integers, how significantly is the entropy of the oputput decreased? In other words, how worse are the chances that such a function:
def xorRand(): return rand() ^ rand();
returns twice the same number, compared to my hypothetical rand()
alone?