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
AlgorithmEncryption
(Software)
Decryption
(Software)
Encryption
(Hardware)
Decryption
(Hardware)
3DES-CBC0.57 MB/s0.562 MB/s--
3DES-CTR0.561 MB/s0.561 MB/s--
AES128-CBC1.976 MB/s1.941 MB/s7.352 MB/s6.896 MB/s
AES192-CBC1.712 MB/s1.68 MB/s7.407 MB/s6.849 MB/s
AES256-CBC1.506 MB/s1.483 MB/s7.407 MB/s6.849 MB/s
AES128-CTR1.876 MB/s1.876 MB/s5.847 MB/s5.847 MB/s
AES192-CTR1.631 MB/s1.631 MB/s5.847 MB/s5.813 MB/s
AES256-CTR1.445 MB/s1.445 MB/s5.813 MB/s5.78 MB/s
SM4-CBC2.188 MB/s2.132 MB/s--
SM4-CTR2.061 MB/s2.061 MB/s--

AEAD Algorithms

ESP32-S2 @ 240 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using GCC with optimization level 3
AlgorithmEncryption
(Software)
Decryption
(Software)
Encryption
(Hardware)
Decryption
(Hardware)
AES128-GCM1.206 MB/s1.204 MB/s1.242 MB/s1.219 MB/s
AES192-GCM1.097 MB/s1.097 MB/s1.226 MB/s1.206 MB/s
AES256-GCM1.009 MB/s1.009 MB/s1.216 MB/s1.193 MB/s
AES128-CCM1.003 MB/s1.003 MB/s1.053 MB/s1.038 MB/s
AES192-CCM0.861 MB/s0.862 MB/s1.035 MB/s1.021 MB/s
AES256-CCM0.754 MB/s0.755 MB/s1.016 MB/s1.004 MB/s
SM4-GCM1.282 MB/s1.282 MB/s--
SM4-CCM1.116 MB/s1.116 MB/s--
Ascon-AEAD1281.464 MB/s1.438 MB/s--
ChaCha20Poly13052.84 MB/s2.832 MB/s--

Hash Algorithms

ESP32-S2 @ 240 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using GCC with optimization level 3
AlgorithmSpeed
(Software)
Speed
(Hardware)
MD512.658 MB/s-
SHA-12.469 MB/s29.411 MB/s
SHA-2242.192 MB/s25.641 MB/s
SHA-2562.192 MB/s24.39 MB/s
SHA-3841.416 MB/s32.258 MB/s
SHA-5121.418 MB/s33.333 MB/s
SHA3-2241.011 MB/s-
SHA3-2560.956 MB/s-
SHA3-3840.735 MB/s-
SHA3-5120.511 MB/s-
SM32.04 MB/s-
Ascon-Hash2560.546 MB/s-

Signature Algorithms

ESP32-S2 @ 240 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using GCC with optimization level 3
AlgorithmGeneration
(Software)
Verification
(Software)
Generation
(Hardware)
Verification
(Hardware)
RSA (1024 bits)111 ms16 ms31 ms11 ms
RSA (2048 bits)682 ms60 ms126 ms42 ms
RSA (3072 bits)2091 ms130 ms303 ms89 ms
RSA (4096 bits)4723 ms229 ms586 ms158 ms
DSA (1024 bits)68 ms137 ms24 ms50 ms
DSA (2048 bits)346 ms718 ms85 ms195 ms

EC Signature Algorithms

ESP32-S2 @ 240 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using GCC with optimization level 3
AlgorithmGeneration
(Software)
Verification
(Software)
Generation
(Hardware)
Verification
(Hardware)
ECDSA (secp256r1)85 ms83 ms61 ms50 ms
ECDSA (secp384r1)226 ms208 ms116 ms105 ms
ECDSA (secp521r1)500 ms452 ms218 ms187 ms
ECDSA (brainpoolP256r1)165 ms168 ms60 ms55 ms
ECDSA (brainpoolP384r1)459 ms462 ms120 ms115 ms
ECDSA (brainpoolP512r1)978 ms1000 ms209 ms199 ms
SM275 ms75 ms55 ms55 ms
EdDSA (Ed25519)30 ms27 ms--
EdDSA (Ed448)119 ms105 ms--

Key Exchange Algorithms

ESP32-S2 @ 240 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using GCC with optimization level 3
AlgorithmPublic Key Generation
(Software)
Shared Secret Computation
(Software)
Public Key Generation
(Hardware)
Shared Secret Computation
(Hardware)
Diffie-Hellman (1024 bits)291 ms291 ms27 ms26 ms
Diffie-Hellman (2048 bits)2176 ms2176 ms155 ms155 ms

EC Key Exchange Algorithms

ESP32-S2 @ 240 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using GCC with optimization level 3
AlgorithmPublic Key Generation
(Software)
Shared Secret Computation
(Software)
Public Key Generation
(Hardware)
Shared Secret Computation
(Hardware)
ECDH (secp256r1)75 ms74 ms57 ms58 ms
ECDH (secp384r1)198 ms197 ms111 ms110 ms
ECDH (secp521r1)430 ms430 ms207 ms206 ms
ECDH (brainpoolP256r1)153 ms153 ms57 ms56 ms
ECDH (brainpoolP384r1)425 ms425 ms114 ms113 ms
ECDH (brainpoolP512r1)906 ms906 ms197 ms197 ms
ECDH (SM2)75 ms75 ms56 ms55 ms
ECDH (X25519)16 ms17 ms--
ECDH (X448)58 ms58 ms--