NVME-KEYS-GEN-KXC(1)

πŸ“¦ version 3.2, in arch rolling

πŸ’… 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-256
    • 2 β€” SHA-384
    • 3 β€” 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 are 32, 48, or 64. two things to know, bestie:
    • if you hand it a secret with --secret in 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 32 if none is selected. so if you're indecisive, it's got you πŸ“

🌈 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 to normal, tabular, 'json, or binary. only one output format may be used at a time, so pick your fighter ✨ (yes, that apostrophe before json is in the original, we don't fix what isn't ours πŸŽ€)
  • --output-format-version=<version> β€” select the output format version. version 1 uses the original field naming, while version 2 (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 --quiet cancels any --verbose for 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 are force-4k, mi-probe-enabled, test-base-dir and test-sysfs-dir.
  • --timeout=<ms> β€” set the timeout for the command in milliseconds. infinite or -1 waits 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