Secure Boot makes the firewall's firmware check every boot file before it starts it: the boot loader, the system, and the small add-on that says which system slot (A or B) to start. A boot file that was changed, or that Korthveil did not sign, does not start. The TPM-sealed state key keeps a key inside the firewall's TPM chip that only comes out when the firewall starts the way it did when the key was sealed, from a boot file Korthveil signed; the firewall encrypts the passwords and keys in its configuration with it.
Both are off until you turn them on, and turning them on never changes how updates work: the A/B update, going back to the previous version, the boot menu's recovery entry and the failsafe copy (C) all work the same with Secure Boot on.
You need a firewall that starts in UEFI mode (every Korthveil install does) and, for the state key, a TPM 2.0 (most boards from the last ten years have one; on Intel it is often called PTT, on AMD fTPM).
Which way to trust Korthveil
The firmware only starts what its own key lists allow. There are two ways to add Korthveil:
- Firmware keys (db): you add the Korthveil certificate to the firmware's list of allowed keys (db). The firmware then checks the Korthveil boot loader itself. Choose this when the firmware setup lets you add a key from a file, which most servers and many mini PCs do.
- Shim (Microsoft keys): the firmware keeps only the keys it came with (Microsoft's). The shim, signed by Microsoft, starts first and checks Korthveil against a Machine Owner Key (MOK) you enroll once at the console. Choose this when the firmware has no way to add a key, or when you must keep the factory keys.
The Korthveil installer starts through shim, so it boots on most machines with Secure Boot on: the USB image from 1.5.4, and from 1.5.5 also the DVD and a USB stick written from the ISO. If the installer itself started with Secure Boot on, the firewall is prepared for Secure Boot during the install, in shim mode.
Prepare the firewall
- Install a signed Korthveil version (1.5.4 or newer) with an A/B update or the installer. A firewall updated only with small layer updates keeps its older, unsigned boot files: the page says so and asks for a full update.
- Open System › Certificates & encryption › Secure Boot. Before it is prepared, the panel says so and names the next step.

- In the Secure Boot panel, choose Prepare: firmware keys (db) or Prepare: shim (Microsoft keys).
- The panel shows what was done, for example "the boot loader is the Korthveil-signed systemd-boot" and "EFI/korthveil/slot-a.efi names slot A".
Preparing only changes the firewall's own boot partition: it puts the signed boot loader in place, adds the slot add-ons next to each slot's boot file, and copies the Korthveil certificate (korthveil-secureboot.der) to the top of the boot partition. It never changes the firmware's keys; that stays your step, below.

To have the certificate on your computer, use Certificate (.der) (or Signature list (.esl) for firmware that wants that format). Check its fingerprint against the one on the page before you enroll it. Example of what the page shows: 1b21 a69a d6c6 2302.
Enroll the key in the firmware (firmware keys)
The menu names differ between boards. The steps are usually:
- Restart the firewall and open the firmware setup (often Del, F2 or F10 while the board logo shows).
- Find Security › Secure Boot (or Boot › Secure Boot).
- Set Secure Boot Mode to Custom (some boards call it Expert Key Management).
- Choose db (or Authorized Signatures), then Append or Enroll from file, and pick
korthveil-secureboot.derfrom the boot partition (named ESP or EFI) or from a USB stick. Keep the keys already there: many add-in cards need them. - Set Secure Boot to Enabled, save and exit.
The pictures show one firmware, a virtual machine's (OVMF); your board's menus look different but have the same steps.




If the firmware is in setup mode (no platform key), the page says so. Let the firmware restore its default keys first, then append the Korthveil certificate to db.
Enroll the key with MokManager (shim)
- In the firmware setup, set Secure Boot to Enabled (keep the factory keys), save and exit.
- The first start after that stops at Verification failed: (0x1A) Security Violation, because Korthveil is not trusted yet. Press Enter (OK).
- A blue screen follows, Shim UEFI key management (MokManager). Press a key within 10 seconds.
- Choose Enroll key from disk, open the boot partition if it asks, and select
korthveil-secureboot.der. - Choose Continue, then Yes, then Reboot.
- The firewall starts Korthveil. MokManager only appears again if the key is removed.







You need a keyboard and a screen (or the server's remote console) for these steps, once per firewall.
Check that it works
Open System › Certificates & encryption › Secure Boot after the restart:
- The badge says On and verified (firmware keys) or On and verified (shim, Machine Owner Key).
-
Running boot file names the slot in use, for example
EFI/korthveil/slot-a.efi(slot A), signed with the Korthveil key.
-
Firmware keys lists the platform key, the key exchange keys, db (with Korthveil next to the Korthveil certificate in the firmware-keys way) and the Machine Owner Keys (in the shim way).

If the firmware has Secure Boot on but the firewall was never prepared, Korthveil prepares it at the next start by itself, so the next update starts the right slot.
Updates, going back and the failsafe copy
- Every signed image signs its own boot files. An A/B update writes the new boot file and keeps the slot add-ons next to both slots. If Secure Boot is on and an update's boot file is not signed with the Korthveil key, the update stops before anything changes and System › Updates says why.
- Going back works as before. A version that does not finish starting is left by itself, and the previous slot starts again, checked by Secure Boot like any other start.
- The failsafe copy (C) carries its own add-on for the slot it restores onto. Its boot menu entry works with Secure Boot on.
- The boot menu's recovery entry (last good configuration) works with Secure Boot on.
- A remote reinstall through SentinelOps works with Secure Boot on from 1.5.5. Secure Boot ignores the options of the one-time boot entry, so the firewall also writes the installer's settings to its boot partition (
EFI/korthveil-reinstall/installer.options), and the installer reads them from there. The installer must be 1.5.5 or newer and signed with the Korthveil key: otherwise the firewall refuses the reinstall before it restarts, changes nothing, and SentinelOps shows why. Use an A/B update in that case.
Seal the state key to the TPM
The TPM-sealed state key panel on the same page starts with a pre-check: the TPM's version, its PCR banks (SHA-256 is needed), and PCR 7, the measurement of the Secure Boot state and the keys that checked this start.

- Choose Turn on sealing. The TPM seals a new state key, and the firewall encrypts the passwords and keys in its configuration with it.
- The page shows the recovery key, once. It looks like this example (not a real key):
0a1b2c3d-4e5f6a7b-8c9d0e1f-2a3b4c5d-6e7f8a9b-0c1d2e3f-4a5b6c7d-8e9f0a1b. - Write it down, or store it in your password manager, away from the firewall. Then choose I have stored it. The firewall never stores the recovery key, never logs it, and can't show it again.

From now on, every start unlocks the state key by itself, and the panel says what the key is sealed to and what it encrypts:

What the key is sealed to
- PCR 7: the Secure Boot state and the keys that checked this start.
- PCR 11, signed by Korthveil: the Korthveil boot file that started (its system, start-up files and built-in command line). Every Korthveil boot file carries a prediction of its own PCR 11, signed with the Korthveil PCR key; the TPM accepts any start Korthveil signed a prediction for. A boot file that was changed does not unlock the key.
An A/B update or going back unlocks by itself: the new boot file brings its own signed prediction, and PCR 7 stays the same, so nothing is sealed again. An update that only restarts the programs (the kernel keeps running) keeps the key unlocked too.
A firewall that had sealing on before Korthveil 1.5.5 keeps its seal on PCR 7 alone until every system on it (both slots and the failsafe copy C) is Korthveil 1.5.5 or later; the panel says which one is older. At the first start after that, the firewall seals the key to PCR 7 and the signed PCR 11 by itself.
What the key encrypts
- The passwords and keys in the configuration: every setting the configuration keeps as a secret (for example the e-mail server password, RADIUS and LDAP secrets, SNMPv3 passwords, Wi-Fi passphrases, network storage secrets, API tokens, and the passwords and keys of add-ins). They are encrypted in the running configuration, in the pending changes, and in every revision of the history. The rest of the configuration (interfaces, zones, rules) is stored as before, so the firewall always starts with its rules.
- When sealing is turned on, the passwords and keys already stored are encrypted at once, the history included, and the firewall's copies of its database (the failsafe copy C and the copy an update keeps) follow.
- While another system on the firewall is older than Korthveil 1.5.5 (the other slot after an update from 1.5.4), the passwords and keys are stored as before, so going back to it keeps working; the panel says so. They are encrypted at the first start where every system is 1.5.5 or later.
- An update to a version older than 1.5.5 is refused while the passwords and keys are encrypted: turn sealing off first.
- Backups carry the passwords and keys encrypted with the backup's own passphrase, not with the state key, so a backup restores on any firewall. While the state key is locked (safe mode), a backup with the configuration's history can't be made: unlock first.
The recovery key is what opens the state key when the TPM refuses it. Without the recovery key, a firewall in safe mode can't open its passwords and keys again.
When the TPM refuses: safe mode
A firmware update, Secure Boot turned off or on, or new keys in the firmware change PCR 7, and the TPM refuses to release the state key. The firewall still starts: the network and the last ruleset come up as always, and the state key stays locked (safe mode). The console prints why, and asks for the recovery key.
In safe mode:
- The passwords and keys in the configuration stay encrypted. Add-ins whose settings hold them wait (the panel lists them), and features that need a stored password can't use it (for example notifications by e-mail, sign-ins through RADIUS or LDAP, network storage, the Wi-Fi passphrase).
- Nothing can be committed: changes you make are kept as pending changes, but new passwords or keys can't be saved until you unlock.
To unlock:
- At the console: type the recovery key when asked, or
- In System › Certificates & encryption › Secure Boot: type the recovery key in the TPM-sealed state key panel and choose Unlock and seal again.

The TPM then seals the key again to the new PCR 7 (and the signed PCR 11), so the next start unlocks by itself. The waiting add-ins start at once, without a restart. A wrong key changes nothing.
Planning a firmware update? A firmware update changes PCR 7, so the first start after it is in safe mode. Have the recovery key at hand before you start it, and type it at the console or in System › Certificates & encryption › Secure Boot after the update.
Turn it off
- Sealing: type
TURN OFFand choose Turn off sealing. The passwords and keys are first stored as before again (the history and the database copies too), then the sealed key and its recovery copy are removed. - Sealing, without the recovery key (safe mode, key lost): type
TURN OFF AND FORGETand choose Turn off sealing. The encrypted passwords and keys can then never be opened: they still show as set, but you must enter each one again. - Secure Boot: turn it off in the firmware setup. The prepared boot files keep working with Secure Boot off; nothing else needs to change.
What is not done yet
- The state key encrypts the configuration's passwords and keys only. The administrators' password hashes, the certificates' private keys, the SSH host keys, the network storage keys and the add-ins' own data are stored as before (readable by the firewall's system account only).
- With Secure Boot off, a changed boot menu entry can still change the system's command line without changing PCR 7 or PCR 11 (the change is measured in PCR 12, which differs between the slots and is not used). Seal with Secure Boot on.