nvme_auth_derive_tls_psk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ nvme_auth_derive_tls_psk(9) β€” Kernel API Manual πŸŽ€

okay so bestie, this page is from the Kernel API Manual, and the icon is nvme_auth_derive_tls_psk β€” she’s literally here to Derive TLS PSK. crypto girl summer, no cap. πŸ’…βœ¨


🌸 NAME 🌸

  • nvme_auth_derive_tls_psk β€” Derive TLS PSK

✨ SYNOPSIS ✨

int nvme_auth_derive_tls_psk (int hmac_id , const u8 *psk , size_t
       psk_len , const char *psk_digest , u8 **ret_psk );

🫢 ARGUMENTS 🫢

  • hmac_id β€” Hash function identifier. like, which hash function we’re using, bestie.
  • psk β€” generated input PSK. yep, that’s the PSK going in.
  • psk_len β€” size of psk. literally how big the psk is.
  • psk_digest β€” TLS PSK digest. the digest, periodt.
  • ret_psk β€” Pointer to the resulting TLS PSK. where the resulting TLS PSK pointer lands.

🧚 DESCRIPTION 🧚

okay so here’s the tea: you derive a TLS PSK as specified in TP8018 Section 3.6.1.3: TLS PSK and PSK identity Derivation.

The TLS PSK shall be derived as follows from an input PSK (i.e., either a retained PSK or a generated PSK) and a PSK identity using the HKDF-Extract and HKDF-Expand-Label operations (refer to RFC 5869 and RFC 8446), where the hash function is the one specified by the hash specifier of the PSK identity:

  1. PRK = HKDF-Extract(0, Input PSK); and
  2. TLS PSK = HKDF-Expand-Label(PRK, "nvme-tls-psk", PskIdentityContext, L), where PskIdentityContext is the hash identifier indicated in the PSK identity concatenated to a space character and to the Base64 PSK digest (i.e., "<hash> <PSK digest>") and L is the output size in bytes of the hash function (i.e., 32 for SHA-256 and 48 for SHA-384).

She returns 0 on success with a valid psk pointer in ret_psk, or a negative error number otherwise. that’s the whole vibe check. πŸ’–

πŸ”— SEE ALSO πŸ”—

okay bye bestie πŸ’– source/version: ./drivers/nvme/common; date: October 2026 🫢

πŸ“¦ where this page comes from