I recently got a new laptop, and wanted to setup a dual-boot solution. To do this, most guides simply tell you to disable Secure Boot and then leave it that way. I wanted to keep Secure Boot enabled.
Secure Boot basics
I will construct a PKI according to the image below. There are three types of keys in a Secure Boot PKI.
- Platform Key (PK): A single root key, used to sign the Key Exchange Keys below it.
- Key Exchange Key (KEK): One or more keys used to sign changes to the DB and DBX databases.
- DB Signature Key (DB key): One or more keys used to sign EFI binaries that should be allowed to boot.
A simplified, but almost correct, description is that DB keys sign the EFI binaries (bootloader, kernels, etc.) that should be allowed to boot. To show which DB keys are allowed to do so, valid DB keys must be signed by a KEK. In the same way, all KEKs must be signed by the Platform Key.