Guide on using system disk encryption
cryptsetup
utility.
The operating system will run additional setup steps when encryption is enabled.
If the disk encryption is enabled for the STATE partition, the system will:
static
- encrypt with the static passphrase (weakest protection, for STATE
partition encryption it means that the passphrase will be stored in the META
partition).nodeID
- encrypt with the key derived from the node UUID (weak, it is designed to protect against data being leaked or recovered from a drive that has been removed from a Talos Linux node).kms
- encrypt using key sealed with network KMS (strong, but requires network access to decrypt the data.)tpm
- encrypt with the key derived from the TPM (strong, when used with SecureBoot).Note:nodeID
encryption is not designed to protect against attacks where physical access to the machine, including the drive, is available. It uses the hardware characteristics of the machine in order to decrypt the data, so drives that have been removed, or recycled from a cloud environment or attached to a different virtual machine, will maintain their protection and encryption. Note: When using KMS encryption forSTATE
partition the network configuration can’t be provided via the machine configuration, as KMS requires network connectivity beforeSTATE
partition is unlocked. Also custom CA certificates cannot be used for the KMS server, as these are stored in theSTATE
partition as well.
Note: What the LUKS2 docs call “keys” are, in reality, a passphrase. When this passphrase is added, LUKS2 runs argon2 to create an actual key from that passphrase.LUKS2 supports up to 32 encryption keys and it is possible to specify all of them in the machine configuration. Talos always tries to sync the keys list defined in the machine config with the actual keys defined for the LUKS2 partition. So if you update the keys list, keep at least one key that is not changed to be used for key management. When you define a key you should specify the key kind and the
slot
:
nodeID
which is generated using the node UUID and the partition label (note that if the node UUID is not really random it will fail the entropy check).static
which you define right in the configuration.kms
which is sealed with the network KMS.tpm
which is sealed using the TPM and protected with SecureBoot.Note: Use static keys only if your STATE partition is encrypted and only for the EPHEMERAL partition. For the STATE partition it will be stored in the META partition, which is not encrypted.
talosctl apply-config
a couple of times, since there is a need to always maintain a single working key while changing the other keys around it.
So, for example, first add a new key:
apply-config
should be called with --mode=staged
.apply-config
, but before the reboot.--mode=staged
:
apply-config
with --insecure
flag: