2021-10-29 10:09:53 +05:30
|
|
|
/*
|
|
|
|
* gcm_alt.h: AES block cipher
|
2020-01-16 14:31:10 +08:00
|
|
|
*
|
2021-10-29 10:09:53 +05:30
|
|
|
* SPDX-FileCopyrightText: The Mbed TLS Contributors
|
2020-01-16 14:31:10 +08:00
|
|
|
*
|
2021-10-29 10:09:53 +05:30
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2020-01-16 14:31:10 +08:00
|
|
|
*
|
2022-03-03 09:34:39 +05:30
|
|
|
* SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
|
2020-01-16 14:31:10 +08:00
|
|
|
*/
|
|
|
|
#ifndef GCM_ALT_H
|
|
|
|
#define GCM_ALT_H
|
|
|
|
|
2020-11-12 15:11:38 +08:00
|
|
|
#include "soc/soc_caps.h"
|
|
|
|
|
2020-01-16 14:31:10 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_GCM_ALT)
|
|
|
|
|
2022-06-28 11:19:58 +08:00
|
|
|
|
2020-11-12 15:11:38 +08:00
|
|
|
#include "aes/esp_aes_gcm.h"
|
2020-01-16 14:31:10 +08: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 15:28:36 +05:30
|
|
|
#define mbedtls_gcm_update_ad esp_aes_gcm_update_ad
|
2020-01-16 14:31:10 +08: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
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_GCM_ALT */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|