Loading...
Searching...
No Matches
aes128_cmac.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 FundaciĆ³n Inria Chile
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
22#ifndef HASHES_AES128_CMAC_H
23#define HASHES_AES128_CMAC_H
24
25#include <stdio.h>
26#include "crypto/ciphers.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35#define AES128_CMAC_BLOCK_SIZE 16
36
40typedef struct {
46 uint8_t M_last[AES128_CMAC_BLOCK_SIZE];
48 uint32_t M_n;
50
62 const uint8_t *key, uint8_t key_size);
63
73 const void *data, size_t len);
74
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* HASHES_AES128_CMAC_H */
Headers for the packet encryption class.
int aes128_cmac_init(aes128_cmac_context_t *ctx, const uint8_t *key, uint8_t key_size)
Initialize AES128 CMAC message digest context.
void aes128_cmac_final(aes128_cmac_context_t *ctx, void *digest)
Finalizes the CMAC message digest.
void aes128_cmac_update(aes128_cmac_context_t *ctx, const void *data, size_t len)
Update the AES128 CMAC context with a portion of the message being hashed.
#define AES128_CMAC_BLOCK_SIZE
Length of AES128_CMAC block in bytes.
Definition aes128_cmac.h:35
stdio wrapper to extend the C libs stdio
AES128_CMAC calculation context.
Definition aes128_cmac.h:40
uint32_t M_n
last byte in last block
Definition aes128_cmac.h:48
cipher_t aes128_ctx
AES128 context.
Definition aes128_cmac.h:42
basic struct for using block ciphers contains the cipher interface and the context
Definition ciphers.h:119