xilsecure
Vitis Drivers API Documentation
xsecure_aesclient.c File Reference

Overview

This file contains the implementation of the client interface functions for AES driver.

MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 kal 03/23/21 Initial release 4.5 kal 03/23/20 Updated file version to sync with library version har 04/14/21 Added XSecure_AesEncryptData and XSecure_AesDecryptData 4.6 har 08/31/21 Updated check for Size in XSecure_AesKekDecrypt kpt 09/27/21 Fixed compilation warnings 4.7 kpt 11/29/21 Replaced Xil_DCacheFlushRange with XSecure_DCacheFlushRange kpt 01/13/21 Allocated CDO structure's in shared memory set by the user am 03/08/22 Fixed MISRA C violations kpt 03/16/22 Removed IPI related code and added mailbox support 5.0 kpt 07/24/22 Moved XSecure_AesDecryptKat and XSecure_AesDecryptCMKat into XSecure_Katclient.c kpt 08/19/22 Added GMAC support 5.1 skg 12/14/22 Added SSIT Provisioning support 5.2 am 03/09/23 Replaced xsecure payload lengths with xmailbox payload lengths yog 05/04/23 Fixed HIS COMF violations 5.3 vss 10/03/23 Added single API support for AES AAD and GMAC operations vss 03/04/24 Removed code redundancy for AesPerformOperation API 5.4 yog 04/29/24 Fixed doxygen warnings.

 

Functions

int XSecure_AesInitialize (XSecure_ClientInstance *InstancePtr)
 This function sends IPI request to initialize the AES engine. More...
 
int XSecure_AesEncryptInit (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 Size, u64 IvAddr)
 This function sends IPI request to EncryptInit the AES engine. More...
 
int XSecure_AesDecryptInit (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 Size, u64 IvAddr)
 This function sends IPI request to DecryptInit the AES engine. More...
 
int XSecure_AesUpdateAad (XSecure_ClientInstance *InstancePtr, u64 AadAddr, u32 AadSize)
 This function sends IPI request to update AAD to AES engine. More...
 
int XSecure_AesGmacUpdateAad (XSecure_ClientInstance *InstancePtr, u64 AadAddr, u32 AadSize, u32 IsLastChunkSrc)
 This function sends IPI request to update AAD data to AES engine. More...
 
int XSecure_AesEncryptUpdate (XSecure_ClientInstance *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u32 IsLast)
 This function sends IPI request to update the input data to AES engine for encryption. More...
 
int XSecure_AesEncryptFinal (XSecure_ClientInstance *InstancePtr, u64 GcmTagAddr)
 This function sends IPI request to update the GcmTag Addr to AES engine. More...
 
int XSecure_AesDecryptUpdate (XSecure_ClientInstance *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u32 IsLast)
 This function sends IPI request to update the encrypted data to AES engine for decryption. More...
 
int XSecure_AesDecryptFinal (XSecure_ClientInstance *InstancePtr, u64 GcmTagAddr)
 This function sends IPI request to verify the GcmTag provided for the data decrypted till the point. More...
 
int XSecure_AesKeyZero (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc)
 This function sends IPI request to zeroize selected AES key storage register. More...
 
int XSecure_AesWriteKey (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 Size, u64 KeyAddr)
 This function sends IPI request to write the key provided into the specified AES key registers. More...
 
int XSecure_AesKekDecrypt (XSecure_ClientInstance *InstancePtr, u64 IvAddr, XSecure_AesKeySource DstKeySrc, XSecure_AesKeySource DecKeySrc, XSecure_AesKeySize Size)
 This function sends IPI request to decrypt the key in KEK key form. More...
 
int XSecure_AesSetDpaCm (XSecure_ClientInstance *InstancePtr, u8 DpaCmCfg)
 This function sends IPI request to enable/disable DpaCm in AES. More...
 
int XSecure_AesEncryptData (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 KeySize, u64 IvAddr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr)
 This function calls IPI request to encrypt a single block of data. More...
 
int XSecure_AesDecryptData (XSecure_ClientInstance *InstancePtr, XSecure_AesKeySource KeySrc, u32 KeySize, u64 IvAddr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr)
 This function calls IPI request to decrypt a single block of data. More...
 
int XSecure_AesPerformOperation (const XSecure_ClientInstance *InstancePtr, const XSecure_AesDataBlockParams *AesDataParams)
 This function calls IPI request to encrypt/decrypt a single block of data along with update AAD/GMAC based on the user's choice. More...