77 #define CRYS_AESCCM_USER_CTX_SIZE_IN_WORDS (152/4) 80 #define CRYS_AESCCM_KEY_SIZE_WORDS 8 84 #define CRYS_AESCCM_NONCE_MIN_SIZE_BYTES 7 86 #define CRYS_AESCCM_NONCE_MAX_SIZE_BYTES 13 88 #define CRYS_AESCCM_MAC_MIN_SIZE_BYTES 4 90 #define CRYS_AESCCM_MAC_MAX_SIZE_BYTES 16 93 #define CRYS_AESCCM_STAR_NONCE_SIZE_BYTES 13 95 #define CRYS_AESCCM_STAR_SOURCE_ADDRESS_SIZE_BYTES 8 98 #define CRYS_AESCCM_MODE_CCM 0 100 #define CRYS_AESCCM_MODE_STAR 1 172 #define CRYS_AESCCM_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT) \ 173 CC_AESCCM_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT, CRYS_AESCCM_MODE_CCM) 176 #define CRYS_AESCCMStar_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT) \ 177 CC_AESCCM_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT, CRYS_AESCCM_MODE_STAR) 239 uint8_t *DataOut_ptr,
241 CRYS_AESCCM_Mac_Res_t MacRes,
267 uint8_t *ADataIn_ptr,
268 uint32_t ADataInSize,
269 uint8_t *TextDataIn_ptr,
271 uint32_t TextDataInSize,
272 uint8_t *TextDataOut_ptr,
277 CRYS_AESCCM_Mac_Res_t Mac_Res,
282 #define CRYS_AESCCM(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res) \ 283 CC_AESCCM(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res, CRYS_AESCCM_MODE_CCM) 286 #define CRYS_AESCCMStar(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res) \ 287 CC_AESCCM(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res, CRYS_AESCCM_MODE_STAR) 300 CRYS_AESCCMStar_SourceAddress_t srcAddr,
301 uint32_t FrameCounter,
303 CRYS_AESCCMStar_Nonce_t nonce
uint8_t CRYS_AESCCMStar_Nonce_t[13]
CRYSError_t CC_AESCCM_Init(CRYS_AESCCM_UserContext_t *ContextID_ptr, SaSiAesEncryptMode_t EncrDecrMode, CRYS_AESCCM_Key_t CCM_Key, CRYS_AESCCM_KeySize_t KeySizeId, uint32_t AdataSize, uint32_t TextSizeQ, uint8_t *N_ptr, uint8_t SizeOfN, uint8_t SizeOfT, uint32_t ccmMode)
This function initializes the AES CCM context.
#define SASI_AES_BLOCK_SIZE_IN_BYTES
#define CRYS_AESCCM_STAR_SOURCE_ADDRESS_SIZE_BYTES
CRYSError_t CRYS_AESCCM_Finish(CRYS_AESCCM_UserContext_t *ContextID_ptr, uint8_t *DataIn_ptr, uint32_t DataInSize, uint8_t *DataOut_ptr, CRYS_AESCCM_Mac_Res_t MacRes, uint8_t *SizeOfT)
This function must be the last to be called on the text data. It can either be called on the entire t...
uint8_t CRYS_AESCCMStar_SourceAddress_t[8]
uint8_t CRYS_AESCCM_Key_t[8 *sizeof(uint32_t)]
CRYSError_t CRYS_AESCCM_BlockAdata(CRYS_AESCCM_UserContext_t *ContextID_ptr, uint8_t *DataIn_ptr, uint32_t DataInSize)
This function receives a CCM context and a block of additional data, and adds it to the AES MAC calcu...
struct CRYS_AESCCM_UserContext_t CRYS_AESCCM_UserContext_t
CRYSError_t CRYS_AESCCMStar_NonceGenerate(CRYS_AESCCMStar_SourceAddress_t srcAddr, uint32_t FrameCounter, uint8_t SizeOfT, CRYS_AESCCMStar_Nonce_t nonce)
This function receives the MAC source address, the frame counter and the MAC size and returns the req...
CRYSError_t CRYS_AESCCM_BlockTextData(CRYS_AESCCM_UserContext_t *ContextID_ptr, uint8_t *DataIn_ptr, uint32_t DataInSize, uint8_t *DataOut_ptr)
This function can be invoked for any block of Text data whose size is a multiple of 16 bytes...
#define CRYS_AESCCM_USER_CTX_SIZE_IN_WORDS
#define CRYS_AESCCM_KEY_SIZE_WORDS
#define CRYS_AESCCM_STAR_NONCE_SIZE_BYTES
CRYSError_t CC_AESCCM(SaSiAesEncryptMode_t EncrDecrMode, CRYS_AESCCM_Key_t CCM_Key, CRYS_AESCCM_KeySize_t KeySizeId, uint8_t *N_ptr, uint8_t SizeOfN, uint8_t *ADataIn_ptr, uint32_t ADataInSize, uint8_t *TextDataIn_ptr, uint32_t TextDataInSize, uint8_t *TextDataOut_ptr, uint8_t SizeOfT, CRYS_AESCCM_Mac_Res_t Mac_Res, uint32_t ccmMode)
AES CCM combines Counter mode encryption with CBC-MAC authentication. Input to CCM includes the follo...
uint8_t CRYS_AESCCM_Mac_Res_t[(4 *sizeof(uint32_t))]
This file contains all of the enums and definitions that are used for the CryptoCell AES APIs...
This file contains the platform dependent definitions and types.
This module defines the error return code types and the numbering spaces of the error codes for each ...