97 #ifndef __TC_CMAC_MODE_H__ 98 #define __TC_CMAC_MODE_H__ 109 #define TC_CMAC_PADDING 0x80 – Interface to an AES-128 implementation.
#define TC_AES_BLOCK_SIZE
Definition: tc_aes.h:61
uint8_t K1[TC_AES_BLOCK_SIZE]
Definition: tc_cmac_mode.h:116
uint8_t leftover[TC_AES_BLOCK_SIZE]
Definition: tc_cmac_mode.h:120
int tc_cmac_init(TCCmacState_t s)
Initializes a new CMAC computation.
Definition: tc_cmac_mode.c:137
TCAesKeySched_t sched
Definition: tc_cmac_mode.h:126
uint8_t iv[TC_AES_BLOCK_SIZE]
Definition: tc_cmac_mode.h:114
uint8_t K2[TC_AES_BLOCK_SIZE]
Definition: tc_cmac_mode.h:118
unsigned int leftover_offset
Definition: tc_cmac_mode.h:124
uint64_t countdown
Definition: tc_cmac_mode.h:128
unsigned int keyid
Definition: tc_cmac_mode.h:122
int tc_cmac_erase(TCCmacState_t s)
Erases the CMAC state.
Definition: tc_cmac_mode.c:125
struct tc_cmac_struct * TCCmacState_t
int tc_cmac_update(TCCmacState_t s, const uint8_t *data, size_t dlen)
Incrementally computes CMAC over the next data segment.
Definition: tc_cmac_mode.c:157
Definition: tc_cmac_mode.h:112
int tc_cmac_final(uint8_t *tag, TCCmacState_t s)
Generates the tag from the CMAC state.
Definition: tc_cmac_mode.c:222
int tc_cmac_setup(TCCmacState_t s, const uint8_t *key, TCAesKeySched_t sched)
Configures the CMAC state to use the given AES key.
Definition: tc_cmac_mode.c:97