XSecure_AesInitialize - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2021-06-16
Version
2021.1 English

This function initializes the instance pointer.

Note: All the inputs are accepted in little endian format but the AES engine accepts the data in big endian format, The decryption and encryption functions in xsecure_aes handle the little endian to big endian conversion using few API's, Xil_Htonl (provided by Xilinx xil_io library) and XSecure_AesCsuDmaConfigureEndiannes for handling data endianness conversions. If higher performance is needed, users can strictly use data in big endian format and modify the xsecure_aes functions to remove the use of the Xil_Htonl and XSecure_AesCsuDmaConfigureEndiannes functions as required.

Prototype

s32 XSecure_AesInitialize(XSecure_Aes *InstancePtr, XCsuDma *CsuDmaPtr, u32 KeySel, u32 *IvPtr, u32 *KeyPtr);

Parameters

The following table lists the XSecure_AesInitialize function arguments.

Table 1. XSecure_AesInitialize Arguments
Name Description
InstancePtr Pointer to the XSecure_Aes instance.
CsuDmaPtr Pointer to the XCsuDma instance.
KeySel Key source for decryption, can be KUP/device key
  • XSECURE_CSU_AES_KEY_SRC_KUP :For KUP key
  • XSECURE_CSU_AES_KEY_SRC_DEV :For Device Key
IvPtr Pointer to the Initialization Vector for decryption
KeyPtr Pointer to Aes key in case KUP key is used. Pass Null if the device key is to be used.

Returns

XST_SUCCESS if initialization was successful.