tpm2_start_auth_session(9)
β¨ tpm2_start_auth_session(9) β¨
okay so bestie, we're in the Kernel API Manual today β like, the tpm2_start_auth_session(9) section specifically β and it's giving very much "kernel dev doing crypto things at 2am" energy π
don't worry tho, i got you π«Ά
πΈ NAME πΈ
tpm2_start_auth_session β literally creates an HMAC authentication session π yes, that's the whole vibe, that's what it does, periodt.
π SYNOPSIS π
int tpm2_start_auth_session (struct tpm_chip *chip );
that's it. that's the whole call. one arg, returns an int. iconic minimalism honestly β¨
π¦ ARGUMENTS π¦
chipβ a TPM chip π§ that's it, that's the parameter, it's your chip and she's astruct tpm_chip *
π DESCRIPTION π
okay so here's what actually happens, no cap:
she loads the ephemeral key β that's the null seed π± β and then starts up an HMAC authenticated session π like, the session is now officially a thing, main character energy fr fr.
and then, the plot twist π: the null seed is flushed before the return. so by the time this function hands control back to you, that seed? gone. wiped. not invited to the afterparty π keep that in mind, it's lowkey important iykyk.
returns zero on success π or a POSIX error code if things went sideways π (we love a clear error contract, highkey obsessed.)
bestie pls remember: zero = slay, anything else = check your error codes, don't just ignore the return value π«Ά
π₯ SEE ALSO π₯
all the siblings in the same kernel file, ./drivers/char/tpm/tpm2-sessions.c β go read the whole family, they're all connected:
tpm_buf_append_name(9)tpm_buf_append_hmac_session(9)tpm_buf_fill_hmac_session(9)tpm_buf_check_hmac_response(9)tpm2_end_auth_session(9)tpm2_parse_create_primary(9)tpm2_create_primary(9)tpm2_sessions_init(9)
πΈ mwah, that's the whole page πΈ
and that's a wrap on our little kernel session π this one lives over in ./drivers/char/tpm, and the manual's dated October 2026 β so like, future-coded but make it TPM β go forth and authenticate responsibly, bestie ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms