Fapi_Decrypt(3)
π NAME π
okay bestie, welcome to the Fapi_Decrypt(3) page from the Library Functions Manual β yes, it's giving tpm2-tss decryption realness and we're gonna get through it together, no cap. π
Fapi_Decrypt β literally Fapi_Decrypt. That's the name, that's the vibe. β¨
β¨ SYNOPSIS β¨
π Functions π
TSS2_RC Fapi_Decrypt (FAPI_CONTEXT *context, char const *keyPath,
uint8_t const *cipherText, size_t cipherTextSize, uint8_t
**plainText, size_t *plainTextSize)
TSS2_RC Fapi_Decrypt_Async (FAPI_CONTEXT *context, char const *keyPath,
uint8_t const *cipherText, size_t cipherTextSize)
TSS2_RC Fapi_Decrypt_Finish (FAPI_CONTEXT *context, uint8_t **plainText,
size_t *plainTextSize)
π¦ DETAILED DESCRIPTION π¦
okay so these are the FAPI functions to invoke Decrypt either as one-call or in an asynchronous manner. Two flavors, same decryption energy β iconic. π¦
π₯ FUNCTION DOCUMENTATION π₯
π Fapi_Decrypt β the one-call cutie π
TSS2_RC Fapi_Decrypt (FAPI_CONTEXT * context, char const * keyPath, uint8_t
const * cipherText, size_t cipherTextSize, uint8_t ** plainText, size_t
* plainTextSize)
One-Call function for Fapi_Decrypt β yes bestie, this is the one-call version and it slays.
Decrypts data that was previously encrypted with Fapi_Encrypt. πβ¨
π Parameters π
contextβ TheFAPI_CONTEXTkeyPathβ The decryption key.cipherTextβ The ciphertext to decrypt.cipherTextSizeβ The size of the ciphertext to decrypt.plainTextβ the decrypted ciphertext. May beNULL(callee-allocated)plainTextSizeβ The size of the ciphertext in bytes. May beNULL
π Return values π
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontextorcipherTextisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_KEY_NOT_FOUNDβ if can't find the key necessary to decrypt the file.TSS2_FAPI_RC_BAD_KEYβ if the decryption key is unsuitable for the requested operation.TSS2_FAPI_RC_BAD_VALUEβ if the decryption failsTSS2_FAPI_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORβ if the data cannot be saved.TSS2_FAPI_RC_MEMORYβ if the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_NO_TPMβ if FAPI was initialized in no-TPM-mode via its config file.TSS2_FAPI_RC_GENERAL_FAILUREβ if an internal error occurred.TSS2_FAPI_RC_TRY_AGAINβ if an I/O operation is not finished yet and this function needs to be called again.TSS2_FAPI_RC_PATH_NOT_FOUNDβ if a FAPI object path was not found during authorization.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNβ if a required authorization callback is not set.TSS2_FAPI_RC_AUTHORIZATION_FAILEDβ if the authorization attempt fails.TSS2_FAPI_RC_POLICY_UNKNOWNβ if policy search for a certain policy digest was not successful.TSS2_ESYS_RC_*β possible error codes of ESAPI.TSS2_FAPI_RC_NOT_PROVISIONEDβ FAPI was not provisioned.TSS2_FAPI_RC_BAD_PATHβ if the path is used in inappropriate context or contains illegal characters.
π Fapi_Decrypt_Async β the async baddie π
TSS2_RC Fapi_Decrypt_Async (FAPI_CONTEXT * context, char const * keyPath,
uint8_t const * cipherText, size_t cipherTextSize)
Asynchronous function for Fapi_Decrypt β it's giving main character async energy. π¦
Decrypts data that was previously encrypted with Fapi_Encrypt.
Call Fapi_Decrypt_Finish to finish the execution of this command. π
π Parameters π
contextβ TheFAPI_CONTEXTkeyPathβ The decryption key.cipherTextβ The ciphertext to decryptcipherTextSizeβ The size of the ciphertext to decrypt
π Return values π
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontextorcipherTextisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_KEY_NOT_FOUNDβ if can't find the key necessary to decrypt the file.TSS2_FAPI_RC_BAD_KEYβ if the decryption key is unsuitable for the requested operation.TSS2_FAPI_RC_BAD_VALUEβ if the decryption failsTSS2_FAPI_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORβ if the data cannot be saved.TSS2_FAPI_RC_MEMORYβ if the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_NO_TPMβ if FAPI was initialized in no-TPM-mode via its config file.
π Fapi_Decrypt_Finish β the finish-line fairy π
TSS2_RC Fapi_Decrypt_Finish (FAPI_CONTEXT * context, uint8_t ** plainText,
size_t * plainTextSize)
Asynchronous finish function for Fapi_Decrypt β the final boss of the async flow, ngl.
This function should be called after a previous Fapi_Decrypt. π«Ά
π Parameters π
contextβ TheFAPI_CONTEXTplainTextβ the decrypted ciphertext. May beNULL(callee-allocated)plainTextSizeβ The size of the ciphertext in bytes. May beNULL
π Return values π
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontext,plainTextorplainTextSizeisNULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORβ if the data cannot be saved.TSS2_FAPI_RC_MEMORYβ if the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_TRY_AGAINβ if the asynchronous operation is not yet complete. Call this function again later.TSS2_FAPI_RC_GENERAL_FAILUREβ if an internal error occurred.TSS2_FAPI_RC_BAD_VALUEβ if an invalid value was passed into the function.TSS2_FAPI_RC_PATH_NOT_FOUNDβ if a FAPI object path was not found during authorization.TSS2_FAPI_RC_KEY_NOT_FOUNDβ if a key was not found.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNβ if a required authorization callback is not set.TSS2_FAPI_RC_AUTHORIZATION_FAILEDβ if the authorization attempt fails.TSS2_FAPI_RC_POLICY_UNKNOWNβ if policy search for a certain policy digest was not successful.TSS2_ESYS_RC_*β possible error codes of ESAPI.TSS2_FAPI_RC_NOT_PROVISIONEDβ FAPI was not provisioned.TSS2_FAPI_RC_BAD_PATHβ if the path is used in inappropriate context or contains illegal characters.
π AUTHOR π
Generated automatically by Doxygen for tpm2-tss from the source code. Automated icon behavior, honestly. π
mwah π β this cutie came from tpm2-tss, Version 4.1.5, and it's the Fapi_Decrypt(3) page signing off. byeeee π«Άβ¨
π¦ 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