Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers cmac_alt.h Source File

cmac_alt.h

00001 /*
00002  *  cmac_alt.h
00003  *
00004  *  Copyright (C) 2019, ARM Limited, All Rights Reserved
00005  *  SPDX-License-Identifier: Apache-2.0
00006  *
00007  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00008  *  not use this file except in compliance with the License.
00009  *  You may obtain a copy of the License at
00010  *
00011  *  http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  *  Unless required by applicable law or agreed to in writing, software
00014  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00015  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  *  See the License for the specific language governing permissions and
00017  *  limitations under the License.
00018  *
00019  */
00020 
00021 #ifndef __CMAC_ALT__
00022 #define __CMAC_ALT__
00023 
00024 #if defined(MBEDTLS_CMAC_ALT)
00025 #include "ssi_aes.h"
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 typedef struct mbedtls_cmac_context_t
00031 {
00032     SaSiAesUserContext_t  CC_Context;
00033     uint8_t CC_Key[SASI_AES_KEY_MAX_SIZE_IN_BYTES];
00034     size_t CC_keySizeInBytes;
00035     /** Unprocessed data - either data that was not block aligned and is still
00036      *  pending processing, or the final block */
00037     unsigned char       unprocessed_block[SASI_AES_BLOCK_SIZE_IN_BYTES];
00038 
00039     /** The length of data pending processing. */
00040     size_t              unprocessed_len;
00041     
00042     int                 is_cc_initiated;
00043 } mbedtls_cmac_context_t;
00044 
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048 
00049 #endif /* MBEDTLS_CMAC_ALT */
00050 #endif /* __CMAC_ALT__ */