Re:Show HN: True-Random – Generate “truly” random numbers
by dakami on Tuesday May 10, 2016 @04:41PM
(#11670495)
It's definitely based on my approach, but it's missing the concept a bit. The only way this approach gets entropy is if you cross two clocks at very different speeds, and get randomness from the mismatched tolerances. For example, using a computer's microsecond accurate clock to measure a human's 100 millisecond scale behavior yields bits, because we can't be microsecond accurate even if we try.
The bitflipping I was exploring involved matching the CPU clock (nanosecond scale) with the real time clock (millisecond scale). This of course has some risk because the OS can easily implement the latter with the former. And in fact, in this implementation, that's actually what happens -- he's measuring the number of bit flips at nanosecond accuracy. Output is distinguishable from PRNG, as seen elsewhere.
If I remember right somebody did break my "Defcon Challenge" with Firefox.
Re:Show HN: True-Random – Generate “truly” random numbers
by Natanael_L on Tuesday May 10, 2016 @02:38PM
(#11669492)
The answer for VMs is guest OS drivers that taps into the host's system RNG (with support for doing so in the VM software).
Re:Show HN: True-Random – Generate “truly” random numbers
by nickpsecurity on Tuesday May 10, 2016 @03:01PM
(#11669648)
Exactly. Having a root, high-quality RNG whose output can be input into other systems directly or seeding a CRNG is a classic, design pattern of mine. It can be used for dedicated, simple machines too predictable for TRNG (eg RTOS's), virtual machines, and probably other things I haven't thought of.
See also Kaminsky's implementation of the same approach in pure JS: https://gist.github.com/PaulCapestany/6148566
and Ryan Finnie's implementation in Perl: http://www.finnie.org/2012/08/14/twuewand-2-0-released/
The big concern I have is how reliable this is on virtual machines. Just about all physical machines I'd want to use have high-quality, trustworthy-within-my-threat-model (i.e., "if the NSA wanted to attack my silicon, there's easier silicon for them to attack") hardware random number generators, and all physical machines I'd want to use pick up sufficient randomness from the kernel's entropy magic thing. But virtual machines often don't have access to the hardware RNG, and they don't have access to enough other hardware to populate entropy. It seems like this technique would be particularly risky there ... although I don't think anyone's published an attack on DakaRand yet, so maybe it's fine!