freebsd-skq/sys/boot/i386/gptboot
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
..
gptboot.8 mdoc: fix AUTHORS section. 2014-06-09 19:36:08 +00:00
gptboot.c Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
gptldr.S Add SHA512, skein, large blocks support for loader zfs. 2016-08-18 00:37:07 +00:00
Makefile Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2016-03-21 18:02:26 +00:00