| NVME-KEYS-GEN-TLS(1) | NVMe Manual | NVME-KEYS-GEN-TLS(1) |
NAME
nvme-keys-gen-tls-psk - Generate a NVMe TLS PSK
SYNOPSIS
nvme [<global-options>] keys gen-tls-psk [--keyring=<name> | -k <name>]
[--keytype=<type> | -t <type>]
[--hostnqn=<nqn> | -n <nqn>]
[--subsysnqn=<nqn> | -c <nqn>]
[--hmac=<hmac-id> | -m <hmac-id>]
[--identity=<id-vers> | -I <id-vers>]
[--secret=<secret> | -s <secret>]
[--insert | -i]
[--compat | -C]
[--keyfile=<keyfile> | -f <keyfile>]
DESCRIPTION
Generate a NVMe TLS configured PSK and print it in the PSK interchange format NVMeTLSkey-1:<hmac>:<base64 encoded data>:. If the --insert option is given a retained PSK is additionally derived from the configured PSK and the host NQN, using the HKDF-Expand-Label algorithm from RFC 8446, the TLS PSK is derived from it, and that is stored in the specified keyring under an identity computed from the host NQN and the subsystem NQN: NVMe0R<hmac> <host NQN> <subsystem NQN> (for identity version 0) or NVMe1R<hmac> <host NQN> <subsystem NQN> <PSK digest> (for identity version 1). Once the TLS PSK is stored in the keyring the configured PSK it was derived from cannot be retrieved from the keyring.
The diagnostics that validate --secret are printed to stdout rather than stderr. Most of them accompany a non-zero exit, but Skipping excess secret bytes does not: an over-long --secret still exits 0, with the warning sitting ahead of the key, so a script reading the key off stdout gets the warning instead.
Both NQNs are inputs to the TLS PSK itself, not just to the identity it is stored under: the host NQN through the retained PSK derivation, and both NQNs again through the identity (identity version 0) or the PSK digest it embeds (identity version 1), which is the context of the TLS PSK derivation.
OPTIONS
-k <name>, --keyring=<name>
-t <type>, --keytype=<type>
-n <nqn>, --hostnqn=<nqn>
-c <nqn>, --subsysnqn=<nqn>
-m <hmac-id>, --hmac=<hmac-id>
-I <id-vers>, --identity=<id-vers>
-s <secret>, --secret=<secret>
-i, --insert
-C, --compat
-f <keyfile>, --keyfile=<keyfile>
GLOBAL OPTIONS
The following options are defined at the top-level nvme command and are available to this subcommand:
--dry-run
--no-ioctl-probing
--no-retries
-o <fmt>, --output-format=<fmt>
--output-format-version=<version>
--timeout=<ms>
-v, --verbose
These options can also be set as machine-wide defaults in nvme-cli.conf(5). A command-line flag always overrides the file.
EXAMPLES
No Examples
NVME
Part of the nvme-user suite
| 09/07/2026 | NVMe |