5 ms·
physical entropy sources are crucial to cryptographic security; failing to use them properly has been a major source of insecurity in applied cryptography, most
by kragen 3y ago
physical entropy sources are crucial to cryptographic security; failing to use them properly has been a major source of insecurity in applied cryptography, most notably the debian openssl bug but also in some other cases. linux has had /dev/random and /dev/urandom for this for decades and has more recently added a getrandom() call
also, there are other intentional sources of nondeterminism in current programming environments, such as aslr and the random hash salt python and perl apply to thwart hash-collision dos attacks
- hunter2_ 3y agoI seem to recall early Windows using mouse movement, to the point where lack thereof would block if entropy was exhausted. Then other things like network rx timing was added to the mix. But what's a system to do in the absence of all such physical inputs?
- charcircuit 3y agoDesktop / server / mobile chips typically have hardware support for collecting entropy which can be used.
- somat 3y agoI half remember a case where the program(some sort of install or copy I think) would complete faster while shaking your mouse around. I will look for the article. This was different from the old gpg prompts that instructed to move the mouse around when generating keys. update: it was probably this effect. https://retrocomputing.stackexchange.com/a/11535 https://retrocomputing.stackexchange.com/a/11535
- magicalhippo 3y agoPuTTYgen waits for you to move the mouse across a portion of the screen enough times when generating keys[1], sampling the mouse position for entropy. [1]: https://the.earth.li/~sgtatham/putty/0.80/htmldoc/Chapter8.html#puttygen-generate https://the.earth.li/~sgtatham/putty/0.80/htmldoc/Chapter8.h...
- xxr 3y agoHere’s the particular explanation I remember reading a few years back: https://retrocomputing.stackexchange.com/a/11535 https://retrocomputing.stackexchange.com/a/11535
- willis936 3y agoI was recently waiting on a linux machine to finish a big encrypted file transfer. As soon as I ssh'd in it drastically sped up. My best guess is that it was starved for entropy and logging in gave some.
- lordfrito 3y agoI'm an embedded systems programmer. We use LFSRs like everyone else. But I always make a point to feed true sources of entropy into the RNG. Stuff like this if (any input changed) RNG_seed ^= sysclk; It's helped on numerous occasions where two or more identical systems co-exist (share a bus for example). Without entropy the systems RNGs are always in sync, which causes all sorts of problems. For example, on a CAN network bus collision you're supposed to back off a random amount of time. If the colliding systems RNGs are in sync, they keep colliding over and over endlessly. Entropy will kick you in the ass if you don't think about it. Which is why I always make sure to include it. You can always turn this off in DEBUG builds.
- hunter2_ 3y agoThat makes sense. I could be wrong but I just have this sneaking suspicion that some systems literally have no inputs, though. Nothing received from the outside world... no HCI or sensors of any kind. But maybe such a simple system isn't likely to need much randomness? In your CAN bus example, pretty much anything transmitting onto the bus is doing so because it knows something interesting, as opposed to expressing something deterministic from its own little stored routine?
- kragen 3y agonot necessarily, it might be transmitting a heartbeat so you can detect that that part of the wiring harness is still turned on. i've seen embedded systems with literally no inputs, like the minipov2, but never one that transmits on a network
- hunter2_ 3y agoSo if you wanted a bunch of those to transmit onto the same bus/network, and use exponential backoff to resolve collisions, they would just keep colliding forever, right? Because even if they tried to seed their delay with randomness, they'd all do so the same way every time!
- 3y ago
- ahoka 3y ago“ physical entropy sources are crucial to cryptographic security” Of this would be true, then no one would use VMs and cloud instances.
- AlotOfReading 3y agoIt's my understanding that most clouds (AWS/GCP/Azure) have hardware RNGs available to the VM through something like virtio-rng for exactly this reason. Even if it's not universal (I have no idea), it's certainly something that's available.
- kragen 3y agoas another commenter has pointed out, physical entropy sources can be provided to vms, but sadly the other implied premise of your syllogism is also false: use of insecure cryptography is in fact widespread
- _kb 3y agoThere is the wall of lava lamps approach too: https://blog.cloudflare.com/lavarand-in-production-the-nitty-gritty-technical-details https://blog.cloudflare.com/lavarand-in-production-the-nitty...
- jmalicki 3y agoYou're of course unlikely to get the same read, but I find it crazy that their source of cryptographic entropy is on public display from the street!
- kragen 3y agoagreed, it means the fluid-dynamics chaos in the lava lamps is useless for their cryptographic purposes
- xeyownt 3y agoNot really. You can combine the public random source with a secret key. Since you assume they can keep secret a random source, they can equally keep this key secret. In fact, it's sometimes preferable to get rid of hardware source completely and only rely on a secret key and a state, and obtain a design that is more resistant to fault.