News for hackers. Stuff that matters.
Re:Entropy and the NetBSD Kernel by throwaway2048 on Sunday May 17, 2020 @11:18AM (#23212561)
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).

Re:Entropy and the NetBSD Kernel by mlyle on Sunday May 17, 2020 @12:09PM (#23212892)
From 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.

Re:Entropy and the NetBSD Kernel by throwaway2048 on Sunday May 17, 2020 @01:59PM (#23213779)
NetBSD'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.

Re:Entropy and the NetBSD Kernel by loeg on Sunday May 17, 2020 @02:27PM (#23214034)
See ahoka's sibling comment.
Re:Entropy and the NetBSD Kernel by loeg on Sunday May 17, 2020 @07:46PM (#23216630)
Windows (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.)
Re:Entropy and the NetBSD Kernel by flatiron on Sunday May 17, 2020 @12:42PM (#23213170)
I 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.
Re:Entropy and the NetBSD Kernel by toast0 on Sunday May 17, 2020 @01:41PM (#23213623)
If 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.
Re:Entropy and the NetBSD Kernel by washbear on Wednesday May 20, 2020 @08:31AM (#23246099)
what do you mean computing life exists outside of containers that exist in a magical void
Re:Entropy and the NetBSD Kernel by ahoka on Sunday May 17, 2020 @11:28AM (#23212624)
NetBSD also supports this via the rndseed boot option.