8 ms·
On the subject of TRNG, John Denker wrote a 2005 paper for using soundcard data as a source of randomness, http://www.av8n.com/turbid/ http://www.av8n.com/turbi
by walterbell 7y ago
On the subject of TRNG, John Denker wrote a 2005 paper for using soundcard data as a source of randomness, http://www.av8n.com/turbid/ http://www.av8n.com/turbid/
> We discuss how to configure and use turbid, which is a Hardware Random Number Generator (HRNG), also called a True Random Generator (TRNG). It is suitable for a wide range of applications, from the simplest benign applications to the most demanding high-stakes adversarial applications, including cryptography and gaming. It relies on a combination of physical process and cryptological algorithms, rather than either of those separately. It harvests randomness from physical processes, and uses that randomness efficiently. The hash saturation principle is used to distill the data, so that the output is virtually 100% random for all practical purposes. This is calculated based on physical properties of the inputs, not merely estimated by looking at the statistics of the outputs. In contrast to a Pseudo-Random Generator, it has no internal state to worry about. In particular, we describe a low-cost high-performance implementation, using the computer’s audio I/O system.
On randomness, http://www.av8n.com/turbid/paper/turbid.htm#sec-raw-randomness http://www.av8n.com/turbid/paper/turbid.htm#sec-raw-randomne...
> Understanding turbid requires some interdisciplinary skills. It requires physics, analog electronics, and cryptography.
- hannob 7y agoThis is one of these approaches that are for all practical purposes completely useless. There's basically only three problems generating good randomness: 1. Very early during boot you don't have a lot of good sources. 2. On very constrained devices you have limited external input. 3. Bugs in the implementation. Randomness from soundcards doesn't help with any of these. They probably aren't yet initialized at the point in time where it matters most, they don't exist for the most problematic devices and bugs are bugs, no matter what your source of randomness.
- bigiain 7y ago> Randomness from soundcards doesn't help with any of these. "Randomness from soundcards" is also spectacularly unlikely to help on the cloud. Pretty sure they don't fit SoundBlaster16s to EC2 instances or Digital Ocean Droplets...
- simias 7y agoGiven that these instances are typically virtualized I wouldn't be surprised if you could extract a decent amount of entropy just by using the system timings (interrupts, RTC sampling etc...) given that they would be affected by the other running systems. And of course there's always the network card. In my experience it's not usually super difficult to get a decent amount of entropy on complex desktop or servers, it's only a real issue on simple embedded hardware where you might have no way to sample the environment and all the timings are ultra-deterministic. In this case I've resorted to using temperature measurements and fan speed as a source of entropy during early boot, which isn't ideal.
- tinus_hn 7y agoIt would seem quite helpful if these virtual machines provided a virtual device that gives random numbers provided by the host device.
- pjc50 7y ago> given that they would be affected by the other running systems Philosophically, does that make it more or less random? The whole category of side-channels suggests that there are problems with sharing a system like this. There's also the philosophical question of how cryptographically secure a fully virtual system can be when the host has full inspection and control capability. If you're running in the cloud you need to think carefully about how to delegate this to the platform if at all possible.
- skrebbel 7y agoI want a cloud version of Dr. Sbaitso!
- simias 7y agoIt could potentially help with 1 if you have some early bootstrap code to configure the sound card and get some samples. I agree with your general point however.
- atoav 7y agoI probably don’t know enough about computers, but wouldn’t there be a way to use e.g. the digital outputs of a DAC directly even in the earliest part of boot? Is there a good reason why CPUs aren’t doing this already?
- pjc50 7y agoWell, if you have one, and if the thing it's listening to is sufficiently random - both of which are in question here. This is sort of the problem the CPU random number generator is intended to solve, but see the discussion on trust.
- amelius 7y agoCPUs already have a physics-based random number generator. https://en.wikipedia.org/wiki/RDRAND https://en.wikipedia.org/wiki/RDRAND
- saagarjha 7y agoWhich has concerns that it may be backdoored by intelligence agencies: https://github.com/torvalds/linux/blob/6398b9fc818eea79dcd6e70f981ce782da22cdee/drivers/char/random.c#L1885 https://github.com/torvalds/linux/blob/6398b9fc818eea79dcd6e...
- kalleboo 7y agoI'm a lot less worried about an NSA backdoor than I am that Intel (or mediatek, or whatever cheap ARM license is in my router) just fucked up the implementation
- throwaway2048 7y agoFirst generation AMD Zen CPUs returned all 1s for RDRAND instructions for instance
- lmm 7y agohttps://dilbert.com/strip/2001-10-25 https://dilbert.com/strip/2001-10-25
- Jasper_ 7y agoWhat's stopping the NSA from inserting a backdoor to recognize it's running kernel randomness code and change the results too? If you don't trust your CPU, you can't trust anything it does. Expecting the backdoor to show up in one solely instruction is hopelessly naive.
- littlestymaar 7y ago“you can't be safe from all attacks” doesn't means you should not attempt to protect yourself from the obvious ones.
- b2ccb2 7y agoReminds me of Cloudflares wall of lava lamps[1], discussed here: https://news.ycombinator.com/item?id=16041295 https://news.ycombinator.com/item?id=16041295 [1] https://www.cloudflare.com/learning/ssl/lava-lamp-encryption/ https://www.cloudflare.com/learning/ssl/lava-lamp-encryption...
- brian_herman 7y agoHow long does the lava lamp system take to start from a cold boot?
- RL_Quine 7y agoAbout half an hour to get a solid glob going for mine, too long and you tend to end up with a large bias towards the top. I looked into this because I wanted to pre warm my lava lamp because it’s depressing to wake up to cold blobs.