RE: Stop breaking the CSRNG
From: David Laight
Date: Thu Oct 03 2019 - 06:13:46 EST
From: Kurt Roeckx
> Sent: 02 October 2019 17:56
> As OpenSSL, we want cryptograhic secure random numbers. Before
> getrandom(), Linux never provided a good API for that, both
> /dev/random and /dev/urandom have problems. getrandom() fixed
> that, so we switched to it were available.
The fundamental problem is that you can't always get ' cryptograhic secure
random numbers'. No API changes are ever going to change that.
The system can either return an error or sleep (possibly indefinitely)
until some 'reasonably random' numbers are available.
A RISC-V system running on an FGPA (I've only used Altera NIOS cpu)
may have absolutely no sources of randomness at boot time.
Saying the architecture must include a random number instruction
doesn't help!
Generating random bits inside the FPGA is somewhere between 'difficult'
and impossible (forcing metastability between clock domains might work).
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)