[PATCH] efi: random: increase size of firmware supplied randomness

2017-08-19 Thread Ard Biesheuvel
The crng code requires at least 64 bytes (2 * CHACHA20_BLOCK_SIZE) to complete the fast boot-time init, so provide that many bytes when invoking UEFI protocols to seed the entropy pool. Also, add a notice so we can tell from the boot log when the seeding actually took place. Signed-off-by: Ard Bie

[RFC PATCH 1/2] efi: import USB I/O related declarations from the UEFI spec

2017-08-19 Thread Ard Biesheuvel
In preparation of adding support for the Chaoskey USB stick to the UEFI stub, import the USB I/O protocol declarations and related types to linux/efi.h. Signed-off-by: Ard Biesheuvel --- include/linux/efi.h | 66 + 1 file changed, 66 insertions

[RFC PATCH 2/2] efi: libstub: add support for the Chaoskey RNG USB stick to the stub

2017-08-19 Thread Ard Biesheuvel
Early entropy is hard to come by, especially on non-x86 systems that lack an architected instruction and are not as uniform as PCs. Fortunately, on UEFI systems, we can invoke the EFI_RNG_PROTOCOL, which exposes the platform specific entropy source in a generic way. We use this protocol to fill the