Crypto Benchmark on ESP32 MCU
Tensilica Xtensa LX6 @ 240 MHz
This benchmark conducted on ESP32-DevKitC Development Board will help you in qualifying performance of CycloneCRYPTO (Cryptography library), CycloneSSL (TLS 1.3 & DTLS 1.2 library), CycloneSSH (SSH library with SCP & SFTP protocols), CycloneIPSEC (IPsec/IKEv2 library) and CycloneTCP (TCP/IPv4/IPv6 stack with secure protocols like HTTPS, FTPS, MQTTS, Secure WebSocket, Secure CoAP, Secure Modbus/TCP, SNMPv3...) running on Espressif ESP32 microcontroller.
ESP32 MCU also includes crypto hardware acceleration. In the following comparison charts, both hardware and software performance are presented in the relevant sections.
Cipher Algorithms
ESP32 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Encryption (Software) | Decryption (Software) | Encryption (Hardware) | Decryption (Hardware) |
---|---|---|---|---|
3DES-CBC | 0.563 MB/s | 0.557 MB/s | - | - |
3DES-CTR | 0.565 MB/s | 0.565 MB/s | - | - |
AES128-CBC | 1.953 MB/s | 1.915 MB/s | 10 MB/s | 11.363 MB/s |
AES192-CBC | 1.689 MB/s | 1.658 MB/s | 9.708 MB/s | 11.363 MB/s |
AES256-CBC | 1.488 MB/s | 1.464 MB/s | 9.708 MB/s | 11.363 MB/s |
AES128-CTR | 1.984 MB/s | 1.984 MB/s | 10.204 MB/s | 10.204 MB/s |
AES192-CTR | 1.715 MB/s | 1.715 MB/s | 10 MB/s | 9.9 MB/s |
AES256-CTR | 1.506 MB/s | 1.506 MB/s | 10 MB/s | 9.9 MB/s |
SM4-CBC | 2.202 MB/s | 2.15 MB/s | - | - |
SM4-CTR | 2.237 MB/s | 2.242 MB/s | - | - |
AEAD Algorithms
ESP32 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Encryption (Software) | Decryption (Software) | Encryption (Hardware) | Decryption (Hardware) |
---|---|---|---|---|
AES128-GCM | 1.25 MB/s | 1.245 MB/s | 1.808 MB/s | 1.805 MB/s |
AES192-GCM | 1.135 MB/s | 1.131 MB/s | 1.785 MB/s | 1.776 MB/s |
AES256-GCM | 1.038 MB/s | 1.036 MB/s | 1.773 MB/s | 1.769 MB/s |
AES128-CCM | 1.005 MB/s | 1.007 MB/s | 2.036 MB/s | 2.04 MB/s |
AES192-CCM | 0.862 MB/s | 0.863 MB/s | 1.968 MB/s | 1.98 MB/s |
AES256-CCM | 0.754 MB/s | 0.755 MB/s | 1.941 MB/s | 1.949 MB/s |
SM4-GCM | 1.347 MB/s | 1.344 MB/s | - | - |
SM4-CCM | 1.14 MB/s | 1.142 MB/s | - | - |
Ascon-AEAD128 | 1.466 MB/s | 1.438 MB/s | - | - |
ChaCha20Poly1305 | 3.076 MB/s | 3.086 MB/s | - | - |
Hash Algorithms
ESP32 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Speed (Software) | Speed (Hardware) |
---|---|---|
MD5 | 13.513 MB/s | - |
SHA-1 | 2.531 MB/s | 28.571 MB/s |
SHA-224 | 2.173 MB/s | - |
SHA-256 | 2.173 MB/s | 27.777 MB/s |
SHA-384 | 1.412 MB/s | 29.411 MB/s |
SHA-512 | 1.412 MB/s | 29.411 MB/s |
SHA3-224 | 1.017 MB/s | - |
SHA3-256 | 0.961 MB/s | - |
SHA3-384 | 0.738 MB/s | - |
SHA3-512 | 0.513 MB/s | - |
SM3 | 2.105 MB/s | - |
Ascon-Hash256 | 0.545 MB/s | - |
Signature Algorithms
ESP32 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Generation (Software) | Verification (Software) | Generation (Hardware) | Verification (Hardware) |
---|---|---|---|---|
RSA (1024 bits) | 96 ms | 13 ms | 34 ms | 18 ms |
RSA (2048 bits) | 587 ms | 47 ms | 167 ms | 106 ms |
RSA (3072 bits) | 1802 ms | 100 ms | 465 ms | 314 ms |
RSA (4096 bits) | 4072 ms | 177 ms | 996 ms | 698 ms |
DSA (1024 bits) | 58 ms | 117 ms | 28 ms | 57 ms |
DSA (2048 bits) | 296 ms | 605 ms | 131 ms | 277 ms |
EC Signature Algorithms
ESP32 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Generation (Software) | Verification (Software) | Generation (Hardware) | Verification (Hardware) |
---|---|---|---|---|
ECDSA (secp256r1) | 82 ms | 74 ms | 62 ms | 57 ms |
ECDSA (secp384r1) | 219 ms | 207 ms | 135 ms | 124 ms |
ECDSA (secp521r1) | 470 ms | 422 ms | 241 ms | 213 ms |
ECDSA (brainpoolP256r1) | 161 ms | 162 ms | 134 ms | 134 ms |
ECDSA (brainpoolP384r1) | 441 ms | 447 ms | 245 ms | 245 ms |
ECDSA (brainpoolP512r1) | 939 ms | 965 ms | 437 ms | 440 ms |
SM2 | 72 ms | 72 ms | 55 ms | 55 ms |
EdDSA (Ed25519) | 29 ms | 28 ms | - | - |
EdDSA (Ed448) | 114 ms | 102 ms | - | - |
Key Exchange Algorithms
ESP32 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Public Key Generation (Software) | Shared Secret Computation (Software) | Public Key Generation (Hardware) | Shared Secret Computation (Hardware) |
---|---|---|---|---|
Diffie-Hellman (1024 bits) | 256 ms | 256 ms | 19 ms | 19 ms |
Diffie-Hellman (2048 bits) | 1898 ms | 1898 ms | 106 ms | 106 ms |
EC Key Exchange Algorithms
ESP32 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Public Key Generation (Software) | Shared Secret Computation (Software) | Public Key Generation (Hardware) | Shared Secret Computation (Hardware) |
---|---|---|---|---|
ECDH (secp256r1) | 71 ms | 70 ms | 54 ms | 54 ms |
ECDH (secp384r1) | 191 ms | 190 ms | 121 ms | 121 ms |
ECDH (secp521r1) | 404 ms | 404 ms | 209 ms | 209 ms |
ECDH (brainpoolP256r1) | 148 ms | 148 ms | 124 ms | 123 ms |
ECDH (brainpoolP384r1) | 409 ms | 409 ms | 228 ms | 228 ms |
ECDH (brainpoolP512r1) | 869 ms | 869 ms | 407 ms | 406 ms |
ECDH (SM2) | 72 ms | 71 ms | 55 ms | 54 ms |
ECDH (X25519) | 17 ms | 16 ms | - | - |
ECDH (X448) | 58 ms | 58 ms | - | - |