Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Enumerations | Functions
crys_aesccm.h File Reference

This file contains all of the enums and definitions that are used for the CRYS AESCCM APIs, as well as the APIs themselves. The API supports AES-CCM and AES-CCM* as defined in ieee-802.15.4. More...

#include "ssi_pal_types.h"
#include "crys_error.h"
#include "ssi_aes.h"

Go to the source code of this file.

Data Structures

struct  CRYS_AESCCM_UserContext_t
 

Macros

#define CRYS_AESCCM_USER_CTX_SIZE_IN_WORDS   (152/4)
 
#define CRYS_AESCCM_KEY_SIZE_WORDS   8
 
#define CRYS_AESCCM_NONCE_MIN_SIZE_BYTES   7
 
#define CRYS_AESCCM_NONCE_MAX_SIZE_BYTES   13
 
#define CRYS_AESCCM_MAC_MIN_SIZE_BYTES   4
 
#define CRYS_AESCCM_MAC_MAX_SIZE_BYTES   16
 
#define CRYS_AESCCM_STAR_NONCE_SIZE_BYTES   13
 
#define CRYS_AESCCM_STAR_SOURCE_ADDRESS_SIZE_BYTES   8
 
#define CRYS_AESCCM_MODE_CCM   0
 
#define CRYS_AESCCM_MODE_STAR   1
 
#define CRYS_AESCCM_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT)   CC_AESCCM_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT, CRYS_AESCCM_MODE_CCM)
 
#define CRYS_AESCCMStar_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT)   CC_AESCCM_Init(ContextID_ptr, EncrDecrMode, CCM_Key, KeySizeId, AdataSize, TextSizeQ, N_ptr, SizeOfN, SizeOfT, CRYS_AESCCM_MODE_STAR)
 
#define CRYS_AESCCM(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res)   CC_AESCCM(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res, CRYS_AESCCM_MODE_CCM)
 
#define CRYS_AESCCMStar(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res)   CC_AESCCM(EncrDecrMode, CCM_Key, KeySizeId, N_ptr, SizeOfN, ADataIn_ptr, ADataInSize, TextDataIn_ptr, TextDataInSize, TextDataOut_ptr, SizeOfT, Mac_Res, CRYS_AESCCM_MODE_STAR)
 

Typedefs

typedef uint8_t CRYS_AESCCM_Key_t[8 *sizeof(uint32_t)]
 
typedef uint8_t CRYS_AESCCM_Mac_Res_t[(4 *sizeof(uint32_t))]
 
typedef uint8_t CRYS_AESCCMStar_SourceAddress_t[8]
 
typedef uint8_t CRYS_AESCCMStar_Nonce_t[13]
 
typedef struct CRYS_AESCCM_UserContext_t CRYS_AESCCM_UserContext_t
 

Enumerations

Functions

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. More...
 
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 calculation. This API can be called only once per operation context. It should not be called in case AdataSize was set to zero in CC_AESCCM_Init. More...
 
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, excluding the last block that must be processed by CRYS_AESCCM_Finish. More...
 
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 text data (if transferred as one block), or on the last block of the text data, even if total size of text data is equal to 0. It performs the same operations as CRYS_AESCCM_BlockTextData, but additionally: More...
 
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 following elements: More...
 
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 required nonce for AES-CCM* as defined in ieee-802.15.4. This API should be called before CRYS_AESCCMStar and CRYS_AESCCMStar_Init, and the generated nonce should be provided to these functions. More...
 

Detailed Description

This file contains all of the enums and definitions that are used for the CRYS AESCCM APIs, as well as the APIs themselves. The API supports AES-CCM and AES-CCM* as defined in ieee-802.15.4.

Definition in file crys_aesccm.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.