From c41b2b04154c9fa36dbbd6282b3657a3a480e068 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 21 Aug 2019 12:55:26 +1000 Subject: [PATCH] mbedtls: Remove esp_aes_encrypt/decrypt Deprecated in ESP-IDF V3.1 Anyone reading this should please include mbedtls/aes.h and use mbedTLS APIs, not the ESP-specific APIs. --- components/mbedtls/port/esp32/aes.c | 14 -------------- components/mbedtls/port/include/esp32/aes.h | 6 ------ 2 files changed, 20 deletions(-) diff --git a/components/mbedtls/port/esp32/aes.c b/components/mbedtls/port/esp32/aes.c index db8f1bf57..edf2e2f08 100644 --- a/components/mbedtls/port/esp32/aes.c +++ b/components/mbedtls/port/esp32/aes.c @@ -208,13 +208,6 @@ int esp_internal_aes_encrypt( esp_aes_context *ctx, return r; } -void esp_aes_encrypt( esp_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ) -{ - esp_internal_aes_encrypt(ctx, input, output); -} - /* * AES-ECB block decryption */ @@ -237,13 +230,6 @@ int esp_internal_aes_decrypt( esp_aes_context *ctx, return r; } -void esp_aes_decrypt( esp_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ) -{ - esp_internal_aes_decrypt(ctx, input, output); -} - /* * AES-ECB block encryption/decryption */ diff --git a/components/mbedtls/port/include/esp32/aes.h b/components/mbedtls/port/include/esp32/aes.h index 107193015..f423b8a7f 100644 --- a/components/mbedtls/port/include/esp32/aes.h +++ b/components/mbedtls/port/include/esp32/aes.h @@ -332,9 +332,6 @@ int esp_aes_xts_setkey_dec( esp_aes_xts_context *ctx, */ int esp_internal_aes_encrypt( esp_aes_context *ctx, const unsigned char input[16], unsigned char output[16] ); -/** Deprecated, see esp_aes_internal_encrypt */ -void esp_aes_encrypt( esp_aes_context *ctx, const unsigned char input[16], unsigned char output[16] ) __attribute__((deprecated)); - /** * \brief Internal AES block decryption function * (Only exposed to allow overriding it, @@ -346,9 +343,6 @@ void esp_aes_encrypt( esp_aes_context *ctx, const unsigned char input[16], unsig */ int esp_internal_aes_decrypt( esp_aes_context *ctx, const unsigned char input[16], unsigned char output[16] ); -/** Deprecated, see esp_aes_internal_decrypt */ -void esp_aes_decrypt( esp_aes_context *ctx, const unsigned char input[16], unsigned char output[16] ) __attribute__((deprecated)); - /** AES-XTS buffer encryption/decryption */ int esp_aes_crypt_xts( esp_aes_xts_context *ctx, int mode, size_t length, const unsigned char data_unit[16], const unsigned char *input, unsigned char *output );