bootspec-secureboot
bootspec-secureboot copied to clipboard
[WIP] pcr phases
Description
This enables the use of systemd's pcrphase units along with systemd-measure to lock TPM2 secrets to specific boot phases. The pcr-test.nix file demonstrates a LUKS volume that will only unlock during initrd (it also demonstrates that it won't unlock when secure boot settings have changed, but that's using simpler TPM2 locking).
This is authorized by a new key pair that the LUKS volume can trust upon TPM2 enrollment. As long as that key is only used to sign certain phases, that LUKS key can only be unlocked during those phases.
Checklist
- [x] Built with
cargo build - [x] Formatted with
cargo fmt - [ ] Linted with
cargo clippy - [x] Ran tests with
cargo test - [ ] Added or updated relevant tests (leave unchecked if not applicable)
- [ ] Added or updated relevant documentation (leave unchecked if not applicable)