-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mbed_tls: don't byteswap if HW acceleration is already big endian
Tested on: esp32: - vanilla wally without mbed - wally with mbed with acceleration off - wally with mbed with acceleration on esp32s3: - vanilla wally without mbed - wally with mbed with acceleration off - wally with mbed with acceleration on Should also work on esp32s2, esp32c3, esp32c6, esp32p4, etc Please note: There are 4 implementations: software, parallel engine, block engine, dma SOC_SHA_SUPPORT_PARALLEL_ENG is only defined for esp32. esp32s3 uses DMA SOC_SHA_ENDIANNESS_BE is not available in any currently released branch, only in master and only for esp32. An example of how idf checks for things: https://github.com/espressif/esp-idf/blob/master/components/mbedtls/port/sha/esp_sha.c#L19 We depend on `#include <soc/soc_caps.h>` to get SOC_SHA_SUPPORT_PARALLEL_ENG (which wasn't available to wally before!!!) and we depend on `#include <sdkconfig.h> to get CONFIG_MBEDTLS_HARDWARE_SHA which is necessary to distinguish between mbedtls with or without hw acceleration. esp32 -> requires the `cpu_to_be32` steps with both software and hardware sha esp32s3 -> requires `cpu_to_be32` only for software, for hardware the memcpy is enough `SOC_SHA_SUPPORT_PARALLEL_ENG` is defined only for esp32 `SOC_SHA_ENDIANNESS_BE` is defined only for esp32 but only in master and unreleased yet in a stable release. `SOC_SHA_SUPPORT_DMA` is defined for esp32s3 (and esp32s2)
- Loading branch information
1 parent
88cbaa0
commit e443bca
Showing
5 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters