5 ms·
I think OpenBSD has an interesting solution to this problem, randomness is saved in a seedfile on shutdown/periodically during runtime, and injected directly in
by throwaway2048 6y ago
I think OpenBSD has an interesting solution to this problem, randomness is saved in a seedfile on shutdown/periodically during runtime, and injected directly into the kernel via boot loader before the kernel loads.
This gives you a quality of randomness as early as possible during kernel boot, and allows you to employ it with kernel structures that are otherwise impossible to modify post-initialization (that say may be required to get "randomness harvesting" working).
- ahoka 6y agoNetBSD also supports this via the rndseed boot option.
- mlyle 6y agoFrom the article we're reading: > On shutdown (these days between shutdowns too, just in case power is lost), the current state of the entropy pool as collected during the lifetime of the system is saved into a file so it can be loaded on next boot. This should include enough sufficiently unpredictable data to give you a pretty good security margin. > When the file is loaded, it's combined with additional entropy collected during the boot process. > The first time the system is booted, and early in the boot process, things get more difficult.
- throwaway2048 6y agoNetBSD's approach is different as the kernel is loading the file, and it has to have "enough" kernel initialized to gain file system access, that is already past the point where many kernel structures can be randomized. NetBSD's approach to this is pretty much the as *nix have done for a long time.
- loeg 6y agoSee ahoka's sibling comment.
- flatiron 6y agoI think now a days “reboots” are a thing of the past. All of my instances scale up and scale down and have a max life of 30 days before they are rebuilt on a patched AMI. I think most stuff is done like that and not real metal boxes anymore.
- toast0 6y agoIf you're running in a VM, you are at the mercy of the host, so you may as well ask the host for a random seed. Use other factors if you can, but those are all controllable by a sufficiently determined host.
- washbear 6y agowhat do you mean computing life exists outside of containers that exist in a magical void
- loeg 6y agoWindows (at least 10) and FreeBSD do the same thing. (Windows 10 does quite a lot of entropy gathering in the boot loader and passes it off to the operating system. There are a number of interesting things in their design that I don't believe any open source operating system yet incorporates; the whitepaper is a worth a read.)