4#ifndef PROTOCORE_AES_CMAC_H
5#define PROTOCORE_AES_CMAC_H
35#define PROTOCORE_AES_CMAC_LEN 16
40 embed_bool (*
mac)(uint8_t *,
const uint8_t *,
const uint8_t *, size_t, uint8_t *);
53embed_bool
protocore_aes_cmac_mac(uint8_t *work,
const uint8_t *key,
const uint8_t *msg,
size_t msg_len, uint8_t *out);
embed_bool protocore_aes_cmac_mac(uint8_t *work, const uint8_t *key, const uint8_t *msg, size_t msg_len, uint8_t *out)
Derive K1/K2, CBC-MAC the message, write the 16 bytes out.
#define PROTOCORE_UNUSED
Suppress the unused warning. Every module ends in a namespace most callers only partly use.
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
Dispatch table. Addressed by offset, so the layout is asserted below.
embed_bool(* mac)(uint8_t *, const uint8_t *, const uint8_t *, size_t, uint8_t *)