mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat: remove some deprecated APIs from 6.0 release
This commit is contained in:
@@ -150,12 +150,6 @@ static int esp_aes_validate_input(esp_aes_context *ctx, const unsigned char *inp
|
||||
}
|
||||
|
||||
|
||||
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 encryption
|
||||
@@ -182,12 +176,6 @@ int esp_internal_aes_encrypt(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 decryption
|
||||
|
||||
@@ -106,12 +106,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 single block decryption
|
||||
@@ -140,12 +134,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);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -109,50 +109,6 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
esp_err_t esp_crypto_shared_gdma_start(const lldesc_t *input, const lldesc_t *output, gdma_trigger_peripheral_t peripheral)
|
||||
{
|
||||
int rx_ch_id = 0;
|
||||
esp_err_t ret = ESP_OK;
|
||||
|
||||
if (tx_channel == NULL) {
|
||||
/* Allocate a pair of RX and TX for crypto, should only happen the first time we use the GMDA
|
||||
or if user called esp_crypto_shared_gdma_release */
|
||||
ret = crypto_shared_gdma_init();
|
||||
}
|
||||
|
||||
if (ret != ESP_OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Tx channel is shared between AES and SHA, need to connect to peripheral every time */
|
||||
gdma_disconnect(tx_channel);
|
||||
|
||||
#ifdef SOC_SHA_SUPPORTED
|
||||
if (peripheral == GDMA_TRIG_PERIPH_SHA) {
|
||||
gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_SHA, 0));
|
||||
} else
|
||||
#endif // SOC_SHA_SUPPORTED
|
||||
#ifdef SOC_AES_SUPPORTED
|
||||
if (peripheral == GDMA_TRIG_PERIPH_AES) {
|
||||
gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_AES, 0));
|
||||
} else
|
||||
#endif // SOC_AES_SUPPORTED
|
||||
{
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
/* tx channel is reset by gdma_connect(), also reset rx to ensure a known state */
|
||||
gdma_get_channel_id(rx_channel, &rx_ch_id);
|
||||
|
||||
#if SOC_AHB_GDMA_VERSION == 1
|
||||
gdma_ll_rx_reset_channel(&GDMA, rx_ch_id);
|
||||
#endif /* SOC_AHB_GDMA_VERSION */
|
||||
|
||||
gdma_start(tx_channel, (intptr_t)input);
|
||||
gdma_start(rx_channel, (intptr_t)output);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
/* The external memory ecc-aes access must be enabled when there exists
|
||||
at least one buffer in the DMA descriptors that resides in external memory. */
|
||||
|
||||
@@ -345,11 +345,6 @@ int esp_internal_aes_decrypt( esp_aes_context *ctx, const unsigned char input[16
|
||||
/** XTS-AES 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 );
|
||||
|
||||
/** 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));
|
||||
|
||||
/** 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));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -15,19 +15,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Start a GDMA transfer on the shared crypto DMA channel
|
||||
* Only supports AHB-DMA.
|
||||
*
|
||||
* @note Will allocate a GDMA channel for AES & SHA if no such channel is already allocated
|
||||
*
|
||||
* @param input Input linked list descriptor (lldesc_t *)
|
||||
* @param output Output linked list descriptor (lldesc_t *)
|
||||
* @param peripheral Crypto peripheral to connect the DMA to, either GDMA_TRIG_PERIPH_AES or
|
||||
* GDMA_TRIG_PERIPH_SHA
|
||||
* @return esp_err_t ESP_FAIL if no GDMA channel available
|
||||
*/
|
||||
esp_err_t esp_crypto_shared_gdma_start(const lldesc_t *input, const lldesc_t *output, gdma_trigger_peripheral_t peripheral) __attribute__((deprecated("use esp_crypto_shared_gdma_start_axi_ahb instead")));
|
||||
|
||||
/**
|
||||
* @brief Start a GDMA transfer on the shared crypto DMA channel
|
||||
@@ -60,7 +47,7 @@ bool esp_crypto_shared_gdma_done(void);
|
||||
* This means this function should not be called from code which already takes these locks,
|
||||
* i.e. inside our AES/SHA code.
|
||||
*
|
||||
* If you are continously using AES/SHA (e.g. because of a wifi connection) then it's not recommended
|
||||
* If you are continuously using AES/SHA (e.g. because of a wifi connection) then it's not recommended
|
||||
* to use this API. Freeing the channel is mainly for use cases where you are finished with the crypto peripherals
|
||||
* and need the DMA channel for other peripherals. An example would be doing some processing after disconnecting WiFi
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user