News for hackers. Stuff that matters.
Re:Uniting the Linux random-number devices by EdSchouten on Wednesday December 20, 2023 @04:25PM (#38713847)
Even though not all architectures have an RTC or strong PRNG instructions, almost all of them have writable storage in the form of NVRAM/NAND/disk.

Why can’t they just patch up the kernel to persist PRNG state there and require that the boot loader recovers it upon reboot? The kernel would then have high quality random data available as soon as it gets launched.

Re:Uniting the Linux random-number devices by kurikuri on Wednesday December 20, 2023 @05:18PM (#38714394)
The PRNG state is responsible for generating most of the users cryptographic material and is quite important to the system’s security. As such, the PRNG State is a security parameter that should never be exportable nor importable.

There are many new attacks that could surface if import/export were possible; off the top of my head: quiet preloading of an attacker-selected state while the machine is off.

Re:Uniting the Linux random-number devices by yencabulator on Wednesday December 20, 2023 @07:53PM (#38715795)
You don't need to export the current running kernel PRNG internal state, all you need is to save an unpredictable seed that can be used to fill the kernel entropy pool after next boot.

https://systemd.io/RANDOM_SEEDS/

Re:Uniting the Linux random-number devices by 1000thVisitor on Wednesday December 20, 2023 @05:22PM (#38714437)
> quiet preloading of an attacker-selected state while the machine is off.

That attacker with physical access can chose from multiple other attacks, so why bother making this one more secure. They can sniff keyboard strokes, install malware into the UEFI, etc. pp.

Re:Uniting the Linux random-number devices by Asmod4n on Wednesday December 20, 2023 @08:43PM (#38716114)
Just do what netbsd recommends and you should be fine https://man.netbsd.org/urandom.4 They explicitly state you should dog feed the prng on every shutdown and boot and also explain why that isn’t an issue.
Re:Uniting the Linux random-number devices by GoblinSlayer on Thursday December 21, 2023 @03:43AM (#38718280)
>quiet preloading

Just preload the OS then.

Re:Uniting the Linux random-number devices by dist-epoch on Wednesday December 20, 2023 @07:50PM (#38715771)
Windows does that, persists a seed in the registry, but it's not enough.

Imagine a virtual machine snapshot that you start multiple times. The separate runs would have the exact same persisted state.

Re:Uniting the Linux random-number devices by Asmod4n on Wednesday December 20, 2023 @08:40PM (#38716086)
Doesn’t matter, it just feeds more entropy during boot. Even when it’s the same on all pcs on the planet the output wouldn’t be in a degraded state.

When you are dealing with an attacker which can feed your PRNG non stop with their own entropy you have other issues to deal with.

Re:Uniting the Linux random-number devices by Aachen on Thursday December 21, 2023 @01:18AM (#38717566)
With that reasoning, one doesn't need an initial randomness file to begin with.

Either you think there's plenty of usable entropy soon enough after power on that values can't be predicted, or you think there isn't and we need to keep a file to initialise from

> an attacker which can feed your PRNG non stop with their own entropy

Is not needed if you know the initial state from the file (which was present in the image file an attacker got their hands on, for example): knowing a sufficient percentage of outputs (such as the tcp seq/ack number (I forget which one the server generates) when you send a decent rate of syn packets) lets you verify which entropy addition would have lead to that output being generated. That's a handful of bits to brute force at each step unless the entropy additions are processed in prohibitively large batches (say, ≥80 bits at a time) which means you start completely predictable until that entropy is accrued (which may or may not be an issue depending on circumstances)

Re:Uniting the Linux random-number devices by cratermoon on Wednesday December 20, 2023 @08:39PM (#38716084)
Very useful for certain kinds of testing, though.