1 /*
2  * gcm_alt.h: AES block cipher
3  *
4  * SPDX-FileCopyrightText: The Mbed TLS Contributors
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  *
8  * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD
9  */
10 #ifndef GCM_ALT_H
11 #define GCM_ALT_H
12 
13 #include "soc/soc_caps.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #if defined(MBEDTLS_GCM_ALT)
20 
21 
22 #include "aes/esp_aes_gcm.h"
23 
24 
25 typedef esp_gcm_context mbedtls_gcm_context;
26 
27 #define mbedtls_gcm_init            esp_aes_gcm_init
28 #define mbedtls_gcm_free            esp_aes_gcm_free
29 #define mbedtls_gcm_setkey          esp_aes_gcm_setkey
30 #define mbedtls_gcm_starts          esp_aes_gcm_starts
31 #define mbedtls_gcm_update_ad       esp_aes_gcm_update_ad
32 #define mbedtls_gcm_update          esp_aes_gcm_update
33 #define mbedtls_gcm_finish          esp_aes_gcm_finish
34 #define mbedtls_gcm_auth_decrypt    esp_aes_gcm_auth_decrypt
35 #define mbedtls_gcm_crypt_and_tag   esp_aes_gcm_crypt_and_tag
36 
37 #endif /* MBEDTLS_GCM_ALT */
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif
44