mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-02 08:01:43 +01:00
change(esp_wifi): Port fast_pbkdf2 implementation for mbedlts
Add changes to use fast_pbkdf2 as default for PMK calculations. fast_pbkdf2 is significantly faster than current implementations for esp chips. Also removes unnecessary code for pbkdf-sha256 and pbkdf-sha512.
This commit is contained in:
@@ -50,6 +50,24 @@ typedef struct {
|
||||
esp_mbedtls_sha1_mode mode;
|
||||
} mbedtls_sha1_context;
|
||||
|
||||
/**
|
||||
* \brief Set the SHA-1 mode for a mbedtls_sha1_context.
|
||||
*
|
||||
* \param ctx The SHA-1 context structure.
|
||||
* \param mode The SHA-1 mode to be set. It can be one of the following:
|
||||
* - ESP_MBEDTLS_SHA1_UNUSED: Indicates that the first block hasn't been processed yet.
|
||||
* - ESP_MBEDTLS_SHA1_HARDWARE: Specifies the use of hardware SHA engine for SHA-1 calculations.
|
||||
* - ESP_MBEDTLS_SHA1_SOFTWARE: Specifies the use of software-based SHA-1 calculations.
|
||||
*
|
||||
* \return None.
|
||||
*/
|
||||
static inline void esp_mbedtls_set_sha1_mode(mbedtls_sha1_context *ctx, esp_mbedtls_sha1_mode mode)
|
||||
{
|
||||
if (ctx) {
|
||||
ctx->mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
#elif SOC_SHA_SUPPORT_DMA || SOC_SHA_SUPPORT_RESUME
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user