freebsd-nq/sys/geom/eli
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
..
g_eli_crypto.c Make additional parts of sys/geom/eli more usable in userspace 2016-01-07 05:47:34 +00:00
g_eli_ctl.c sys/geom/eli: Switch bzero() to explicit_bzero() for sensitive data 2017-03-31 00:07:03 +00:00
g_eli_hmac.c improve PBKDF2 performance 2017-02-19 19:30:31 +00:00
g_eli_integrity.c Fix alignment issues on MIPS: align the pointers properly. 2016-10-31 16:55:14 +00:00
g_eli_key_cache.c sys/geom/eli: Switch bzero() to explicit_bzero() for sensitive data 2017-03-31 00:07:03 +00:00
g_eli_key.c sys/geom/eli: Switch bzero() to explicit_bzero() for sensitive data 2017-03-31 00:07:03 +00:00
g_eli_privacy.c
g_eli.c Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
g_eli.h Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
pkcs5v2.c improve PBKDF2 performance 2017-02-19 19:30:31 +00:00
pkcs5v2.h