Crypto Benchmark on STM32L4+ MCU
ARM Cortex-M4 @ 120 MHz

This benchmark conducted on B-L4S5I-IOT01A STM32L4+ discovery kit with STM32L4S5VIT6 MCU 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 STMicroelectronics STM32L4+ microcontroller.

STM32L4+ MCU also includes crypto hardware acceleration. In the following comparison charts, both hardware and software performance are presented in the relevant sections.

Cipher Algorithms

STM32L4S5 @ 120 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using ARMCC with optimization level 3
AlgorithmEncryption
(Software)
Decryption
(Software)
Encryption
(Hardware)
Decryption
(Hardware)
3DES-CBC0.172 MB/s0.172 MB/s--
3DES-CTR0.172 MB/s0.172 MB/s--
AES128-CBC0.949 MB/s0.965 MB/s17.482 MB/s17.482 MB/s
AES192-CBC0.817 MB/s0.836 MB/s--
AES256-CBC0.717 MB/s0.738 MB/s14.164 MB/s14.204 MB/s
AES128-CTR0.96 MB/s0.954 MB/s16.75 MB/s16.694 MB/s
AES192-CTR0.828 MB/s0.822 MB/s--
AES256-CTR0.726 MB/s0.719 MB/s13.698 MB/s13.623 MB/s
SM4-CBC1.282 MB/s1.238 MB/s--
SM4-CTR1.219 MB/s1.219 MB/s--

AEAD Algorithms

STM32L4S5 @ 120 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using ARMCC with optimization level 3
AlgorithmEncryption
(Software)
Decryption
(Software)
Encryption
(Hardware)
Decryption
(Hardware)
AES128-GCM0.526 MB/s0.528 MB/s15.772 MB/s15.455 MB/s
AES192-GCM0.482 MB/s0.483 MB/s--
AES256-GCM0.447 MB/s0.448 MB/s13.003 MB/s12.787 MB/s
AES128-CCM0.493 MB/s0.493 MB/s9.891 MB/s9.765 MB/s
AES192-CCM0.418 MB/s0.418 MB/s--
AES256-CCM0.366 MB/s0.365 MB/s7.812 MB/s7.727 MB/s
SM4-GCM0.655 MB/s0.653 MB/s--
SM4-CCM0.654 MB/s0.652 MB/s--
Ascon-AEAD1281.433 MB/s1.464 MB/s--
ChaCha20Poly13051.015 MB/s1.013 MB/s--

Hash Algorithms

STM32L4S5 @ 120 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using ARMCC with optimization level 3
AlgorithmSpeed
(Software)
Speed
(Hardware)
MD53.284 MB/s51.813 MB/s
SHA-11.66 MB/s47.619 MB/s
SHA-2241.511 MB/s50 MB/s
SHA-2561.511 MB/s50 MB/s
SHA-3840.698 MB/s-
SHA-5120.698 MB/s-
SHA3-2240.269 MB/s-
SHA3-2560.254 MB/s-
SHA3-3840.195 MB/s-
SHA3-5120.135 MB/s-
SM31.346 MB/s-
Ascon-Hash2560.592 MB/s-

Signature Algorithms

STM32L4S5 @ 120 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using ARMCC with optimization level 3
AlgorithmGeneration
(Software)
Verification
(Software)
RSA (1024 bits)168.7 ms30.6 ms
RSA (2048 bits)846.4 ms111.6 ms
RSA (3072 bits)2362.9 ms239 ms
DSA (1024 bits)94.2 ms196.7 ms
DSA (2048 bits)420.7 ms892.3 ms

EC Signature Algorithms

STM32L4S5 @ 120 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using ARMCC with optimization level 3
AlgorithmGeneration
(Software)
Verification
(Software)
ECDSA (secp256r1)128.7 ms116.1 ms
ECDSA (secp384r1)292 ms263.9 ms
ECDSA (secp521r1)592.5 ms519.8 ms
ECDSA (brainpoolP256r1)197.2 ms195.7 ms
ECDSA (brainpoolP384r1)513.9 ms510.2 ms
ECDSA (brainpoolP512r1)1065.7 ms1075.6 ms
SM2118.1 ms118.1 ms
EdDSA (Ed25519)50.8 ms46.7 ms
EdDSA (Ed448)179.6 ms159.5 ms

Key Exchange Algorithms

STM32L4S5 @ 120 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using ARMCC with optimization level 3
AlgorithmPublic Key Generation
(Software)
Shared Secret Computation
(Software)
Diffie-Hellman (1024 bits)321.4 ms320.8 ms
Diffie-Hellman (2048 bits)2155.7 ms2152.2 ms

EC Key Exchange Algorithms

STM32L4S5 @ 120 MHz

  • Benchmark generated with CycloneCRYPTO 2.5.0
  • Compiled using ARMCC with optimization level 3
AlgorithmPublic Key Generation
(Software)
Shared Secret Computation
(Software)
ECDH (secp256r1)117.3 ms117.1 ms
ECDH (secp384r1)262 ms261.7 ms
ECDH (secp521r1)516.7 ms516.1 ms
ECDH (brainpoolP256r1)184.2 ms183.9 ms
ECDH (brainpoolP384r1)478.4 ms478 ms
ECDH (brainpoolP512r1)990.8 ms990.4 ms
ECDH (SM2)118.1 ms117.9 ms
ECDH (X25519)28.3 ms28.3 ms
ECDH (X448)91.7 ms91.7 ms