Esys_ZGen_2Phase(3)
π Esys_ZGen_2Phase β the TPM2_ZGen_2Phase ESAPI glow-up π
okay so bestie, this page lives in the Library Functions Manual for tpm2-tss, and it's literally all about Esys_ZGen_2Phase(3) β the ESAPI function that calls the TPM2_ZGen_2Phase command. no cap, that's the whole vibe. π¦
β¨ NAME β¨
Esys_ZGen_2Phase β the ESAPI function for the TPM2_ZGen_2Phase command. that's it, that's the name, she's iconic π
πΈ SYNOPSIS πΈ
π Functions π
TSS2_RC Esys_ZGen_2Phase_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyA,
ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const
TPM2B_ECC_POINT *inQsB, const TPM2B_ECC_POINT *inQeB,
TPMI_ECC_KEY_EXCHANGE inScheme, UINT16 counter)
TSS2_RC Esys_ZGen_2Phase (ESYS_CONTEXT *esysContext, ESYS_TR keyA,
ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const
TPM2B_ECC_POINT *inQsB, const TPM2B_ECC_POINT *inQeB,
TPMI_ECC_KEY_EXCHANGE inScheme, UINT16 counter, TPM2B_ECC_POINT
**outZ1, TPM2B_ECC_POINT **outZ2)
TSS2_RC Esys_ZGen_2Phase_Finish (ESYS_CONTEXT *esysContext,
TPM2B_ECC_POINT **outZ1, TPM2B_ECC_POINT **outZ2)
π« Detailed Description π«
okay so real talk: this is the ESAPI function you use to invoke the TPM2_ZGen_2Phase command β and you've got options, bestie. you can do it as a one-call situation (blocking, simple, cute) or in an asynchronous manner (fire it off and come back later, main character energy). β¨
π₯ Function Documentation π₯
π§ TSS2_RC Esys_ZGen_2Phase (ESYS_CONTEXT * esysContext, ESYS_TR keyA, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT * inQsB, const TPM2B_ECC_POINT * inQeB, TPMI_ECC_KEY_EXCHANGE inScheme, UINT16 counter, TPM2B_ECC_POINT ** outZ1, TPM2B_ECC_POINT ** outZ2) π§
One-Call function for TPM2_ZGen_2Phase β the "just do it all in one go" version. π
this function invokes the TPM2_ZGen_2Phase command in a one-call variant. what that means: the function will block until the TPM response is available, so like, sit tight, she's working on it. π all input parameters are const. and the memory for non-simple output parameters is allocated by the function implementation β so the callee's got you, you don't have to malloc anything yourself. periodt.
π«Ά Parameters π«Ά
esysContextβ TheESYS_CONTEXT.keyAβ handle of an unrestricted decryption key ECC.shandle1β session handle for authorization ofkeyA.shandle2β second session handle.shandle3β third session handle.inQsBβ other party's static public key (Qs,B = (Xs,B, Ys,B)).inQeBβ other party's ephemeral public key (Qe,B = (Xe,B, Ye,B)).inSchemeβ the key exchange scheme.counterβ value returned byTPM2_EC_Ephemeral().outZ1β X and Y coordinates of the computed value (scheme dependent). (callee-allocated)outZ2β X and Y coordinates of the second computed value (scheme dependent). (callee-allocated)
π Return values π
TSS2_RC_SUCCESSβ if the function call was a success. slay. β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. one thing at a time, bestie.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_RCs produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. (iykyk) π
π TSS2_RC Esys_ZGen_2Phase_Async (ESYS_CONTEXT * esysContext, ESYS_TR keyA, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT * inQsB, const TPM2B_ECC_POINT * inQeB, TPMI_ECC_KEY_EXCHANGE inScheme, UINT16 counter) π
Asynchronous function for TPM2_ZGen_2Phase β the "text you later" version. π¦
this function invokes the TPM2_ZGen_2Phase command in an asynchronous variant. translation: the function will return as soon as the command has been sent downwards the stack to the TPM β she does not wait around. β¨ all input parameters are const. and in order to retrieve the TPM's response, you call Esys_ZGen_2Phase_Finish. don't forget, bestie, or you'll just be standing there with no results π
π«Ά Parameters π«Ά
esysContextβ TheESYS_CONTEXT.keyAβ handle of an unrestricted decryption key ECC.shandle1β session handle for authorization ofkeyA.shandle2β second session handle.shandle3β third session handle.inQsBβ other party's static public key (Qs,B = (Xs,B, Ys,B)).inQeBβ other party's ephemeral public key (Qe,B = (Xe,B, Ye,B)).inSchemeβ the key exchange scheme.counterβ value returned byTPM2_EC_Ephemeral().
π 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_RCs produced 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_ZGen_2Phase_Finish (ESYS_CONTEXT * esysContext, TPM2B_ECC_POINT ** outZ1, TPM2B_ECC_POINT ** outZ2) β
Asynchronous finish function for TPM2_ZGen_2Phase β the "okay come back, here's your stuff" moment. π
this function returns the results of a TPM2_ZGen_2Phase command invoked via Esys_ZGen_2Phase_Finish. all non-simple output parameters are allocated by the function's implementation. and here's the cute part: NULL can be passed for every output parameter if the value is not required β so if you don't care about a value, just pass NULL and move on with your life. π
π«Ά Parameters π«Ά
esysContextβ TheESYS_CONTEXT.outZ1β X and Y coordinates of the computed value (scheme dependent). (callee-allocated)outZ2β X and Y coordinates of the second computed value (scheme dependent). (callee-allocated)
π Return values π
TSS2_RC_SUCCESSβ on success. βESYS_RC_SUCCESSβ if the function call was a success. β (yes bestie, she's listed twice, that's just how the page is π )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_RCs produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.
ngl the return-value lists are long, but every single one of those codes matters β don't skip the vibe check on error handling, bestie π«Ά
π Author π
generated automatically by Doxygen for tpm2-tss from the source code. she wrote herself, honestly iconic of her. π
so yeah, that's the page π
β brought to you by tpm2-tss, Version 4.1.5, dated the day she shipped. go forth and call your TPM, bestie, you've got 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