summaryrefslogtreecommitdiffstats
path: root/upstream/fedora-rawhide/man1/systemd-cryptenroll.1
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/fedora-rawhide/man1/systemd-cryptenroll.1')
-rw-r--r--upstream/fedora-rawhide/man1/systemd-cryptenroll.1109
1 files changed, 80 insertions, 29 deletions
diff --git a/upstream/fedora-rawhide/man1/systemd-cryptenroll.1 b/upstream/fedora-rawhide/man1/systemd-cryptenroll.1
index e65f3cd0..9efa4454 100644
--- a/upstream/fedora-rawhide/man1/systemd-cryptenroll.1
+++ b/upstream/fedora-rawhide/man1/systemd-cryptenroll.1
@@ -1,5 +1,5 @@
'\" t
-.TH "SYSTEMD\-CRYPTENROLL" "1" "" "systemd 255" "systemd-cryptenroll"
+.TH "SYSTEMD\-CRYPTENROLL" "1" "" "systemd 256~rc3" "systemd-cryptenroll"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -37,7 +37,7 @@ is a tool for enrolling hardware security tokens and devices into a LUKS2 encryp
.sp -1
.IP " 1." 4.2
.\}
-PKCS#11 security tokens and smartcards that may carry an RSA key pair (e\&.g\&. various YubiKeys)
+PKCS#11 security tokens and smartcards that may carry an RSA or EC key pair (e\&.g\&. various YubiKeys)
.RE
.sp
.RS 4
@@ -89,6 +89,13 @@ Recovery keys\&. These are similar to regular passphrases, however are randomly
In addition, the tool may be used to enumerate currently enrolled security tokens and wipe a subset of them\&. The latter may be combined with the enrollment operation of a new security token, in order to update or replace enrollments\&.
.PP
The tool supports only LUKS2 volumes, as it stores token meta\-information in the LUKS2 JSON token area, which is not available in other encryption formats\&.
+.PP
+\fBsystemd\-cryptsetup\fR
+operates on the device backing
+/var/
+if no device is specified explicitly, and no wipe operation is requested\&. (Note that in the typical case where
+/var/
+is on the same file system as the root file system, this hence enrolls a key into the backing device of the root file system\&.)
.SS "TPM2 PCRs and policies"
.PP
PCRs allow binding of the encryption of secrets to specific software versions and system state, so that the enrolled key is only accessible (may be "unsealed") if specific trusted software and/or configuration is used\&. Such bindings may be created with the option
@@ -257,10 +264,10 @@ In general, encrypted volumes would be bound to some combination of PCRs 7, 11,
for more discussion\&.
.SH "LIMITATIONS"
.PP
-Note that currently when enrolling a new key of one of the five supported types listed above, it is required to first provide a passphrase, a recovery key or a FIDO2 token\&. It\*(Aqs currently not supported to unlock a device with a TPM2/PKCS#11 key in order to enroll a new TPM2/PKCS#11 key\&. Thus, if in future key roll\-over is desired it\*(Aqs generally recommended to ensure a passphrase, a recovery key or a FIDO2 token is always enrolled\&.
+Note that currently when enrolling a new key of one of the five supported types listed above, it is required to first provide a passphrase, a recovery key, a FIDO2 token, or a TPM2 key\&. It\*(Aqs currently not supported to unlock a device with a PKCS#11 key in order to enroll a new PKCS#11 key\&. Thus, if in future key roll\-over is desired it\*(Aqs generally recommended to ensure a passphrase, a recovery key, a FIDO2 token, or a TPM2 key is always enrolled\&.
.PP
Also note that support for enrolling multiple FIDO2 tokens is currently limited\&. When multiple FIDO2 tokens are enrolled,
-\fBsystemd\-cryptseup\fR
+\fBsystemd\-cryptsetup\fR
will perform pre\-flight requests to attempt to identify which of the enrolled tokens are currently plugged in\&. However, this is not possible for FIDO2 tokens with user verification (UV, usually via biometrics), in which case it will fall back to attempting each enrolled token one by one\&. This will result in multiple prompts for PIN and user verification\&. This limitation does not apply to PKCS#11 tokens\&.
.SH "COMPATIBILITY"
.PP
@@ -319,7 +326,7 @@ Enroll a recovery key\&. Recovery keys are mostly identical to passphrases, but
Added in version 248\&.
.RE
.PP
-\fB\-\-unlock\-key\-file=\fR\fIPATH\fR
+\fB\-\-unlock\-key\-file=\fR\fB\fIPATH\fR\fR
.RS 4
Use a file instead of a password/passphrase read from stdin to unlock the volume\&. Expects the PATH to the file containing your key to unlock the volume\&. Currently there is nothing like
\fB\-\-key\-file\-offset=\fR
@@ -330,7 +337,7 @@ so this file has to only contain the full key\&.
Added in version 252\&.
.RE
.PP
-\fB\-\-unlock\-fido2\-device=\fR\fIPATH\fR
+\fB\-\-unlock\-fido2\-device=\fR\fB\fIPATH\fR\fR
.RS 4
Use a FIDO2 device instead of a password/passphrase read from stdin to unlock the volume\&. Expects a
hidraw
@@ -344,13 +351,25 @@ option is also specified\&.
Added in version 253\&.
.RE
.PP
-\fB\-\-pkcs11\-token\-uri=\fR\fIURI\fR
+\fB\-\-unlock\-tpm2\-device=\fR\fB\fIPATH\fR\fR
+.RS 4
+Use a TPM2 device instead of a password/passhprase read from stdin to unlock the volume\&. Expects a device node path referring to the TPM2 chip (e\&.g\&.
+/dev/tpmrm0)\&. Alternatively the special value
+"auto"
+may be specified, in order to automatically determine the device node of a currently discovered TPM2 device (of which there must be exactly one)\&.
+.sp
+Added in version 256\&.
+.RE
+.PP
+\fB\-\-pkcs11\-token\-uri=\fR\fB\fIURI\fR\fR
.RS 4
-Enroll a PKCS#11 security token or smartcard (e\&.g\&. a YubiKey)\&. Expects a PKCS#11 smartcard URI referring to the token\&. Alternatively the special value
+Enroll a PKCS#11 security token or smartcard (e\&.g\&. a YubiKey)\&. Expects a PKCS#11 URI that allows finding an X\&.509 certificate or a public key on the token\&. The URI must also be suitable to find a related private key after changing the type of object in it\&. Alternatively the special value
"auto"
-may be specified, in order to automatically determine the URI of a currently plugged in security token (of which there must be exactly one)\&. The special value
+may be specified, in order to automatically determine the suitable URI if a single security token containing a single key pair is plugged in\&. The special value
"list"
-may be used to enumerate all suitable PKCS#11 tokens currently plugged in\&. The security token must contain an RSA key pair which is used to encrypt the randomly generated key that is used to unlock the LUKS2 volume\&. The encrypted key is then stored in the LUKS2 JSON token header area\&.
+may be used to enumerate all suitable PKCS#11 tokens currently plugged in\&.
+.sp
+The PKCS#11 token must contain an RSA or EC key pair which will be used to unlock a LUKS2 volume\&. For RSA, a randomly generated volume key is encrypted with a public key in the token, and stored in the LUKS2 JSON token header area\&. To unlock a volume, the stored encrypted volume key will be decrypted with a private key in the token\&. For ECC, ECDH algorithm is used: we generate a pair of EC keys in the same EC group, then derive a shared secret using the generated private key and the public key in the token\&. The derived shared secret is used as a volume key\&. The generated public key is stored in the LUKS2 JSON token header area\&. The generated private key is erased\&. To unlock a volume, we derive the shared secret with the stored public key and a private key in the token\&.
.sp
In order to unlock a LUKS2 volume with an enrolled PKCS#11 security token, specify the
\fBpkcs11\-uri=\fR
@@ -379,7 +398,7 @@ line\&.
Added in version 248\&.
.RE
.PP
-\fB\-\-fido2\-credential\-algorithm=\fR\fISTRING\fR
+\fB\-\-fido2\-credential\-algorithm=\fR\fB\fISTRING\fR\fR
.RS 4
Specify COSE algorithm used in credential generation\&. The default value is
"es256"\&. Supported values are
@@ -395,12 +414,12 @@ denotes 2048\-bit RSA with PKCS#1\&.5 padding and SHA\-256\&.
"eddsa"
denotes EDDSA over Curve25519 with SHA\-512\&.
.sp
-Note that your authenticator may not support some algorithms\&.
+Note that your authenticator may choose not to support some algorithms\&.
.sp
Added in version 251\&.
.RE
.PP
-\fB\-\-fido2\-device=\fR\fIPATH\fR
+\fB\-\-fido2\-device=\fR\fB\fIPATH\fR\fR
.RS 4
Enroll a FIDO2 security token that implements the
"hmac\-secret"
@@ -442,7 +461,7 @@ line\&.
Added in version 248\&.
.RE
.PP
-\fB\-\-fido2\-with\-client\-pin=\fR\fIBOOL\fR
+\fB\-\-fido2\-with\-client\-pin=\fR\fB\fIBOOL\fR\fR
.RS 4
When enrolling a FIDO2 security token, controls whether to require the user to enter a PIN when unlocking the volume (the FIDO2
"clientPin"
@@ -454,7 +473,7 @@ feature at all, or does not allow enabling or disabling it\&.)
Added in version 249\&.
.RE
.PP
-\fB\-\-fido2\-with\-user\-presence=\fR\fIBOOL\fR
+\fB\-\-fido2\-with\-user\-presence=\fR\fB\fIBOOL\fR\fR
.RS 4
When enrolling a FIDO2 security token, controls whether to require the user to verify presence (tap the token, the FIDO2
"up"
@@ -466,7 +485,7 @@ feature at all, or does not allow enabling or disabling it\&.)
Added in version 249\&.
.RE
.PP
-\fB\-\-fido2\-with\-user\-verification=\fR\fIBOOL\fR
+\fB\-\-fido2\-with\-user\-verification=\fR\fB\fIBOOL\fR\fR
.RS 4
When enrolling a FIDO2 security token, controls whether to require user verification when unlocking the volume (the FIDO2
"uv"
@@ -478,7 +497,7 @@ feature at all, or does not allow enabling or disabling it\&.)
Added in version 249\&.
.RE
.PP
-\fB\-\-tpm2\-device=\fR\fIPATH\fR
+\fB\-\-tpm2\-device=\fR\fB\fIPATH\fR\fR
.RS 4
Enroll a TPM2 security chip\&. Expects a device node path referring to the TPM2 chip (e\&.g\&.
/dev/tpmrm0)\&. Alternatively the special value
@@ -518,7 +537,7 @@ Use
Added in version 248\&.
.RE
.PP
-\fB\-\-tpm2\-device\-key=\fR\fIPATH\fR
+\fB\-\-tpm2\-device\-key=\fR\fB\fIPATH\fR\fR
.RS 4
Enroll a TPM2 security chip using its public key\&. Expects a path referring to the TPM2 public key in TPM2B_PUBLIC format\&. This cannot be used with
\fB\-\-tpm2\-device=\fR, as it performs the same operation, but without connecting to the TPM2 security chip; instead the enrollment is calculated using the provided TPM2 key\&. This is useful in situations where the TPM2 security chip is not available at the time of enrollment\&.
@@ -551,7 +570,7 @@ systemd\-analyze srk > srk\&.tpm2b_public
Added in version 255\&.
.RE
.PP
-\fB\-\-tpm2\-seal\-key\-handle=\fR\fIHANDLE\fR
+\fB\-\-tpm2\-seal\-key\-handle=\fR\fB\fIHANDLE\fR\fR
.RS 4
Configures which parent key to use for sealing, using the TPM handle (index) of the key\&. This is used to "seal" (encrypt) a secret and must be used later to "unseal" (decrypt) the secret\&. Expects a hexadecimal 32bit integer, optionally prefixed with
"0x"\&. Allowable values are any handle index in the persistent ("0x81000000"\-"0x81ffffff") or transient ("0x80000000"\-"0x80ffffff") ranges\&. Since transient handles are lost after a TPM reset, and may be flushed during TPM context switching, they should not be used except for very specific use cases, e\&.g\&. testing\&.
@@ -564,7 +583,7 @@ This should not be changed unless you know what you are doing\&.
Added in version 255\&.
.RE
.PP
-\fB\-\-tpm2\-pcrs=\fR [PCR...]
+\fB\-\-tpm2\-pcrs=\fR\fB\fIPCR\fR\fI[+PCR\&.\&.\&.]\fR\fR
.RS 4
Configures the TPM2 PCRs (Platform Configuration Registers) to bind to when enrollment is requested via
\fB\-\-tpm2\-device=\fR\&. Takes a list of PCR entries, where each entry starts with a name or numeric index in the range 0\&...23, optionally followed by
@@ -589,7 +608,7 @@ specifies that PCR register 4 from the SHA1 bank should be used, and a hash dige
Added in version 248\&.
.RE
.PP
-\fB\-\-tpm2\-with\-pin=\fR\fIBOOL\fR
+\fB\-\-tpm2\-with\-pin=\fR\fB\fIBOOL\fR\fR
.RS 4
When enrolling a TPM2 device, controls whether to require the user to enter a PIN when unlocking the volume in addition to PCR binding, based on TPM2 policy authentication\&. Defaults to
"no"\&. Despite being called PIN, any character can be used, not just numbers\&.
@@ -605,7 +624,7 @@ commands, respectively\&.
Added in version 251\&.
.RE
.PP
-\fB\-\-tpm2\-public\-key=\fR [PATH], \fB\-\-tpm2\-public\-key\-pcrs=\fR [PCR...], \fB\-\-tpm2\-signature=\fR [PATH]
+\fB\-\-tpm2\-public\-key=\fR\fB\fIPATH\fR\fR, \fB\-\-tpm2\-public\-key\-pcrs=\fR\fB\fIPCR\fR\fI[+PCR\&.\&.\&.]\fR\fR, \fB\-\-tpm2\-signature=\fR\fB\fIPATH\fR\fR
.RS 4
Configures a TPM2 signed PCR policy to bind encryption to\&. The
\fB\-\-tpm2\-public\-key=\fR
@@ -643,7 +662,7 @@ is searched for in
Added in version 252\&.
.RE
.PP
-\fB\-\-tpm2\-pcrlock=\fR [PATH]
+\fB\-\-tpm2\-pcrlock=\fR\fB\fIPATH\fR\fR
.RS 4
Configures a TPM2 pcrlock policy to bind encryption to\&. Expects a path to a pcrlock policy file as generated by the
\fBsystemd-pcrlock\fR(1)
@@ -658,7 +677,7 @@ it is automatically used\&. Assign an empty string to turn this behaviour off\&.
Added in version 255\&.
.RE
.PP
-\fB\-\-wipe\-slot=\fR [SLOT...]
+\fB\-\-wipe\-slot=\fR\fB\fISLOT\fR\fI[,SLOT\&.\&.\&.]\fR\fR
.RS 4
Wipes one or more LUKS2 key slots\&. Takes a comma separated list of numeric slot indexes, or the special strings
"all"
@@ -724,6 +743,42 @@ Print a short help text and exit\&.
.RS 4
Print a short version string and exit\&.
.RE
+.SH "CREDENTIALS"
+.PP
+\fBsystemd\-cryptenroll\fR
+supports the service credentials logic as implemented by
+\fIImportCredential=\fR/\fILoadCredential=\fR/\fISetCredential=\fR
+(see
+\fBsystemd.exec\fR(5)
+for details)\&. The following credentials are used when passed in:
+.PP
+\fIcryptenroll\&.passphrase\fR, \fIcryptenroll\&.new\-passphrase\fR
+.RS 4
+May contain the passphrase to unlock the volume with/to newly enroll\&.
+.sp
+Added in version 256\&.
+.RE
+.PP
+\fIcryptenroll\&.tpm2\-pin\fR, \fIcryptenroll\&.new\-tpm2\-pin\fR
+.RS 4
+May contain the TPM2 PIN to unlock the volume with/to newly enroll\&.
+.sp
+Added in version 256\&.
+.RE
+.PP
+\fIcryptenroll\&.fido2\-pin\fR
+.RS 4
+If a FIDO2 token is enrolled this may contain the PIN of the token\&.
+.sp
+Added in version 256\&.
+.RE
+.PP
+\fIcryptenroll\&.pkcs11\-pin\fR
+.RS 4
+If a PKCS#11 token is enrolled this may contain the PIN of the token\&.
+.sp
+Added in version 256\&.
+.RE
.SH "EXIT STATUS"
.PP
On success, 0 is returned, a non\-zero failure code otherwise\&.
@@ -736,11 +791,7 @@ contain various examples employing
\fBsystemd\-cryptenroll\fR\&.
.SH "SEE ALSO"
.PP
-\fBsystemd\fR(1),
-\fBsystemd-cryptsetup@.service\fR(8),
-\fBcrypttab\fR(5),
-\fBcryptsetup\fR(8),
-\fBsystemd-measure\fR(1)
+\fBsystemd\fR(1), \fBsystemd-cryptsetup@.service\fR(8), \fBcrypttab\fR(5), \fBcryptsetup\fR(8), \fBsystemd-measure\fR(1)
.SH "NOTES"
.IP " 1." 4
Linux TPM PCR Registry