mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-18 19:43:17 +03:00
The AES-ECB port entry point processed exactly one 16-byte block per call, so a multi-block operation paid the cost of acquiring the peripheral, enabling its clock and writing the key once per block. That fixed cost is ~13.7 us on ESP32-C6 and dominates the AES transform itself at this scale. Add esp_aes_crypt_ecb_blocks(), which submits an entire buffer in a single hardware operation, mirroring the structure of esp_aes_crypt_cbc(). esp_aes_crypt_ecb() becomes a thin wrapper over it with length = 16 and is unchanged behaviourally; the public API is unchanged.