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.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Encryption (Software) | Decryption (Software) | Encryption (Hardware) | Decryption (Hardware) |
---|---|---|---|---|
3DES-CBC | 0.57 MB/s | 0.562 MB/s | - | - |
3DES-CTR | 0.561 MB/s | 0.561 MB/s | - | - |
AES128-CBC | 1.976 MB/s | 1.941 MB/s | 7.352 MB/s | 6.896 MB/s |
AES192-CBC | 1.712 MB/s | 1.68 MB/s | 7.407 MB/s | 6.849 MB/s |
AES256-CBC | 1.506 MB/s | 1.483 MB/s | 7.407 MB/s | 6.849 MB/s |
AES128-CTR | 1.876 MB/s | 1.876 MB/s | 5.847 MB/s | 5.847 MB/s |
AES192-CTR | 1.631 MB/s | 1.631 MB/s | 5.847 MB/s | 5.813 MB/s |
AES256-CTR | 1.445 MB/s | 1.445 MB/s | 5.813 MB/s | 5.78 MB/s |
SM4-CBC | 2.188 MB/s | 2.132 MB/s | - | - |
SM4-CTR | 2.061 MB/s | 2.061 MB/s | - | - |
AEAD Algorithms
ESP32-S2 @ 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.206 MB/s | 1.204 MB/s | 1.242 MB/s | 1.219 MB/s |
AES192-GCM | 1.097 MB/s | 1.097 MB/s | 1.226 MB/s | 1.206 MB/s |
AES256-GCM | 1.009 MB/s | 1.009 MB/s | 1.216 MB/s | 1.193 MB/s |
AES128-CCM | 1.003 MB/s | 1.003 MB/s | 1.053 MB/s | 1.038 MB/s |
AES192-CCM | 0.861 MB/s | 0.862 MB/s | 1.035 MB/s | 1.021 MB/s |
AES256-CCM | 0.754 MB/s | 0.755 MB/s | 1.016 MB/s | 1.004 MB/s |
SM4-GCM | 1.282 MB/s | 1.282 MB/s | - | - |
SM4-CCM | 1.116 MB/s | 1.116 MB/s | - | - |
Ascon-AEAD128 | 1.464 MB/s | 1.438 MB/s | - | - |
ChaCha20Poly1305 | 2.84 MB/s | 2.832 MB/s | - | - |
Hash Algorithms
ESP32-S2 @ 240 MHz
- • Benchmark generated with CycloneCRYPTO 2.5.0
- • Compiled using GCC with optimization level 3
Algorithm | Speed (Software) | Speed (Hardware) |
---|---|---|
MD5 | 12.658 MB/s | - |
SHA-1 | 2.469 MB/s | 29.411 MB/s |
SHA-224 | 2.192 MB/s | 25.641 MB/s |
SHA-256 | 2.192 MB/s | 24.39 MB/s |
SHA-384 | 1.416 MB/s | 32.258 MB/s |
SHA-512 | 1.418 MB/s | 33.333 MB/s |
SHA3-224 | 1.011 MB/s | - |
SHA3-256 | 0.956 MB/s | - |
SHA3-384 | 0.735 MB/s | - |
SHA3-512 | 0.511 MB/s | - |
SM3 | 2.04 MB/s | - |
Ascon-Hash256 | 0.546 MB/s | - |
Signature Algorithms
ESP32-S2 @ 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) | 111 ms | 16 ms | 31 ms | 11 ms |
RSA (2048 bits) | 682 ms | 60 ms | 126 ms | 42 ms |
RSA (3072 bits) | 2091 ms | 130 ms | 303 ms | 89 ms |
RSA (4096 bits) | 4723 ms | 229 ms | 586 ms | 158 ms |
DSA (1024 bits) | 68 ms | 137 ms | 24 ms | 50 ms |
DSA (2048 bits) | 346 ms | 718 ms | 85 ms | 195 ms |
EC Signature Algorithms
ESP32-S2 @ 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) | 85 ms | 83 ms | 61 ms | 50 ms |
ECDSA (secp384r1) | 226 ms | 208 ms | 116 ms | 105 ms |
ECDSA (secp521r1) | 500 ms | 452 ms | 218 ms | 187 ms |
ECDSA (brainpoolP256r1) | 165 ms | 168 ms | 60 ms | 55 ms |
ECDSA (brainpoolP384r1) | 459 ms | 462 ms | 120 ms | 115 ms |
ECDSA (brainpoolP512r1) | 978 ms | 1000 ms | 209 ms | 199 ms |
SM2 | 75 ms | 75 ms | 55 ms | 55 ms |
EdDSA (Ed25519) | 30 ms | 27 ms | - | - |
EdDSA (Ed448) | 119 ms | 105 ms | - | - |
Key Exchange Algorithms
ESP32-S2 @ 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) | 291 ms | 291 ms | 27 ms | 26 ms |
Diffie-Hellman (2048 bits) | 2176 ms | 2176 ms | 155 ms | 155 ms |
EC Key Exchange Algorithms
ESP32-S2 @ 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) | 75 ms | 74 ms | 57 ms | 58 ms |
ECDH (secp384r1) | 198 ms | 197 ms | 111 ms | 110 ms |
ECDH (secp521r1) | 430 ms | 430 ms | 207 ms | 206 ms |
ECDH (brainpoolP256r1) | 153 ms | 153 ms | 57 ms | 56 ms |
ECDH (brainpoolP384r1) | 425 ms | 425 ms | 114 ms | 113 ms |
ECDH (brainpoolP512r1) | 906 ms | 906 ms | 197 ms | 197 ms |
ECDH (SM2) | 75 ms | 75 ms | 56 ms | 55 ms |
ECDH (X25519) | 16 ms | 17 ms | - | - |
ECDH (X448) | 58 ms | 58 ms | - | - |