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 β€” The FAPI_CONTEXT
  • keyPath β€” The decryption key.
  • cipherText β€” The ciphertext to decrypt.
  • cipherTextSize β€” The size of the ciphertext to decrypt.
  • plainText β€” the decrypted ciphertext. May be NULL (callee-allocated)
  • plainTextSize β€” The size of the ciphertext in bytes. May be NULL

🌈 Return values 🌈

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context or cipherText is NULL.
  • 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 fails
  • 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_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 β€” The FAPI_CONTEXT
  • keyPath β€” The decryption key.
  • cipherText β€” The ciphertext to decrypt
  • cipherTextSize β€” The size of the ciphertext to decrypt

🌈 Return values 🌈

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context or cipherText is NULL.
  • 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 fails
  • 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_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 β€” The FAPI_CONTEXT
  • plainText β€” the decrypted ciphertext. May be NULL (callee-allocated)
  • plainTextSize β€” The size of the ciphertext in bytes. May be NULL

🌈 Return values 🌈

  • TSS2_RC_SUCCESS β€” if the function call was a success.
  • TSS2_FAPI_RC_BAD_REFERENCE β€” if context, plainText or plainTextSize is NULL.
  • 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