Mbed OS Reference
Loading...
Searching...
No Matches
cmac_alt.h
1/*
2 * cmac_alt.h
3 *
4 * Copyright (C) 2019, ARM Limited, All Rights Reserved
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 */
20
21#ifndef __CMAC_ALT__
22#define __CMAC_ALT__
23
24#if defined(MBEDTLS_CMAC_ALT)
25#include "ssi_aes.h"
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30typedef struct mbedtls_cmac_context_t
31{
32 SaSiAesUserContext_t CC_Context;
33 uint8_t CC_Key[SASI_AES_KEY_MAX_SIZE_IN_BYTES];
34 size_t CC_keySizeInBytes;
35 /** Unprocessed data - either data that was not block aligned and is still
36 * pending processing, or the final block */
37 unsigned char unprocessed_block[SASI_AES_BLOCK_SIZE_IN_BYTES];
38
39 /** The length of data pending processing. */
40 size_t unprocessed_len;
41
42 int is_cc_initiated;
44
45#ifdef __cplusplus
46}
47#endif
48
49#endif /* MBEDTLS_CMAC_ALT */
50#endif /* __CMAC_ALT__ */
The CMAC context structure.
Definition: cmac.h:66
size_t unprocessed_len
The length of data pending processing.
Definition: cmac.h:75
unsigned char unprocessed_block[8]
Unprocessed data - either data that was not block aligned and is still pending processing,...
Definition: cmac.h:72