NVME-KEYS-GEN-KXC(1) NVMe Manual NVME-KEYS-GEN-KXC(1)

# [NAME](#NAME)

nvme-keys-gen-kxchap-secret - Generate a host KX-HMAC-CHAP secret

# [SYNOPSIS](#SYNOPSIS)

```
nvme [<global-options>] keys gen-kxchap-secret [--hmac=<hmac-id> | -m <hmac-id>]


                        [--secret=<secret> | -s <secret>]


                        [--secret-length=<len> | -l <len>]
```

# [DESCRIPTION](#DESCRIPTION)

Generate a KX-HMAC-CHAP secret in the DHHC-1 secret representation defined by the NVM Express Base Specification 2.4, section 8.3.4.5.8, in the form: DHHC-1:00:ia6zGodOr4SEG0Zzaw398rpY0wqipUWj4jWjUh4HWUz6aQ2n: and prints it to stdout.

# [OPTIONS](#OPTIONS)

-m &lt;hmac-id&gt;, --hmac=&lt;hmac-id&gt;

Select the hash function the consumer is to apply to the secret. Possible values are: 0 - No transformation (the secret is used as the key) 1 - SHA-256 2 - SHA-384 3 - SHA-512

-s &lt;secret&gt;, --secret=&lt;secret&gt;

Secret value (in hexadecimal) to be placed in the representation. If none are provided a random value is used.

-l &lt;len&gt;, --secret-length=&lt;len&gt;

Length of the secret. Possible values are 32, 48, or 64. A secret given with *--secret* as hexadecimal fixes the length, so a value contradicting it is an error; a secret generated here takes this length, defaulting to the digest size of the selected hash function, or 32 if none is selected.

# [GLOBAL OPTIONS](#GLOBAL_OPTIONS)

The following options are defined at the top-level nvme command and are available to this subcommand:

--dry-run

Print the command that would be executed, but do not actually execute it.

--no-ioctl-probing

Disable probing for 64-bit IOCTL support.

--no-retries

Disable retry logic on transient errors.

-o &lt;fmt&gt;, --output-format=&lt;fmt&gt;

Set the reporting format to *normal*, *tabular, 'json*, or *binary*. Only one output format may be used at a time.

--output-format-version=&lt;version&gt;

Select the output format version. Version *1* uses the original field naming, while version *2* (default) provides more consistent and script-friendly field names.

--timeout=&lt;ms&gt;

Set the timeout for the command in milliseconds.

-v, --verbose

Increase the level of detail in the output. May be specified multiple times to further increase verbosity.

These options can also be set as machine-wide defaults in [nvme-cli.conf(5)](/man/os/nvme-cli/nvme-cli.conf.5). A command-line flag always overrides the file.

# [EXAMPLES](#EXAMPLES)

No Examples

# [NVME](#NVME)

Part of the nvme-user suite

09/18/2026 NVMe

---

Document: nvme-keys-gen-kxchap-secret(1) from nvme-cli 3.1-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
