Earlier quoted context omitted.
That second link doesn't seem to be the current problem. The current problem is that the same random number is being returned more than once.
On the other hand, the author of the Bitcoin Wallet Android app thinks it's a SecureRandom problem: https://code.google.com/p/bitcoin-wallet/source/detail?name=...
Android RNG Weakness Renders Bitcoin Wallets Insecure
71–80 of 105 posts
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#72Iä! Digital Signature Algorithm! The Black Goat of the Woods with a Thousand Crypto Bugs! I don't know the Bitcoin software involved at all, but I can sketch out an attack that might shed some light on it, and, more importantly, instill an appropriate fear of DSA into you: To generate a DSA key, you come up with primes p and q and a generator g, which process is a paralytic non-Euclidian brain injury I will not attem…
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#73Earlier quoted context omitted.
So your position is that Debian didn't go far enough? They should have disabled OpenSSL's CSPRNG entirely and redirected its internal calls to perform IO operations on /dev/[u]random?
Modulo the fact that Debian shouldn't be mucking with the inner workings of packages in the first place, sure; stubbing out OpenSSL's CSPRNG with calls to the OS CSPRNG seems like a reasonable plan. It is, by the way, part of the NaCL design too.
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#74Earlier quoted context omitted.
That second link doesn't seem to be the current problem. The current problem is that the same random number is being returned more than once.
On the other hand, the author of the Bitcoin Wallet Android app thinks it's a SecureRandom problem: https://code.google.com/p/bitcoin-wallet/source/detail?name=...
Simply initialising it is insufficient, because you need to call addProvider() (cf. https://developer.android.com/reference/java/security/Securi... ) to actually have any effect.
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#75Earlier quoted context omitted.
On the other hand, the author of the Bitcoin Wallet Android app thinks it's a SecureRandom problem: https://code.google.com/p/bitcoin-wallet/source/detail?name=...
That commit series doesn't actually appear to use the new class, besides initialising it. Simply initialising it is insufficient, because you need to call addProvider() (cf. https://developer.android.com/reference/java/security/Securi... ) to actually have any effect.
It purports to install LinuxSecureRandom as a new systemwide default (LinuxSecureRandom, lines 56-57).
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#76Earlier quoted context omitted.
you should use your OS's CSPRNG (here, /dev/random) to the exclusion of any other RNG Bad advice. Use your OS's CSPRNG to get a seed, but work with your own PRNG (say, HMAC_DRBG) internally. Going to the OS every time you want a few bits is both very slow and makes it far easier for local attackers to see when you're using entropy.
Strongest possible disagree. For instance, the Debian OpenSSL bug was an entirely unforced error stemming from applications that chose to use Debian OpenSSL's terrible CSPRNG on top of the OS's CSPRNG. The local attacker scenario you're talking about is a theoretical risk when there are attackers running code in the same OS as your CSPRNG; a far more likely concrete flaw is, for instance, a SecureRandom implementatio…
Ok, we disagree. It wouldn't be the first time. ;-)
the Debian OpenSSL bug was an entirely unforced error stemming from applications that chose to use Debian OpenSSL's terrible CSPRNG on top of the OS's CSPRNG
I think the biggest problem was that OpenSSL used OpenSSL's CSPRNG after Debian broke it. Having applications all open+read+close /dev/random is not going to prevent that.
a far more likely concrete flaw is, for instance, a SecureRandom implementation that allows developers to specify insecure seed values.
A SecureRandom implementation should not allow the application to provide seed values except as additional input. It should always seed itself from the operating system entropy source, with no option to disable that.
Aside from the issue of performance (which can be severe) and the timing information leakage to local spies, there's a very practical reason to avoid developers read from /dev/random:
int fd;
fd = open("/dev/random", O_RDONLY);
read(fd, buf, buflen);
close(fd);
I've seen this on a number of occasions, and it works perfectly fine... until your server gets busy, the kernel entropy pool runs down, and /dev/random returns a short read. At that point, all hell breaks loose. To me, this scenario alone is enough to tell developers to use a library's automatically seeded CSPRNG instead of reading from the kernel.Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#77Iä! Digital Signature Algorithm! The Black Goat of the Woods with a Thousand Crypto Bugs! I don't know the Bitcoin software involved at all, but I can sketch out an attack that might shed some light on it, and, more importantly, instill an appropriate fear of DSA into you: To generate a DSA key, you come up with primes p and q and a generator g, which process is a paralytic non-Euclidian brain injury I will not attem…
Most of the time this property is useless, because you want to verify the signature against a known-good key, but it does also mean you're probably not going to want to use DSA to pass signed covert messages.
Schnorr signatures actually have a simpler, and I think more intuitive, construction and don't have this property. They also don't require collision resistant hashes.
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#78Earlier quoted context omitted.
Modulo the fact that Debian shouldn't be mucking with the inner workings of packages in the first place, sure; stubbing out OpenSSL's CSPRNG with calls to the OS CSPRNG seems like a reasonable plan. It is, by the way, part of the NaCL design too.
Last I heard, there were still some "security oriented" OSes using RC4 for their /dev/random.
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#79Earlier quoted context omitted.
Strongest possible disagree. For instance, the Debian OpenSSL bug was an entirely unforced error stemming from applications that chose to use Debian OpenSSL's terrible CSPRNG on top of the OS's CSPRNG. The local attacker scenario you're talking about is a theoretical risk when there are attackers running code in the same OS as your CSPRNG; a far more likely concrete flaw is, for instance, a SecureRandom implementatio…
Strongest possible disagree. Ok, we disagree. It wouldn't be the first time. ;-) the Debian OpenSSL bug was an entirely unforced error stemming from applications that chose to use Debian OpenSSL's terrible CSPRNG on top of the OS's CSPRNG I think the biggest problem was that OpenSSL used OpenSSL's CSPRNG after Debian broke it. Having applications all open+read+close /dev/random is not going to prevent that. a far mor…
Re: Android RNG Weakness Renders Bitcoin Wallets Insecure
#80Earlier quoted context omitted.
Last I heard, there were still some "security oriented" OSes using RC4 for their /dev/random.
arc4random predates modern OS CSPRNGs.
Even that OS with the biased /dev/[u]random using RC4 because it was fast would keep a separate RC4 state in each process' libc to avoid the overhead of kernel calls.