How are the patches working around the problem?
Are they using a different source of entropy, or are they checking that the two R-values don't collide?
In my mind, best practice would be to do both.
I see a lot of cases in code where people need multiple random and unique values, (e.g. UUIDs)... where the only two requirements are that they are indeterminate and unique... but because the domain of random outcomes is so huge they rely on the vanishingly small probability of collision, and don't bother to check uniqueness.
But as we have found, that "vanishingly small probability" isn't so small if the PRNG is broken. A simple collision check isn't a waste of CPU cycles -- it guards against this kind of system problem.
As such, can all Bitcoin clients, Android or otherwise, be updated to check that the two R-values are unique?
On a different note, I don't see much discussion about the broken Android PRNG, does anyone have a link to the bug reports? This must have some pretty far-reaching consequences outside Bitcoinland too...?
Any comments from the developers here? Checking the uniqueness would require storing past r values along with the private key. Any problematic consequences of this?
And yes, I am surprised that there is not much buzz about the broken android PRNG in general, unrelated to Bitcoin. Does
all crypto on Android rely on this broken PRNG? Who wrote this particular implementation, who let it slip by? What else has slipped by?
AFAIK, the patches are using /dev/random as the source of random data. This one has not been screwed up by Google and it seems to be reliable.
No need to keep track of all previews R values, since a chance of picking up the same 256 bit
random number again is likely lower than a chance of the h/w failing in a away that it would broadcast such a stored R values from your history buffer.
And yes - all the other Android apps that rely on SecureRandom class are at risk.
I'm also surprised that Google does not give a shit, since it seems that they have known about this specific issue for months.
Maybe someone should sue them, to teach them a lesson.
I bet that there are plenty of (e.g. online banking) apps that are also affected.