nvme_auth_generate_psk(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’– NAME ๐Ÿ’–

okay so bestie, meet nvme_auth_generate_psk โ€” this is the nvme_auth_generate_psk(9) page from the Kernel API Manual, and it is literally here to generate a PSK for TLS โœจ


๐Ÿ“œ SYNOPSIS ๐Ÿ“œ

int nvme_auth_generate_psk (u8 hmac_id , const u8 *skey , size_t
skey_len , const u8 *c1 , const u8 *c2 , size_t hash_len , u8 **ret_psk
, size_t *ret_len );

๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • hmac_id โ€” Hash function identifier ๐Ÿ”‘
  • skey โ€” Session key ๐Ÿ—๏ธ
  • skey_len โ€” Length of skey ๐Ÿ“
  • c1 โ€” Value of challenge C1 ๐ŸŽฏ
  • c2 โ€” Value of challenge C2 ๐ŸŽฏ
  • hash_len โ€” Hash length of the hash algorithm ๐Ÿงฎ
  • ret_psk โ€” Pointer to the resulting generated PSK ๐Ÿซถ
  • ret_len โ€” length of ret_psk ๐Ÿ“

๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so hereโ€™s the tea: this function generates a PSK for TLS as specified in the NVMe base specification, section 8.13.5.9: Generated PSK for TLS. iconic behavior, honestly ๐Ÿ’…

The generated PSK for TLS shall be computed applying the HMAC function using the hash function H( ) selected by the HashID parameter in the DH-HMAC-CHAP_Challenge message with the session key KS as key to the concatenation of the two challenges C1 and C2 (i.e., generated PSK = HMAC(KS, C1 || C2)). ๐Ÿงšโœจ

Returns 0 on success with a valid generated PSK pointer in ret_psk and the length of ret_psk in ret_len, or a negative error number otherwise. ๐Ÿ’€


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


mwah ๐Ÿ’‹ โ€” source/version ./drivers/nvme/common, October 2026, bestie ๐Ÿซถ

๐Ÿ“ฆ where this page comes from