freebsd-dev/sys/crypto
Allan Jude ec5c0e5be9 Implement boot-time encryption key passing (keybuf)
This patch adds a general mechanism for providing encryption keys to the
kernel from the boot loader. This is intended to enable GELI support at
boot time, providing a better mechanism for passing keys to the kernel
than environment variables. It is designed to be extensible to other
applications, and can easily handle multiple encrypted volumes with
different keys.

This mechanism is currently used by the pending GELI EFI work.
Additionally, this mechanism can potentially be used to interface with
GRUB, opening up options for coreboot+GRUB configurations with completely
encrypted disks.

Another benefit over the existing system is that it does not require
re-deriving the user key from the password at each boot stage.

Most of this patch was written by Eric McCorkle. It was extended by
Allan Jude with a number of minor enhancements and extending the keybuf
feature into boot2.

GELI user keys are now derived once, in boot2, then passed to the loader,
which reuses the key, then passes it to the kernel, where the GELI module
destroys the keybuf after decrypting the volumes.

Submitted by:	Eric McCorkle <eric@metricspace.net> (Original Version)
Reviewed by:	oshogbo (earlier version), cem (earlier version)
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D9575
2017-04-01 05:05:22 +00:00
..
aesni Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
armv8 Add accelerated AES with using the ARMv8 crypto instructions. This is based 2016-11-21 11:18:00 +00:00
blowfish
camellia
des
rc4
rijndael Fix gcc build: preserve const qualifier when casting input values. 2014-11-11 13:37:28 +00:00
sha2 Fix C++ includability of crypto headers with static array sizes 2016-10-18 23:20:49 +00:00
siphash Fix C++ includability of crypto headers with static array sizes 2016-10-18 23:20:49 +00:00
skein libmd: add noexec stack annotation in skein_block_asm.s 2017-01-07 19:26:25 +00:00
via Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
intake.h Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
sha1.c crypto routines: Hint minimum buffer sizes to the compiler 2016-05-26 19:29:29 +00:00
sha1.h Fix C++ includability of crypto headers with static array sizes 2016-10-18 23:20:49 +00:00