News for hackers. Stuff that matters.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by ars on Thursday August 15, 2013 @06:40AM (#6217043)
> they can reduce your security to the weakest generators you're using.

> and can introduce potential weaknesses.

This isn't true. XORing numbers can never decrease entropy. It can only increase it. So your security would stay at the strongest generator, plus some extra entropy from the weaker ones.

Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by patio11 on Thursday August 15, 2013 @07:20AM (#6217129)
XORing numbers can never decrease entropy. It can only increase it.

Let Generator A(x) equal "For any x, a perfect random number picked by the hand of God Almighty." Let Generator B equal "For any x, A(x+1) unless 'ars is asking in which case A(x)".

If ars chooses Generator A, ars is fine.

If ars chooses Generator B, ars is fine.

If ars chooses Generator C = A(x) ^ B(x), ars will very quickly see that ars' intuitions about math are in some circumstances incorrect. Ars might then think "Phew, good thing they weren't subtly correlated, or it would have looked great right until it didn't."

Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by ars on Thursday August 15, 2013 @08:21AM (#6217332)
If your second generator has an output that is a function of the first then it's not a cryptographic RNG in the first place and then Generator B is NOT fine.

(Alternatively it could mean that you can only generator a single cryptographic random number, since all the rest are just functions of the previous one, and then again you are not fine. Either way Generator B is not fine.)

And in any case neither A nor B is a generator - only x is. Neither A nor B are adding any entropy whatsoever.

Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by nitrogen on Friday August 16, 2013 @01:47AM (#6222375)
If your second generator has an output that is a function of the first then it's not a cryptographic RNG in the first place and then Generator B is NOT fine.

A CSPRNG is a function that takes as input a small set of random bits and generates as output a large set of unpredictable bits. So "Generator B" can be a "cryptographic RNG" and be a function of, or at least correlated with, "Generator A".

Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by marshray on Thursday August 15, 2013 @08:12AM (#6217301)
Reading from /dev/urandom twice does not yield the same result, or even results subtly correlated under XOR.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by marshray on Thursday August 15, 2013 @06:02PM (#6220887)
XORing numbers does decrease entropy to the extent that there is correlation between the numbers. But you're correct that you can accumulate entropy by taking poorly-random streams and XORing them, as long as they are independently poorly-random.

In cases where they might be non-independent, a simple hash function like even the otherwise broken MD5 would be better at combining them than XOR. But of course, we're now three steps down the path of constructing our own replacement for what the kernel and/or OpenSSL should be doing for us already.