xilasu
Vitis Drivers API Documentation
AES Common APIs

Macros

#define XASU_AES_IS_AAD_SUPPORTED_MODE(EngineMode)
 This macro checks if AAD processing is allowed for the given AES engine mode. More...
 

Functions

s32 XAsu_AesValidateIvParams (u8 EngineMode, u64 IvAddr, u32 IvLen)
 This function validates the IV parameters for the specified AES engine mode. More...
 
s32 XAsu_AesValidateTagParams (u8 EngineMode, u64 TagAddr, u32 TagLen)
 This API Validates the tag parameters for the specified AES engine mode. More...
 

Macro Definition Documentation

#define XASU_AES_IS_AAD_SUPPORTED_MODE (   EngineMode)
Value:
(((EngineMode) == XASU_AES_GCM_MODE) || \
((EngineMode) == XASU_AES_CMAC_MODE) || \
((EngineMode) == XASU_AES_CCM_MODE))
#define XASU_AES_CCM_MODE
AES CCM mode.
Definition: xasu_aesinfo.h:82
#define XASU_AES_GCM_MODE
AES GCM mode.
Definition: xasu_aesinfo.h:83
#define XASU_AES_CMAC_MODE
AES CMAC mode.
Definition: xasu_aesinfo.h:84

This macro checks if AAD processing is allowed for the given AES engine mode.

Referenced by XAsu_AesOperation().

Function Documentation

s32 XAsu_AesValidateIvParams ( u8  EngineMode,
u64  IvAddr,
u32  IvLen 
)

This function validates the IV parameters for the specified AES engine mode.

Parameters
EngineModeAES engine mode.
IvAddrAddress of buffer holding IV.
IvLenLength of the IV in bytes.
Returns
  • XST_SUCCESS, if IV parameters are validated successfully.
  • XST_FAILURE, if IV parameters validation fails.

IV Validation for respective AES engine modes AES Standard mode (ECB, CBC, CTR, CFB, OFB). AES MAC mode (GCM, CCM, GMAC, CMAC).

Engine Mode IvAddress IvLength
AES-ECB, AES-CMAC N/A N/A
AES-GCM Non-zero Any non-zero Length
AES-CCM Non-zero 7 to 13 bytes
Remaining modes Non-zero 12 or 16 Bytes

References XASU_AES_CBC_MODE, XASU_AES_CCM_MAX_NONCE_LEN, XASU_AES_CCM_MIN_NONCE_LEN, XASU_AES_CCM_MODE, XASU_AES_CFB_MODE, XASU_AES_CMAC_MODE, XASU_AES_CTR_MODE, XASU_AES_ECB_MODE, XASU_AES_GCM_MODE, XASU_AES_IV_SIZE_128BIT_IN_BYTES, XASU_AES_IV_SIZE_96BIT_IN_BYTES, and XASU_AES_OFB_MODE.

Referenced by XAsu_AesOperation().

s32 XAsu_AesValidateTagParams ( u8  EngineMode,
u64  TagAddr,
u32  TagLen 
)

This API Validates the tag parameters for the specified AES engine mode.

Parameters
EngineModeAES engine mode.
TagAddrAddress of the Input/Output Tag buffer.
TagLenLength of the tag in bytes. It will be zero for all AES standard modes like, ECB, CBC, OFB, CFB, CTR
Returns
  • XST_SUCCESS, if the tag parameters are successfully validated.
  • XST_FAILURE, if the tag parameters validation fails.

Tag Validation for respective AES engine modes AES Standard mode (ECB, CBC, CTR, CFB, OFB). AES MAC mode (GCM, CCM, GMAC, CMAC).

Engine Mode TagAddress TagLength
Standard mode N/A N/A
AES-GCM, CMAC Non-zero 8<=TagLen<=16
AES-CCM Non-zero 4,6,8,10,12,14,16

NIST recommends using a tag length of atleast 64 bits to provide adequate protection against guessing attacks.

References XASU_AES_CBC_MODE, XASU_AES_CCM_MODE, XASU_AES_CFB_MODE, XASU_AES_CMAC_MODE, XASU_AES_CTR_MODE, XASU_AES_ECB_MODE, XASU_AES_EVEN_MODULUS, XASU_AES_GCM_MODE, XASU_AES_MAX_TAG_LENGTH_IN_BYTES, XASU_AES_MIN_TAG_LENGTH_IN_BYTES, XASU_AES_OFB_MODE, and XASU_AES_RECOMMENDED_TAG_LENGTH_IN_BYTES.

Referenced by XAsu_AesOperation().