NVME-KEYS-GEN-KXC(1)
π NVME-KEYS-GEN-KXC(1) β the nvme-keys-gen-kxchap-secret glow-up β¨
okay so bestie, welcome to the nvme-keys-gen-kxchap-secret page from the NVMe Manual β yes that NVMe, the storage one, and yes this is the cutest little secret-generator you've ever met π
πΈ NAME πΈ
nvme-keys-gen-kxchap-secret β generate a host KX-HMAC-CHAP secret, no cap π
β¨ SYNOPSIS β¨
nvme [<global-options>] keys gen-kxchap-secret [--hmac=<hmac-id> | -m <hmac-id>]
[--secret=<secret> | -s <secret>]
[--secret-length=<len> | -l <len>]
like, that's the whole vibe. three optional lil flags, all chill π¦
π DESCRIPTION π
So what this does: it generates a KX-HMAC-CHAP secret in the DHHC-1 secret representation β which is defined by the NVM Express Base Specification 2.4, section 8.3.4.5.8 β and it formats it exactly like this:
DHHC-1:00:ia6zGodOr4SEG0Zzaw398rpY0wqipUWj4jWjUh4HWUz6aQ2n:
and then it prints it to stdout. that's it. that's the whole main character moment π note the trailing colon in the form there β that's part of the look, don't @ me.
π«Ά OPTIONS π«Ά
-m <hmac-id>,--hmac=<hmac-id>β picks the hash function that the consumer is supposed to apply to the secret. the possible values are:0β No transformation (the secret is used as the key)1β SHA-2562β SHA-3843β SHA-512
-s <secret>,--secret=<secret>β the actual secret value (in hexadecimal) that gets placed in the representation. and if you don't provide one? a random value is used. spontaneous. iconic. π-l <len>,--secret-length=<len>β the length of the secret. possible values are32,48, or64. two things to know, bestie:- if you hand it a secret with
--secretin hexadecimal, that fixes the length β so a value that contradicts it is an error π - a secret generated here takes this length, defaulting to the digest size of the selected hash function, or
32if none is selected. so if you're indecisive, it's got you π
- if you hand it a secret with
π GLOBAL OPTIONS π
These ones are defined at the top-level nvme command, and they're available to this subcommand too β like the big sisters of the group chat:
--dry-runβ print the command that would be executed, but don't actually execute it. all talk, no action, we love a preview π--no-ioctl-probingβ disable probing for 64-bit IOCTL support.--no-retriesβ disable retry logic on transient errors. one shot, one opportunity.-o <fmt>,--output-format=<fmt>β set the reporting format tonormal,tabular,'json, orbinary. only one output format may be used at a time, so pick your fighter β¨ (yes, that apostrophe beforejsonis in the original, we don't fix what isn't ours π)--output-format-version=<version>β select the output format version. version1uses the original field naming, while version2(the default) provides more consistent and script-friendly field names. other versions are rejected. sorry to those versions π--quietβ suppress informational messages. errors are still reported, and--quietcancels any--verbosefor the library log level. the quiet friend who still tells you when something's actually wrong π¦--set-options=<key=value>[,<key=value>...]β set libnvme library options for this invocation. the supported keys areforce-4k,mi-probe-enabled,test-base-dirandtest-sysfs-dir.--timeout=<ms>β set the timeout for the command in milliseconds.infiniteor-1waits without a time limit (0xffffffff). patience is a virtue ngl β-v,--verboseβ increase the level of detail in the output. may be specified multiple times to further increase verbosity. stack 'em like bracelets π
Also important: these options can be set as machine-wide defaults in nvme-cli.conf(5), and a command-line flag always overrides the file. flags win, periodt π
π₯ EXAMPLES π₯
No Examples
(that's genuinely what the page says β the examples section is just vibing empty, and honestly? respect π§)
π NVME π
Part of the nvme-user suite β you're in good company, bestie π
and that's the page! this one came from the NVMe crew, dated 10/30/2026, and that's genuinely the whole thing β go generate a secret, you've got this πΈβ¨
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms