News for hackers. Stuff that matters.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by StavrosK on Thursday August 15, 2013 @07:16AM (#6217117)
A XOR A = 0
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by marshray on Thursday August 15, 2013 @08:09AM (#6217291)
If your /dev/urandom returns the same sequence of 32 bytes twice in a row, you have something truly pathological going on.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by StavrosK on Thursday August 15, 2013 @08:13AM (#6217304)
In the above example, you're XORing urandom with itself.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by marshray on Thursday August 15, 2013 @08:37AM (#6217386)
Run this a bunch of times:

     dd if=/dev/urandom bs=32 count=1 | xxd
Substitute 'base64' if you don't have 'xxd'.

If you get the same output twice, see a doctor.

Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by DanBC on Thursday August 15, 2013 @08:46AM (#6217414)
Why XOR urandom with itself?

You don't gain anything, and if your random numbers are correlated with something you're making it worse.

I guess it makes testing easier. Correlations will be easier to see.

Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by marshray on Thursday August 15, 2013 @04:23PM (#6220329)
People were saying 'urandom XOR urandom' was a pathological failure mode. My point is that it's not going to return the same results twice.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by DanBC on Thursday August 15, 2013 @04:54PM (#6220536)
...but you understand that it doesn't matter that it's not returning the same results twice, and that it's still a fail, right?
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by tptacek on Thursday August 15, 2013 @07:43PM (#6221322)
Marsh probably does understand the implications here. What kind of "fail" were you thinking of? That it was pointless? I agree. That it's going to blow up? I less agree.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by marshray on Thursday August 15, 2013 @08:32PM (#6221499)
Thanks 'tptacek.

The point is

     `dd if=/dev/urandom bs=32 count=1` XOR `dd if=/dev/urandom bs=32 count=1`
is not going to cancel out to be zero as some here are implying. No one is claiming that it's a net gain either though.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by DanBC on Thursday August 15, 2013 @08:42PM (#6221531)
As I understand it: You're taking a non-blocking source of randomness, and depleting its entropy pool quicker, which forces it to drop back into 'not very good random mode' quicker.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by tptacek on Thursday August 15, 2013 @08:43PM (#6221532)
Argh. No, that's not what happens. Think about this for a second. It's not like the "entropic" bytes have a color, and the pool gets low on the bytes with that color.
Re:Google confirms Java and OpenSSL crypto PRNG on Android a... by marshray on Friday August 16, 2013 @02:00AM (#6222417)
It would be like that if you were looking at it decades ago when key sizes were small and cryptographers didn't have much faith in the one-way-ness of hash functions, or from the perspective of that branch of information theory which seems to permit the existence of arbitrarily powerful computers. A lot of guidance coughman pagescough is still written that way.

In the real world, our computers are limited by physics. It seems that in crypto, the least controversial assumption we can make is that given enough secret bits (i.e., entropy) we can be safe from brute force attacks.