Re:Android RNG Weakness Renders Bitcoin Wallets Insecure
by tptacek on Sunday August 11, 2013 @11:44PM
(#6197548)
Linux random/urandom is supposed to prevent short-reads for exactly this reason. You raise an interesting point, but I'm not persuaded that the risk of quietly failing to read from the random device is greater than the risks of adopting an entire new CSPRNG to sit on top of the OS's CSPRNG.
[ Parent
| on HN ]
Re:Android RNG Weakness Renders Bitcoin Wallets Insecure
by cperciva on Monday August 12, 2013 @01:06AM
(#6197741)
Linux random/urandom is supposed to prevent short-reads for exactly this reason.
Oh great, yet another way that Linux developers are going to write broken code because they think the whole unix world behaves like Linux...
Re:Android RNG Weakness Renders Bitcoin Wallets Insecure
by tptacek on Monday August 12, 2013 @10:54AM
(#6199518)
So then what you should do is write a "libpcap for randomness" that uses the best-practices method of getting randomness from the OS CSPRNG. On Linux it'll be just a couple lines; on BSD it'll be a few more lines for the "atomicio" equivalent read, and on WINAPI it'd set up and call CryptGenRandom.
There's value in having a uniform interface to all the different OS CSPRNGs.
What I'm saying isn't valuable is duplicative effort to build additional CSPRNG logic in the app layer. As we keep seeing, these app-layer CSPRNGs are additional single points of failure; they don't add defensive depth.
Re:Android RNG Weakness Renders Bitcoin Wallets Insecure
by tedunangst on Monday August 12, 2013 @12:22PM
(#6200018)
How is OpenSSL RAND_bytes not that uniform interface?
Re:Android RNG Weakness Renders Bitcoin Wallets Insecure
by tptacek on Monday August 12, 2013 @12:35PM
(#6200110)
OpenSSL provides its own CSPRNG. When that CSPRNG breaks, as it has in the past, no amount of careful validation of the OS CSPRNG helps you. The OpenSSL CSPRNG is thus a second single point of failure.