Esys_RSA_Decrypt(3)
π
Esys_RSA_Decrypt(3) β Library Functions Manual
okay so bestie, welcome to the Esys_RSA_Decrypt(3) page πΈ this whole thing lives in the Library Functions Manual and it's literally all about one ESAPI function that wraps the TPM2_RSA_Decrypt command π she's giving crypto, she's giving TPM, she's giving "please decrypt this for me" β¨
β¨ NAME β¨
Esys_RSA_Decrypt β the ESAPI function for the TPM2_RSA_Decrypt command π
π¦ SYNOPSIS π¦
Functions
So there's a whole little trio here, and they're all TSS2_RC girlies π«Ά
TSS2_RC Esys_RSA_Decrypt_Async (ESYS_CONTEXT *esysContext, ESYS_TR
keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
const TPM2B_PUBLIC_KEY_RSA *cipherText, const TPMT_RSA_DECRYPT
*inScheme, const TPM2B_DATA *label)
TSS2_RC Esys_RSA_Decrypt (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle,
ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const
TPM2B_PUBLIC_KEY_RSA *cipherText, const TPMT_RSA_DECRYPT *inScheme,
const TPM2B_DATA *label, TPM2B_PUBLIC_KEY_RSA **message)
TSS2_RC Esys_RSA_Decrypt_Finish (ESYS_CONTEXT *esysContext,
TPM2B_PUBLIC_KEY_RSA **message)
π₯ Detailed Description π₯
This is the ESAPI function that invokes the TPM2_RSA_Decrypt command β and you can call it either as a one-call situation or in an asynchronous manner π two vibes, one command, no cap π
π Function Documentation π
π TSS2_RC Esys_RSA_Decrypt (ESYS_CONTEXT * esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PUBLIC_KEY_RSA * cipherText, const TPMT_RSA_DECRYPT * inScheme, const TPM2B_DATA * label, TPM2B_PUBLIC_KEY_RSA ** message)
One-Call function for TPM2_RSA_Decrypt β
This is the one-call variant, meaning it invokes the TPM2_RSA_Decrypt command and then just blocks until the TPM response shows up π΄ like it will genuinely sit there and wait, main character energy fr. All input parameters are const (she doesn't touch them, respectfully π), and the memory for non-simple output parameters is allocated by the function implementation β so yeah, that allocation is on her, not you π
Parameters π
esysContextβ theESYS_CONTEXT.keyHandleβ RSA key to use for decryption πshandle1β session handle for authorization ofkeyHandle.shandle2β second session handle.shandle3β third session handle.cipherTextβ cipher text to be decrypted πinSchemeβ the padding scheme to use if the scheme associated withkeyHandleisTPM2_ALG_NULL.labelβ label whose association with the message is to be verified π·οΈmessageβ decrypted output. (callee-allocated)
Return values π
TSS2_RC_SUCCESSif the function call was a success β¨TSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected πTSS2_ESYS_RC_MEMORYif the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending πTSS2_ESYS_RC_INSUFFICIENT_RESPONSEif the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_MALFORMED_RESPONSEif the TPM's response is corrupted πTSS2_ESYS_RC_RSP_AUTH_FAILEDif the response HMAC from the TPM did not verify.TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSif more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSif more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRif 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 π
π¦ TSS2_RC Esys_RSA_Decrypt_Async (ESYS_CONTEXT * esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PUBLIC_KEY_RSA * cipherText, const TPMT_RSA_DECRYPT * inScheme, const TPM2B_DATA * label)
Asynchronous function for TPM2_RSA_Decrypt β‘
This is the asynchronous variant, which means it invokes the TPM2_RSA_Decrypt command and then dips immediately β it returns as soon as the command has been sent downwards the stack to the TPM πββοΈπ¨ no waiting around, she has places to be. All input parameters are const. To actually retrieve the TPM's response, you gotta call Esys_RSA_Decrypt_Finish π«Ά
Parameters π
esysContextβ theESYS_CONTEXT.keyHandleβ RSA key to use for decryption πshandle1β session handle for authorization ofkeyHandle.shandle2β second session handle.shandle3β third session handle.cipherTextβ cipher text to be decrypted πinSchemeβ the padding scheme to use if the scheme associated withkeyHandleisTPM2_ALG_NULL.labelβ label whose association with the message is to be verified π·οΈ
Return values π
ESYS_RC_SUCCESSif the function call was a success β¨TSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected πTSS2_ESYS_RC_MEMORYif 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_SESSIONSif more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSif more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRif any of theESYS_TRobjects are unknown to theESYS_CONTEXTor are of the wrong type, or if requiredESYS_TRobjects areESYS_TR_NONE.
π§ TSS2_RC Esys_RSA_Decrypt_Finish (ESYS_CONTEXT * esysContext, TPM2B_PUBLIC_KEY_RSA ** message)
Asynchronous finish function for TPM2_RSA_Decrypt π
This one returns the results of a TPM2_RSA_Decrypt command invoked via Esys_RSA_Decrypt_Finish πΈ All non-simple output parameters are allocated by the function's implementation. And good news: NULL can be passed for every output parameter if the value is not required π lowkey convenient, we love an optional.
Parameters π
esysContextβ theESYS_CONTEXT.messageβ decrypted output. (callee-allocated)
Return values π
TSS2_RC_SUCCESSon success β¨ESYS_RC_SUCCESSif the function call was a success.TSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected πTSS2_ESYS_RC_MEMORYif the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending πTSS2_ESYS_RC_TRY_AGAINif the timeout counter expires before the TPM response is received β°TSS2_ESYS_RC_INSUFFICIENT_RESPONSEif the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_RSP_AUTH_FAILEDif the response HMAC from the TPM did not verify.TSS2_ESYS_RC_MALFORMED_RESPONSEif 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 π
π«Ά Author π«Ά
Generated automatically by Doxygen for tpm2-tss from the source code π€ (yes bestie, a robot wrote the original, we're just making it cute π )
and that's the page!! π ngl you now know everything about decrypting RSA stuff through ESAPI β go off π
tpm2-tss Β· Version 4.1.5 Β· Esys_RSA_Decrypt(3) β mwah, see u in the next manpage bestie πβ¨π¦
π¦ 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