GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing wiki.archlinux.org — systemd-cryptenroll - ArchWiki
Related articles From systemd-cryptenroll(1):
systemd-cryptenroll allows enrolling smartcards, FIDO2 tokens and Trusted Platform Module security chips into LUKS devices, as well as regular passphrases. These devices are later unlocked by [email protected](8), using the enrolled tokens. Installationsystemd-cryptenroll is part of and packaged with systemd. However, extra packages are required to use hardware devices as keys:
List keyslotssystemd-cryptenroll can list the keyslots in a LUKS device, similar to # systemd-cryptenroll /dev/disk SLOT TYPE 0 password 1 recovery 2 tpm2 Erasing keyslots# systemd-cryptenroll /dev/disk --wipe-slot=SLOT Where SLOT can be:
The # systemd-cryptenroll /dev/disk --wipe-slot=fido2 --fido2-device=auto Enrolling passphrasesRegular passwordThis is equivalent to # systemd-cryptenroll /dev/disk --password Recovery keyFrom systemd-cryptenroll(1):
A recovery key is designed to be used as a fallback if the hardware tokens are unavailable, and can be used in place of regular passphrases whenever they are required. # systemd-cryptenroll /dev/disk --recovery-key Enrolling hardware devicesThe Note After enrolling the hardware tokens into the LUKS2 volumes, you must configure your system to use them when appropriate. See dm-crypt/System configuration#Trusted Platform Module and FIDO2 keys for volumes that should be unlocked in early userspace like the root filesystem, and dm-crypt/System configuration#Unlocking in late userspace for other partitions.
PKCS#11 tokens or smartcardsThe token or smartcard must contain a RSA key pair, which will be used to encrypt the generated key that will be used to unlock the volume. # systemd-cryptenroll /dev/disk --pkcs11-token-uri=device FIDO2 tokensAny FIDO2 token that supports the "hmac-secret" extension can be used with systemd-cryptenroll. The following example would enroll a FIDO2 token to an encrypted LUKS2 block device, requiring only user presence as authentication: # systemd-cryptenroll /dev/disk --fido2-device=device --fido2-with-client-pin=no In addition, systemd-cryptenroll supports using the token's built-in user verification methods:
Note
By default, the cryptographic algorithm used when generating a FIDO2 credential is es256 which denotes Elliptic Curve Digital Signature Algorithm (ECDSA) over NIST P-256 with SHA-256. If desired and provided by the FIDO2 token, a different cryptographic algorithm can be specified during enrollment. Note This may also be desirable for those concerned with ECDSA. See SSH keys#ECDSA for details.
Suppose that a previous FIDO2 token has already been enrolled; if the user wishes to enroll another, the following generates an eddsa credential which denotes EdDSA over Curve25519 with SHA-512 and authenticates the device with a previous enrolled token instead of a password: # systemd-cryptenroll /dev/disk --fido2-device=device --fido2-credential-algorithm=eddsa --unlock-fido2-device=auto Note Both tokens must be plugged in to the system for successful enrollment.
Trusted Platform Modulesystemd-cryptenroll has native support for enrolling LUKS keys in TPMs. It requires the following:
To begin, run the following command to list your installed TPMs and the driver in use: $ systemd-cryptenroll --tpm2-device=list Tip
A key may be enrolled in both the TPM and the LUKS volume using only one command. The following example generates a new random key, adds it to the volume so it can be used to unlock it in addition to the existing keys, and binds this new key to PCR 7 (Secure Boot state): # systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=7 /dev/sdX where Refer to systemd-cryptenroll(1) and Trusted Platform Module#Accessing PCR registers for common PCR measurements in Linux. Adjust Warning
The combination of PCRs to bind to depends on the individual case to balance usability and lock-down. For example, you may require UEFI firmware updates without manual intervention to the Secure Boot state, or different boot devices. As another example, Microsoft's Bitlocker prefers PCR Note
To check that the new key was enrolled, dump the LUKS configuration and look for a # cryptsetup luksDump /dev/sdX To test that the key works, run the following command while the LUKS volume is closed: # systemd-cryptsetup attach mapping_name /dev/sdX none tpm2-device=auto where See dm-crypt/System configuration#crypttab and dm-crypt/System configuration#Trusted Platform Module and FIDO2 keys in order to unlock the volume at boot time. Note While you may specify the UUID of your LUKS volume in place of the pathname in
/etc/crypttab, the systemd-cryptenroll command itself currently only supports path names.See systemd-cryptenroll(1) and crypttab(5) for more information and examples. See also |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |