3. CMOX_CCM ¶
3.1. CCM single-call algorithms ¶
- group CMOX_CCM_ALGO
-
Variables
-
const
cmox_aead_algo_t
CMOX_AESSMALL_CCM_ENC_ALGO
¶
-
Identifier of the CCM encryption using AES (small implementation) for single-call function (Defined internally).
-
const
cmox_aead_algo_t
CMOX_AESSMALL_CCM_DEC_ALGO
¶
-
Identifier of the CCM decryption using AES (small implementation) for single-call function (Defined internally).
-
const
cmox_aead_algo_t
CMOX_AESFAST_CCM_ENC_ALGO
¶
-
Identifier of the CCM encryption using AES (fast implementation) for single-call function (Defined internally).
-
const
cmox_aead_algo_t
CMOX_AESFAST_CCM_DEC_ALGO
¶
-
Identifier of the CCM decryption using AES (fast implementation) for single-call function (Defined internally).
-
const
cmox_aead_algo_t
CMOX_AESSMALL_CCM_ENC_ALGO
¶
3.2. CCM implementations ¶
- group CMOX_CCM_IMPL
-
Variables
-
const
cmox_ccm_impl_t
CMOX_AESFAST_CCM_ENC
¶
-
Implementation of CCM encryption using AES (fast implementation) (Defined internally).
-
const
cmox_ccm_impl_t
CMOX_AESFAST_CCM_DEC
¶
-
Implementation of CCM decryption using AES (fast implementation) (Defined internally).
-
const
cmox_ccm_impl_t
CMOX_AESSMALL_CCM_ENC
¶
-
Implementation of CCM encryption using AES (small implementation) (Defined internally).
-
const
cmox_ccm_impl_t
CMOX_AESSMALL_CCM_DEC
¶
-
Implementation of CCM decryption using AES (small implementation) (Defined internally).
-
const
cmox_ccm_impl_t
CMOX_AESFAST_CCM_ENC
¶
3.3. CCM public method prototypes ¶
- group CMOX_CCM_PUBLIC_METHODS
-
Functions
-
cmox_cipher_handle_t
*
cmox_ccm_construct
(
cmox_ccm_handle_t
*
P_pThis
,
cmox_ccm_impl_t
P_impl
)
¶
-
CCM constructor.
The function is used for specifying which block cipher algorithm to use in order to implement the CCM algorithm and if the algorithm will be used for encryption or decryption.
- Parameters :
-
P_pThis – Pointer to the CCM handle to initialize
P_impl – Constant that specifies the implementation to use. This parameter can be one of the following values:
CMOX_AESFAST_CCM_ENC
CMOX_AESFAST_CCM_DEC
CMOX_AESSMALL_CCM_ENC
CMOX_AESSMALL_CCM_DEC
- Returns :
-
cmox_cipher_handle_t* Pointer to a general cipher handle. This will be used by the general purpose cipher functions in order to perform the algorithm
-
cmox_cipher_handle_t
*
cmox_ccm_construct
(
cmox_ccm_handle_t
*
P_pThis
,
cmox_ccm_impl_t
P_impl
)
¶
3.4. CCM public types ¶
- group CMOX_CCM_PUBLIC_TYPES
-
Typedefs
-
typedef
const
struct
cmox_ccm_implStruct_st
*
cmox_ccm_impl_t
¶
-
CCM mode implementation.
This type specifies the used block cipher for the CCM construct and if the algorithm will be used for encryption or decryption. This type is defined as a pointer to a structure, that contains the functions needed for the specific implementation, defined in the library internally
-
struct
cmox_ccm_handle_t
¶
-
#include <cmox_ccm.h>
CCM handle structure.
Public Members
-
cmox_cipher_handle_t
super
¶
-
General cipher handle
-
cmox_blockcipher_handle_t
blockCipher
¶
-
Block cipher handle
-
uint32_t
ivCtr
[
4
]
¶
-
Current IV value for encryption.
-
uint32_t
ivCbc
[
4
]
¶
-
Current IV value for authentication.
-
size_t
tagLen
¶
-
Size of the tag to return. Possible values are values are {4,6,8,10,12,14,16}
-
size_t
AdLen
¶
-
Len of the associated data to be processed
-
size_t
payloadLen
¶
-
Size of the total payload data to be processed
-
size_t
nonceLen
¶
-
Size of the Nonce in bytes. Possible values are {7,8,9,10,11,12,13}
-
uint32_t
tmpBuf
[
4
]
¶
-
Temporary buffer used for internal computations
-
uint32_t
tmpBufUse
¶
-
Number of bytes in use for internal computations
-
cmox_cipher_handle_t
super
¶
-
typedef
const
struct
cmox_ccm_implStruct_st
*
cmox_ccm_impl_t
¶