2021-10-29 00:39:53 -04:00
|
|
|
/*
|
|
|
|
* gcm_alt.h: AES block cipher
|
2020-01-16 01:31:10 -05:00
|
|
|
*
|
2021-10-29 00:39:53 -04:00
|
|
|
* SPDX-FileCopyrightText: The Mbed TLS Contributors
|
2020-01-16 01:31:10 -05:00
|
|
|
*
|
2021-10-29 00:39:53 -04:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2020-01-16 01:31:10 -05:00
|
|
|
*
|
2022-03-02 23:04:39 -05:00
|
|
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
2020-01-16 01:31:10 -05:00
|
|
|
*/
|
|
|
|
#ifndef GCM_ALT_H
|
|
|
|
#define GCM_ALT_H
|
|
|
|
|
2020-11-12 02:11:38 -05:00
|
|
|
#include "soc/soc_caps.h"
|
|
|
|
|
2020-01-16 01:31:10 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_GCM_ALT)
|
|
|
|
|
2020-11-12 02:11:38 -05:00
|
|
|
#if SOC_AES_SUPPORT_GCM
|
|
|
|
#include "aes/esp_aes_gcm.h"
|
2020-01-16 01:31:10 -05:00
|
|
|
|
|
|
|
|
|
|
|
typedef esp_gcm_context mbedtls_gcm_context;
|
|
|
|
|
|
|
|
#define mbedtls_gcm_init esp_aes_gcm_init
|
|
|
|
#define mbedtls_gcm_free esp_aes_gcm_free
|
|
|
|
#define mbedtls_gcm_setkey esp_aes_gcm_setkey
|
|
|
|
#define mbedtls_gcm_starts esp_aes_gcm_starts
|
2021-08-09 05:58:36 -04:00
|
|
|
#define mbedtls_gcm_update_ad esp_aes_gcm_update_ad
|
2020-01-16 01:31:10 -05:00
|
|
|
#define mbedtls_gcm_update esp_aes_gcm_update
|
|
|
|
#define mbedtls_gcm_finish esp_aes_gcm_finish
|
|
|
|
#define mbedtls_gcm_auth_decrypt esp_aes_gcm_auth_decrypt
|
|
|
|
#define mbedtls_gcm_crypt_and_tag esp_aes_gcm_crypt_and_tag
|
|
|
|
|
2020-11-12 02:11:38 -05:00
|
|
|
#endif // SOC_AES_SUPPORT_GCM
|
2020-01-16 01:31:10 -05:00
|
|
|
|
|
|
|
#endif /* MBEDTLS_GCM_ALT */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|