Signature verify seems SLOW with ECDSA and mbedtls
Posted: Wed Jan 19, 2022 1:42 am
Hi,
We're using ECDSA signing with public keys to verify data received over BLE.
I use a SHA256 hash of the data, giving a hash size of 32 bytes. The signature is 70-73 bytes.
After setting up a context and loading the public key (which is all reasonably fast), I am calling "mbedtls_ecdsa_read_signature" to verify the signature (against the calculated hash and public key).
The mbedtls_ecdsa_read_signature call takes about 900 mS to complete. This is problematic because it makes the device slow to respond to commands (the data being verified).
ESP32 at 160 MHz. I got a moderate speed increase (~20%) when I configured the ESP32 for 240 MHz.
Is taking ~900ms to run mbedtls_ecdsa_read_signature normal / expected?
Any way I can speed it up?
We're using ECDSA signing with public keys to verify data received over BLE.
I use a SHA256 hash of the data, giving a hash size of 32 bytes. The signature is 70-73 bytes.
After setting up a context and loading the public key (which is all reasonably fast), I am calling "mbedtls_ecdsa_read_signature" to verify the signature (against the calculated hash and public key).
The mbedtls_ecdsa_read_signature call takes about 900 mS to complete. This is problematic because it makes the device slow to respond to commands (the data being verified).
ESP32 at 160 MHz. I got a moderate speed increase (~20%) when I configured the ESP32 for 240 MHz.
Is taking ~900ms to run mbedtls_ecdsa_read_signature normal / expected?
Any way I can speed it up?