XSecure_RsaPrivateDecrypt_64Bit - 2023.2 English

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2023-12-13
Version
2023.2 English

This function handles the RSA decryption for data available at 64-bit address with the private key components provided when initializing the RSA cryptographic core with the XSecure_RsaInitialize function.

Note: The Size passed here needs to match the key size used in the XSecure_RsaInitialize function

Prototype

int XSecure_RsaPrivateDecrypt_64Bit(XSecure_Rsa *InstancePtr, u64 Input, u32 Size, u64 Result);

Parameters

The following table lists the XSecure_RsaPrivateDecrypt_64Bit function arguments.

Table 1. XSecure_RsaPrivateDecrypt_64Bit Arguments
Name Description
InstancePtr - Pointer to the XSecure_Rsa instance
Input - Address of the buffer which contains the input data to be decrypted
Size - Key size in bytes, Input size also should be same as Key size mentioned. Inputs supported are
  • XSECURE_RSA_4096_KEY_SIZE,
  • XSECURE_RSA_2048_KEY_SIZE
  • XSECURE_RSA_3072_KEY_SIZE
Result - Address of buffer where resultant decrypted data to be stored

Returns

  • XST_SUCCESS - If decryption was successful
  • XSECURE_RSA_DATA_VALUE_ERROR - If input data is greater than modulus
  • XSECURE_RSA_STATE_MISMATCH_ERROR - If State mismatch is occurred
  • XST_FAILURE - On RSA operation failure