24 #ifndef MBEDTLS_CMAC_H 25 #define MBEDTLS_CMAC_H 33 #define MBEDTLS_AES_BLOCK_SIZE 16 34 #define MBEDTLS_DES3_BLOCK_SIZE 8 36 #if defined(MBEDTLS_AES_C) 37 #define MBEDTLS_CIPHER_BLKSIZE_MAX 16 39 #define MBEDTLS_CIPHER_BLKSIZE_MAX 8 75 const unsigned char *key,
size_t keybits );
92 const unsigned char *
input,
size_t ilen );
135 const unsigned char *key,
size_t keylen,
136 const unsigned char *
input,
size_t ilen,
139 #if defined(MBEDTLS_AES_C) 152 int mbedtls_aes_cmac_prf_128(
const unsigned char *key,
size_t key_len,
153 const unsigned char *
input,
size_t in_len,
154 unsigned char output[16] );
157 #if defined(MBEDTLS_SELF_TEST) && ( defined(MBEDTLS_AES_C) || defined(MBEDTLS_DES_C) ) 163 int mbedtls_cmac_self_test(
int verbose );
int mbedtls_cipher_cmac_update(mbedtls_cipher_context_t *ctx, const unsigned char *input, size_t ilen)
Generic CMAC process buffer. Called between mbedtls_cipher_cmac_starts() or mbedtls_cipher_cmac_reset...
unsigned char unprocessed_block[MBEDTLS_CIPHER_BLKSIZE_MAX]
Definition: cmac.h:52
unsigned char state[MBEDTLS_CIPHER_BLKSIZE_MAX]
Definition: cmac.h:48
int mbedtls_cipher_cmac_starts(mbedtls_cipher_context_t *ctx, const unsigned char *key, size_t keybits)
Set the CMAC key and prepare to authenticate the input data. Should be called with an initialized cip...
#define MBEDTLS_CIPHER_BLKSIZE_MAX
Definition: cmac.h:39
int mbedtls_cipher_cmac(const mbedtls_cipher_info_t *cipher_info, const unsigned char *key, size_t keylen, const unsigned char *input, size_t ilen, unsigned char *output)
Output = Generic_CMAC( cmac key, input buffer )
GLenum GLenum GLenum input
Definition: glext.h:9938
int mbedtls_cipher_cmac_reset(mbedtls_cipher_context_t *ctx)
Prepare to authenticate a new message with the same key. Called after mbedtls_cipher_cmac_finish() an...
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
size_t unprocessed_len
Definition: cmac.h:55
std::string output
Definition: Config.FromFile.cpp:44
int mbedtls_cipher_cmac_finish(mbedtls_cipher_context_t *ctx, unsigned char *output)
Output CMAC. Called after mbedtls_cipher_cmac_update(). Usually followed by mbedtls_cipher_cmac_reset...
static const uint32_t key_len[MAX_TESTS]
Definition: pkcs5.c:329