Crypto Benchmark on ESP32-S2 MCU
Tensilica Xtensa LX7 @ 240 MHz
This benchmark conducted on ESP32-S2-DevKitC-1 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-S2 microcontroller.
ESP32-S2 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-S2 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.1.2
- • Compiled using GCC with optimization level 2
Algorithm | CBC Encrypt (Software) | CBC Decrypt (Software) | CCM Encrypt (Software) | CCM Decrypt (Software) | GCM Encrypt (Software) | GCM Decrypt (Software) |
---|---|---|---|---|---|---|
3DES | 0.457 MB/s | 0.456 MB/s | - | - | - | - |
AES-128 | 1.733 MB/s | 1.663 MB/s | 0.872 MB/s | 0.875 MB/s | 1.055 MB/s | 1.043 MB/s |
AES-192 | 1.488 MB/s | 1.43 MB/s | 0.744 MB/s | 0.746 MB/s | 0.957 MB/s | 0.947 MB/s |
AES-256 | 1.303 MB/s | 1.253 MB/s | 0.649 MB/s | 0.651 MB/s | 0.876 MB/s | 0.868 MB/s |
Algorithm | CBC Encrypt (Hardware) | CBC Decrypt (Hardware) | CCM Encrypt (Hardware) | CCM Decrypt (Hardware) | GCM Encrypt (Hardware) | GCM Decrypt (Hardware) |
---|---|---|---|---|---|---|
AES-128 | 7.352 MB/s | 6.849 MB/s | 0.906 MB/s | 0.909 MB/s | 1.081 MB/s | 1.066 MB/s |
AES-192 | 7.299 MB/s | 6.802 MB/s | 0.892 MB/s | 0.896 MB/s | 1.07 MB/s | 1.058 MB/s |
AES-256 | 7.299 MB/s | 6.849 MB/s | 0.88 MB/s | 0.882 MB/s | 1.06 MB/s | 1.048 MB/s |
Hash Algorithms
ESP32-S2 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.1.2
- • Compiled using GCC with optimization level 2
Algorithm | Speed (Software) | Speed (Hardware) |
---|---|---|
MD5 | 16.393 MB/s | - |
SHA-1 | 2.785 MB/s | 27.777 MB/s |
SHA-224 | 2.083 MB/s | 28.571 MB/s |
SHA-256 | 2.083 MB/s | 28.571 MB/s |
SHA-384 | 1.25 MB/s | 31.25 MB/s |
SHA-512 | 1.248 MB/s | 31.25 MB/s |
SHA3-224 | 0.887 MB/s | - |
SHA3-256 | 0.838 MB/s | - |
SHA3-384 | 0.642 MB/s | - |
SHA3-512 | 0.446 MB/s | - |
Signature Algorithms
ESP32-S2 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.1.2
- • Compiled using GCC with optimization level 2
Algorithm | Signature Generation (Software) | Signature Verification (Software) |
---|---|---|
RSA (1024 bits) | 118 ms | 17 ms |
RSA (2048 bits) | 720 ms | 66 ms |
RSA (3072 bits) | 2205 ms | 142 ms |
RSA (4096 bits) | 4977 ms | 252 ms |
DSA (1024 bits) | 74 ms | 149 ms |
DSA (2048 bits) | 371 ms | 766 ms |
Algorithm | Signature Generation (Hardware) | Signature Verification (Hardware) |
---|---|---|
RSA (1024 bits) | 34 ms | 13 ms |
RSA (2048 bits) | 138 ms | 47 ms |
RSA (3072 bits) | 328 ms | 99 ms |
RSA (4096 bits) | 629 ms | 177 ms |
DSA (1024 bits) | 27 ms | 57 ms |
DSA (2048 bits) | 96 ms | 216 ms |
EC Signature Algorithms
ESP32-S2 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.1.2
- • Compiled using GCC with optimization level 2
Algorithm | Signature Generation (Software) | Signature Verification (Software) |
---|---|---|
ECDSA (P-256) | 225 ms | 280 ms |
ECDSA (P-384) | 423 ms | 519 ms |
ECDSA (P-521) | 515 ms | 611 ms |
EdDSA (Ed25519) | 68 ms | 133 ms |
EdDSA (Ed448) | 311 ms | 619 ms |
Algorithm | Signature Generation (Hardware) | Signature Verification (Hardware) |
---|---|---|
EdDSA (Ed25519) | 58 ms | 116 ms |
EdDSA (Ed448) | 175 ms | 349 ms |
Key Exchange Algorithms
ESP32-S2 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.1.2
- • Compiled using GCC with optimization level 2
Algorithm | Public Key Generation (Software) | Shared Secret Computation (Software) |
---|---|---|
Diffie-Hellman (1024 bits) | 309 ms | 308 ms |
Diffie-Hellman (2048 bits) | 2299 ms | 2299 ms |
Algorithm | Public Key Generation (Hardware) | Shared Secret Computation (Hardware) |
---|---|---|
Diffie-Hellman (1024 bits) | 28 ms | 28 ms |
Diffie-Hellman (2048 bits) | 160 ms | 160 ms |
EC Key Exchange Algorithms
ESP32-S2 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.1.2
- • Compiled using GCC with optimization level 2
Algorithm | Public Key Generation (Software) | Shared Secret Computation (Software) |
---|---|---|
ECDH (P-256) | 222 ms | 221 ms |
ECDH (P-384) | 396 ms | 397 ms |
ECDH (P-521) | 500 ms | 500 ms |
ECDH (X25519) | 38 ms | 37 ms |
ECDH (X448) | 158 ms | 158 ms |
Algorithm | Public Key Generation (Hardware) | Shared Secret Computation (Hardware) |
---|---|---|
ECDH (X25519) | 32 ms | 33 ms |
ECDH (X448) | 92 ms | 91 ms |