ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
sec_cmac_internal.h
Go to the documentation of this file.
1
40
41#pragma once
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47#include <stdint.h>
48
49#include "ra8_attributes.h"
50#include "ra8_err.h"
51
74
116RA8_PRIV [[nodiscard]] ra8_err_t priv_ra8_sec_cmac_compute(const uint8_t* key,
117 uint16_t key_len,
118 const uint8_t* msg,
119 uint32_t msg_len,
120 uint8_t* out_mac);
121
171RA8_PRIV [[nodiscard]] ra8_err_t priv_ra8_sec_cmac_verify(const uint8_t* key,
172 uint16_t key_len,
173 const uint8_t* msg,
174 uint32_t msg_len,
175 const uint8_t* mac,
176 uint16_t mac_len);
177
178#ifdef __cplusplus
179}
180#endif
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_sec_cmac_limits_t
Sizing constants for the secure-side AES-CMAC primitive.
@ k_ra8_sec_cmac_key_256
AES-256 key length in bytes.
@ k_ra8_sec_cmac_tag_bytes
CMAC tag length (one AES block).
@ k_ra8_sec_cmac_key_128
AES-128 key length in bytes.
@ k_ra8_sec_cmac_max_msg_bytes
Largest authenticated message.
ra8_err_t priv_ra8_sec_cmac_compute(const uint8_t *key, uint16_t key_len, const uint8_t *msg, uint32_t msg_len, uint8_t *out_mac)
Compute the AES-CMAC tag of a message under a symmetric key.
Definition sec_cmac.c:632
ra8_err_t priv_ra8_sec_cmac_verify(const uint8_t *key, uint16_t key_len, const uint8_t *msg, uint32_t msg_len, const uint8_t *mac, uint16_t mac_len)
Verify an AES-CMAC tag against a message under a symmetric key.
Definition sec_cmac.c:647