Re:Linux Kernel RNG is now Blake2 instead of SHA1 and 3x faster
by tptacek on Thursday December 30, 2021 @07:40PM
(#29743492)
Oh, nice, a good 3rd security reason! A userland CSPRNG is essentially just an additional single point of failure, since you're going to end up depending on secure randomness in the kernel already.
It's a good question!
Re:Linux Kernel RNG is now Blake2 instead of SHA1 and 3x faster
by axutio on Thursday December 30, 2021 @07:42PM
(#29743498)
Not arguing, but genuinely curious - what do kernels need randomness for?
Re:Linux Kernel RNG is now Blake2 instead of SHA1 and 3x faster
by KZerda on Thursday December 30, 2021 @07:50PM
(#29743554)
A lot of bits of security rely on some level of non-determinism. Things like TCP initial sequence number generation, where every TCP connection sequence starts with a random number. There have been numerous attacks where the RNG wasn't good enough, so an attacker could determine the TCP sequencing and perform various malicious activities. Additionally, things like in-kernel VPNs, like IPSEC and WireGuard, also need RNGs for their own internal functions. Calling out to userspace for that would be painful and could potentially break in a lot of unexpected ways.
Re:Linux Kernel RNG is now Blake2 instead of SHA1 and 3x faster
by Too on Friday December 31, 2021 @02:52AM
(#29745908)
I don't recall exactly but i think TCP retransmission delay and handshake adds random to the backoff, to avoid a thundering herd situation which repeats again if all clients retry at same time.
Assigning free ports to applications that listen on a socket is also random, not sure why, feels like it could be sequential unless you want to deliberately obscure what ports are being used.
Re:Linux Kernel RNG is now Blake2 instead of SHA1 and 3x faster
by _kbh_ on Thursday December 30, 2021 @07:48PM
(#29743535)
Address Space Layout Randomisation (ASLR) for one. ASLR moves around key parts of an executable to make exploitation of certain types of vulnerabilities more difficult or impossible.
getrandom was motivated by the fact that using device files has many failure modes.