Esys_StartAuthSession(3)
β¨ Esys_StartAuthSession(3) β¨
okay bestie so this page is straight out of the Library Functions Manual, and it's literally the whole ESAPI glow-up for the TPM2_StartAuthSession command. it's giving "let's open a session with the TPM" and honestly? iconic. no cap, everything you need is right here π
π NAME π
Esys_StartAuthSession β the ESAPI function for the TPM2_StartAuthSession command. periodt.
πΈ SYNOPSIS πΈ
Functions
TSS2_RC Esys_StartAuthSession_Async (ESYS_CONTEXT *esysContext, ESYS_TR
tpmKey, ESYS_TR bind, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR
shandle3, const TPM2B_NONCE *nonceCaller, TPM2_SE sessionType, const
TPMT_SYM_DEF *symmetric, TPMI_ALG_HASH authHash)
TSS2_RC Esys_StartAuthSession (ESYS_CONTEXT *esysContext, ESYS_TR
tpmKey, ESYS_TR bind, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR
shandle3, const TPM2B_NONCE *nonceCaller, TPM2_SE sessionType, const
TPMT_SYM_DEF *symmetric, TPMI_ALG_HASH authHash, ESYS_TR
*sessionHandle)
TSS2_RC Esys_StartAuthSession_Finish (ESYS_CONTEXT *esysContext, ESYS_TR
*sessionHandle)
π¦ Detailed Description π¦
it's the ESAPI function for invoking the TPM2_StartAuthSession command β and you get to pick your vibe: either the one-call route, or the asynchronous route. choose your fighter π«Ά
π Function Documentation π
β TSS2_RC Esys_StartAuthSession (ESYS_CONTEXT * esysContext, ESYS_TR tpmKey, ESYS_TR bind, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE * nonceCaller, TPM2_SE sessionType, const TPMT_SYM_DEF * symmetric, TPMI_ALG_HASH authHash, ESYS_TR * sessionHandle)
one-call function for TPM2_StartAuthSession β main character energy fr.
this one invokes the TPM2_StartAuthSession command in a one-call variant, which lowkey means the function will block until the TPM response is available. all input parameters are const. the memory for non-simple output parameters is allocated by the function implementation. π«
Parameters
esysContextβ theESYS_CONTEXT.tpmKeyβ handle of a loaded decrypt key used to encrypt salt.bindβ entity providing theauthValue.shandle1β first session handle.shandle2β second session handle.shandle3β third session handle.nonceCallerβ initialnonceCaller, setsnonceTPMsize for the session.sessionTypeβ indicates the type of the session; simple HMAC or policy (including a trial policy).symmetricβ the algorithm and key size for parameter encryption.authHashβ hash algorithm to use for the session.sessionHandleβESYS_TRhandle of ESYS resource forTPMI_SH_AUTH_SESSION.
Return values
TSS2_RC_SUCCESSβ if the function call was a success. πTSS2_ESYS_RC_BAD_REFERENCEβ if theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption is detected. πTSS2_ESYS_RC_MEMORYβ if the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending. not me doing two things at once πTSS2_ESYS_RC_INSUFFICIENT_RESPONSEβ if the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_MALFORMED_RESPONSEβ if the TPM's response is corrupted.TSS2_ESYS_RC_RSP_AUTH_FAILEDβ if the response HMAC from the TPM did not verify. πTSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSβ if more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSβ if more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRβ if any of theESYS_TRobjects are unknown to theESYS_CONTEXTor are of the wrong type or if requiredESYS_TRobjects areESYS_TR_NONE.TSS2_RCsproduced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.
β TSS2_RC Esys_StartAuthSession_Async (ESYS_CONTEXT * esysContext, ESYS_TR tpmKey, ESYS_TR bind, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE * nonceCaller, TPM2_SE sessionType, const TPMT_SYM_DEF * symmetric, TPMI_ALG_HASH authHash)
asynchronous function for TPM2_StartAuthSession β the "send it and dip" option πββοΈπ¨
this one invokes the TPM2_StartAuthSession command in an asynchronous variant, so the function will return as soon as the command has been sent downwards the stack to the TPM. all input parameters are const. in order to retrieve the TPM's response, call Esys_StartAuthSession_Finish. iykyk β¨
Parameters
esysContextβ theESYS_CONTEXT.tpmKeyβ handle of a loaded decrypt key used to encrypt salt.bindβ entity providing theauthValue.shandle1β first session handle.shandle2β second session handle.shandle3β third session handle.nonceCallerβ initialnonceCaller, setsnonceTPMsize for the session.sessionTypeβ indicates the type of the session; simple HMAC or policy (including a trial policy).symmetricβ the algorithm and key size for parameter encryption.authHashβ hash algorithm to use for the session.
Return values
ESYS_RC_SUCCESSβ if the function call was a success. πTSS2_ESYS_RC_BAD_REFERENCEβ if theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYβ if the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_RCsproduced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSβ if more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSβ if more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRβ if any of theESYS_TRobjects are unknown to theESYS_CONTEXTor are of the wrong type or if requiredESYS_TRobjects areESYS_TR_NONE.
β TSS2_RC Esys_StartAuthSession_Finish (ESYS_CONTEXT * esysContext, ESYS_TR * sessionHandle)
asynchronous finish function for TPM2_StartAuthSession β the "okay so what did the TPM say" moment π«Ά
this function returns the results of a TPM2_StartAuthSession command invoked via Esys_StartAuthSession_Finish. all non-simple output parameters are allocated by the function's implementation. and listen β NULL can be passed for every output parameter if the value is not required. convenient much? π
heads up bestie: yes, the doc literally says the command was invoked via Esys_StartAuthSession_Finish. that's just what's written here, we're not gonna fight it π
Parameters
esysContextβ theESYS_CONTEXT.sessionHandleβESYS_TRhandle of ESYS resource forTPMI_SH_AUTH_SESSION.
Return values
TSS2_RC_SUCCESSβ on success β¨ESYS_RC_SUCCESSβ if the function call was a success.TSS2_ESYS_RC_BAD_REFERENCEβ if theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTβ ifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYβ if the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending.TSS2_ESYS_RC_TRY_AGAINβ if the timeout counter expires before the TPM response is received. β³TSS2_ESYS_RC_INSUFFICIENT_RESPONSEβ if the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_RSP_AUTH_FAILEDβ if the response HMAC from the TPM did not verify.TSS2_ESYS_RC_MALFORMED_RESPONSEβ if the TPM's response is corrupted. πTSS2_RCsproduced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.
π Author π
generated automatically by Doxygen for tpm2-tss from the source code. slay, robot. π€π
and that's the page!! this beauty comes to you from tpm2-tss, Version 4.1.5, and it's filed under Esys_StartAuthSession(3) in the Library Functions Manual. go forth and start those auth sessions, bestie β you're literally gonna ate this πβ¨π¦π
π¦ where this page comes from
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms