Cryptographic performance on STM32L0 Series

This page reports measured performance when using the pure software cryptographic library algorithms with an STM32L0 MCU. In addition to performance figures, the required code footprint and memory are also given.


1. Measurement configuration

1.1. Hardware configuration

STM32 MCU STM32L073RZ
Device ID 0x447
Revision ID 0x2008
Board STM32L073RZ-Nucleo Rev C

1.2. Firmware configuration

Cryptographic Library version 040000B1[ver. 1]
  1. This value corresponds to the information returned by a call to cmox_getInfos

1.3. System configuration

System Core Clock Frequency 32 MHz
Flash latency 1 wait states
Voltage scaling Range 1
Prefetch Cache (ART) 1 (0: disabled / 1: enabled)

1.4. Development toolchains and compilers

IAR Embedded Workbench IAR ANSI C/C++ Compiler V8.50.4.261/W32 for ARM
Info white.png Information
NOTE: The measurements are done using a project built with High Speed optimization setting enabled.


2. Performance values

2.1. AES symmetric key encryption & decryption

This section provides the performance results for AES-CBC using different modes of operation:

  • Sole buffer: one sole buffer is encrypted or decrypted. Time to perform is given in µs.
  • Data flow: a big message is encrypted or decrypted by chunk. Bit rate is given in kilobytes per second.

2.1.1. Sole buffer mode

In this mode the entire encryption or decryption process, for the whole message size, is managed through a single API call provided by the CMOX library.

The table below shows the number of clock cycles and time (in µs) needed to perform the described operation in small and fast configurations.

AES mode Key size Buffer size Cipher operation Configuration Cycles Time
AES CBC 128 bits 32 bytes Encryption Small 9193 287 µs
AES CBC 128 bits 32 bytes Encryption Fast 7795 243 µs
AES CBC 128 bits 64 bytes Encryption Small 15 689 490 µs
AES CBC 128 bits 64 bytes Encryption Fast 12 889 402 µs
AES CBC 128 bits 128 bytes Encryption Small 28 673 896 µs
AES CBC 128 bits 128 bytes Encryption Fast 23 074 721 µs
AES CBC 192 bits 32 bytes Encryption Small 10 393 324 µs
AES CBC 192 bits 32 bytes Encryption Fast 8672 271 µs
AES CBC 192 bits 64 bytes Encryption Small 18 053 564 µs
AES CBC 192 bits 64 bytes Encryption Fast 14 612 456 µs
AES CBC 192 bits 128 bytes Encryption Small 33 361 1042 µs
AES CBC 192 bits 128 bytes Encryption Fast 26 486 827 µs
AES CBC 256 bits 32 bytes Encryption Small 11 949 373 µs
AES CBC 256 bits 32 bytes Encryption Fast 9908 309 µs
AES CBC 256 bits 64 bytes Encryption Small 20 771 649 µs
AES CBC 256 bits 64 bytes Encryption Fast 16 690 521 µs
AES CBC 256 bits 128 bytes Encryption Small 38 399 1199 µs
AES CBC 256 bits 128 bytes Encryption Fast 30 254 945 µs
AES CBC 128 bits 32 bytes Decryption Small 13 114 409 µs
AES CBC 128 bits 32 bytes Decryption Fast 9956 311 µs
AES CBC 128 bits 64 bytes Decryption Small 23 528 735 µs
AES CBC 128 bits 64 bytes Decryption Fast 15 260 476 µs
AES CBC 128 bits 128 bytes Decryption Small 44 350 1385 µs
AES CBC 128 bits 128 bytes Decryption Fast 25 866 808 µs
AES CBC 192 bits 32 bytes Decryption Small 15 175 474 µs
AES CBC 192 bits 32 bytes Decryption Fast 11 297 353 µs
AES CBC 192 bits 64 bytes Decryption Small 27 614 862 µs
AES CBC 192 bits 64 bytes Decryption Fast 17 481 546 µs
AES CBC 192 bits 128 bytes Decryption Small 52 488 1640 µs
AES CBC 192 bits 128 bytes Decryption Fast 29 849 932 µs
AES CBC 256 bits 32 bytes Decryption Small 17 589 549 µs
AES CBC 256 bits 32 bytes Decryption Fast 12 992 406 µs
AES CBC 256 bits 64 bytes Decryption Small 32 048 1001 µs
AES CBC 256 bits 64 bytes Decryption Fast 20 058 626 µs
AES CBC 256 bits 128 bytes Decryption Small 60 972 1905 µs
AES CBC 256 bits 128 bytes Decryption Fast 34 189 1068 µs
Cryptolib STM32L073 AES CBC SB Enc.svg
Cryptolib STM32L073 AES CBC SB Dec.svg


The table below shows Flash and RAM usage (in bytes).

Cipher operation Configuration Code Constant data Global data Stack usage
Encryption Small 3028 bytes 380 bytes 1 bytes 536 bytes
Encryption Fast 3276 bytes 1404 bytes 1 bytes 540 bytes
Decryption Small 3104 bytes 636 bytes 1 bytes 584 bytes
Decryption Fast 3696 bytes 1660 bytes 1 bytes 560 bytes
Cryptolib STM32L073 AES CBC SB Enc FP.svg
Cryptolib STM32L073 AES CBC SB Dec FP.svg


2.1.2. Data flow mode

In this mode, operation is performed in several calls to the CMOX library APIs, as below:

  • cmox_cipher_init
  • cmox_cipher_setKey
  • cmox_cipher_setIV
  • cmox_cipher_append: called several times to encrypt or decrypt the whole message by chunk of fixed size

The table below shows the number of clock cycles and bit rate (in kilobytes per second) needed to perform described operation in small and in fast configuration.

AES mode Key size Message size Chunk size Cipher operation Configuration Cycles Bit rate
AES CBC 128 bits 8000 bytes 128 bytes Encryption Small 1 639 800 156 kbyte/s
AES CBC 128 bits 8000 bytes 128 bytes Encryption Fast 1 289 976 198 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Encryption Small 1 631 200 156 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Encryption Fast 1 281 376 199 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Encryption Small 1 629 736 157 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Encryption Fast 1 279 912 200 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Encryption Small 1 629 008 157 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Encryption Fast 1 279 176 200 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Encryption Small 1 931 320 132 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Encryption Fast 1 501 376 170 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Encryption Small 1 922 720 133 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Encryption Fast 1 492 776 171 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Encryption Small 1 921 256 133 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Encryption Fast 1 491 320 171 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Encryption Small 1 920 528 133 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Encryption Fast 1 490 584 171 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Encryption Small 2 222 936 115 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Encryption Fast 1 712 792 149 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Encryption Small 2 214 336 115 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Encryption Fast 1 704 200 150 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Encryption Small 2 212 872 115 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Encryption Fast 1 702 736 150 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Encryption Small 2 212 144 115 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Encryption Fast 1 702 000 150 kbyte/s
AES CBC 128 bits 8000 bytes 128 bytes Decryption Small 2 640 856 96 kbyte/s
AES CBC 128 bits 8000 bytes 128 bytes Decryption Fast 1 363 456 187 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Decryption Small 2 629 424 97 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Decryption Fast 1 352 016 189 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Decryption Small 2 626 064 97 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Decryption Fast 1 348 656 189 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Decryption Small 2 622 088 97 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Decryption Fast 1 344 680 190 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Decryption Small 3 147 336 81 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Decryption Fast 1 583 856 161 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Decryption Small 3 135 904 81 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Decryption Fast 1 572 424 162 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Decryption Small 3 132 552 81 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Decryption Fast 1 569 072 163 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Decryption Small 3 128 568 81 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Decryption Fast 1 565 088 163 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Decryption Small 3 653 992 70 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Decryption Fast 1 804 320 141 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Decryption Small 3 642 552 70 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Decryption Fast 1 792 880 142 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Decryption Small 3 639 200 70 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Decryption Fast 1 789 528 143 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Decryption Small 3 635 224 70 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Decryption Fast 1 785 552 143 kbyte/s
Cryptolib STM32L073 AES CBC DF Enc.svg
Cryptolib STM32L073 AES CBC DF Dec.svg


The table below shows Flash and RAM usage (in bytes).

Cipher operation Configuration Code Constant data Global data Stack usage
Encryption Small 2950 bytes 372 bytes 1 bytes 152 bytes
Encryption Fast 3198 bytes 1396 bytes 1 bytes 164 bytes
Decryption Small 3022 bytes 628 bytes 1 bytes 208 bytes
Decryption Fast 3614 bytes 1652 bytes 1 bytes 184 bytes
Cryptolib STM32L073 AES CBC DF Enc FP.svg
Cryptolib STM32L073 AES CBC DF Dec FP.svg


2.2. HASH digest

In this section we provide the performance results for HASH using different modes of operation:

  • Sole buffer: one sole buffer is hashed. Time to perform is given in us.
  • Data flow: a big message is hashed by chunk. Bit rate is given in bytes per s.

2.2.1. Sole buffer mode

In this mode, the entire message hashing process is managed through a single API call provided by the CMOX library.

The table below shows the number of clock cycles and time (in µs) needed to perform described operation.

HASH mode Buffer size Cycles Time
SHA256 32 bytes 10 575 330 µs
SHA256 64 bytes 18 549 579 µs
SHA256 128 bytes 26 428 825 µs
SHA384 32 bytes 38 093 1190 µs
SHA384 64 bytes 38 105 1190 µs
SHA384 128 bytes 72 208 2256 µs
Cryptolib STM32L073 HASH SB Dig.svg


The table below shows Flash and RAM usage (in bytes).

HASH mode Code Constant data Global data Stack usage
SHA256 1846 296 bytes 1 bytes 580 bytes
SHA384 3158 744 bytes 1 bytes 1132 bytes
Cryptolib STM32L073 HASH SB Dig FP.svg


2.2.2. Data flow mode

In this mode, operation is performed in several calls to the CMOX library APIs, as below:

  • cmox_hash_init
  • cmox_hash_append: called several times to hash the whole message by chunk of fixed size
  • cmox_hash_generateTag

The table below shows the number of clock cycles and bit rate (in kilobytes per second) needed to perform described operation.

HASH mode Message size Chunk size Cycles Bit rate
SHA256 8000 bytes 128 bytes 1 007 541 254 kbyte/s
SHA256 8000 bytes 512 bytes 995 039 257 kbyte/s
SHA256 8000 bytes 1024 bytes 992 911 257 kbyte/s
SHA256 8000 bytes 2048 bytes 991 847 258 kbyte/s
SHA384 8000 bytes 128 bytes 2 129 997 120 kbyte/s
SHA384 8000 bytes 512 bytes 2 114 254 121 kbyte/s
SHA384 8000 bytes 1024 bytes 2 111 550 121 kbyte/s
SHA384 8000 bytes 2048 bytes 2 110 198 121 kbyte/s
Cryptolib STM32L073 HASH DF Dig.svg


The table below shows final tag generation done through the call to cmox_hash_generateTag.

HASH mode Cycles Time
SHA256 9878 308 µs
SHA384 37 332 1166 µs

The table below shows Flash and RAM usage (in bytes).

HASH mode Code Constant data Global data Stack usage
SHA256 1874 bytes 288 bytes 1 bytes 380 bytes
SHA384 3186 bytes 736 bytes 1 bytes 828 bytes
Cryptolib STM32L073 HASH DF Dig FP.svg


2.3. ECDSA signature & verification

In this section we provide the performance results for ECDSA signature & verification.

The table below shows the number of clock cycles and time (in ms) needed to perform described operation in different configurations.

Curve Operation ECC mathematics configuration Curve definition Cycles Time
SECP256R1 Signature Small Low 11 431 088 357 ms
SECP256R1 Signature Small High 11 068 032 345 ms
SECP256R1 Signature SuperFast Low 8 729 984 272 ms
SECP256R1 Signature SuperFast High 8 463 864 264 ms
SECP256R1 Verification Small Low 27 062 272 845 ms
SECP256R1 Verification Small High 23 981 072 749 ms
SECP256R1 Verification SuperFast Low 20 897 128 653 ms
SECP256R1 Verification SuperFast High 18 521 728 578 ms
SECP384R1 Signature Small Low 36 070 392 1127 ms
SECP384R1 Signature Small High 34 441 288 1076 ms
SECP384R1 Signature Fast Low 30 905 544 965 ms
SECP384R1 Signature Fast High 29 457 144 920 ms
SECP384R1 Verification Small Low 85 178 904 2661 ms
SECP384R1 Verification Small High 74 033 496 2313 ms
SECP384R1 Verification Fast Low 73 474 264 2296 ms
SECP384R1 Verification Fast High 63 686 760 1990 ms
Cryptolib STM32L073 ECDSA Sig.svg
Cryptolib STM32L073 ECDSA Ver.svg


The table below shows ECDSA Flash and RAM usage (in bytes).

Curve Operation ECC mathematics configuration Curve definition Code Constant data Global data Stack usage Working buffer
SECP256R1 Signature Small Low 11 900 bytes 1184 bytes 1 bytes 320 bytes 628 bytes
SECP256R1 Signature Small High 11 900 bytes 1568 bytes 1 bytes 320 bytes 696 bytes
SECP256R1 Signature SuperFast Low 15 240 bytes 1184 bytes 1 bytes 368 bytes 628 bytes
SECP256R1 Signature SuperFast High 15 240 bytes 1568 bytes 1 bytes 368 bytes 696 bytes
SECP256R1 Verification Small Low 12 370 bytes 1200 bytes 1 bytes 408 bytes 856 bytes
SECP256R1 Verification Small High 12 370 bytes 1584 bytes 1 bytes 408 bytes 1648 bytes
SECP256R1 Verification SuperFast Low 15 710 bytes 1200 bytes 1 bytes 456 bytes 856 bytes
SECP256R1 Verification SuperFast High 15 710 bytes 1584 bytes 1 bytes 456 bytes 1648 bytes
SECP384R1 Signature Small Low 11 900 bytes 1664 bytes 1 bytes 320 bytes 884 bytes
SECP384R1 Signature Small High 11 900 bytes 2240 bytes 1 bytes 320 bytes 984 bytes
SECP384R1 Signature Fast Low 12 738 bytes 1664 bytes 1 bytes 312 bytes 884 bytes
SECP384R1 Signature Fast High 12 738 bytes 2240 bytes 1 bytes 312 bytes 984 bytes
SECP384R1 Verification Small Low 12 370 bytes 1680 bytes 1 bytes 408 bytes 1192 bytes
SECP384R1 Verification Small High 12 370 bytes 2256 bytes 1 bytes 408 bytes 2272 bytes
SECP384R1 Verification Fast Low 13 208 bytes 1680 bytes 1 bytes 400 bytes 1192 bytes
SECP384R1 Verification Fast High 13 208 bytes 2256 bytes 1 bytes 400 bytes 2272 bytes
Cryptolib STM32L073 ECDSA SECP256R1 Sig FP.svg
Cryptolib STM32L073 ECDSA SECP256R1 Ver FP.svg
Cryptolib STM32L073 ECDSA SECP384R1 Sig FP.svg
Cryptolib STM32L073 ECDSA SECP384R1 Ver FP.svg


2.4. EdDSA signature & verification

In this section we provide the performance results for EdDSA signature & verification.

The table below shows the number of clock cycles and time (in ms) needed to perform described operation in different configurations.

Curve Message size Operation ECC mathematics configuration Curve definition Cycles Time
Ed25519 1023 bytes Signature Small OptLow 16 244 968 507 ms
Ed25519 1023 bytes Signature Small OptHigh 9 340 840 291 ms
Ed25519 1023 bytes Signature SuperFast OptLow 13 025 552 407 ms
Ed25519 1023 bytes Signature SuperFast OptHigh 7 502 368 234 ms
Ed25519 1023 bytes Verification Small OptLow 25 536 152 798 ms
Ed25519 1023 bytes Verification Small OptHigh 22 325 672 697 ms
Ed25519 1023 bytes Verification SuperFast OptLow 20 046 144 626 ms
Ed25519 1023 bytes Verification SuperFast OptHigh 17 454 368 545 ms
Cryptolib STM32L073 EdDSA Sig.svg
Cryptolib STM32L073 EdDSA Ver.svg


The table below shows EdDSA Flash and RAM usage (in bytes).

Curve Message size Operation ECC mathematics configuration Curve definition Code Constant data Global data Stack usage Working buffer
Ed25519 1023 bytes Signature Small OptLow 14 550 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature Small OptHigh 14 972 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptLow 17 890 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptHigh 18 312 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Verification Small OptLow 14 608 bytes 1748 bytes 1 bytes 1236 bytes 1152 bytes
Ed25519 1023 bytes Verification Small OptHigh 15 030 bytes 2900 bytes 1 bytes 1236 bytes 1992 bytes
Ed25519 1023 bytes Verification SuperFast OptLow 17 948 bytes 1748 bytes 1 bytes 1236 bytes 1152 bytes
Ed25519 1023 bytes Verification SuperFast OptHigh 18 370 bytes 2900 bytes 1 bytes 1236 bytes 1992 bytes
Cryptolib STM32L073 EdDSA Sig FP.svg
Cryptolib STM32L073 EdDSA Ver FP.svg


2.5. RSA signature & verification

In this section we provide the performance results for RSA signature & verification.

The table below shows the number of clock cycles and time (in ms) needed to perform described operation in different configurations.

PKCS#1 Priv. key mod. exp. method Hash method Modulus size Operation RSA mathematics configuration Priv. key mod. exp. implementation Cycles Time
v2.2 CRT SHA-256 3K Signature Small Low 1 023 684 504 31 990 ms
v2.2 CRT SHA-256 3K Signature Small Mid 769 493 768 24 046 ms
v2.2 CRT SHA-256 3K Signature Small High 645 909 952 20 184 ms
v2.2 CRT SHA-256 3K Signature Fast Low 862 068 960 26 939 ms
v2.2 CRT SHA-256 3K Signature Fast Mid 627 699 328 19 615 ms
v2.2 CRT SHA-256 3K Signature Fast High 513 013 184 16 031 ms
v2.2 No CRT SHA-256 3K Signature Small Low 4 026 263 864 125 820 ms
v2.2 No CRT SHA-256 3K Signature Small Mid 3 022 536 552 94 454 ms
v2.2 No CRT SHA-256 3K Signature Small High 2 527 734 112 78 991 ms
v2.2 No CRT SHA-256 3K Signature Fast Low 3 381 230 512 105 663 ms
v2.2 No CRT SHA-256 3K Signature Fast Mid 2 452 500 600 76 640 ms
v2.2 No CRT SHA-256 3K Signature Fast High 1 993 174 792 62 286 ms
v2.2 n/a SHA-256 3K Verification Small n/a 15 942 952 498 ms
v2.2 n/a SHA-256 3K Verification Fast n/a 13 200 872 412 ms
Cryptolib STM32L073 RSA Sig.svg
Cryptolib STM32L073 RSA Ver.svg


The table below shows RSA Flash and RAM usage (in bytes).

PKCS#1 Priv. key mod. exp. method Hash method Modulus size Operation RSA mathematics configuration Priv. key mod. exp. implementation Code Constant data Global data Stack usage Working buffer
v2.2 CRT SHA-256 3K Signature Small Low 7260 bytes 369 bytes 5 bytes 708 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Small Mid 7538 bytes 370 bytes 5 bytes 708 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Small High 7538 bytes 370 bytes 5 bytes 708 bytes 6708 bytes
v2.2 CRT SHA-256 3K Signature Fast Low 8098 bytes 370 bytes 5 bytes 708 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Fast Mid 8376 bytes 370 bytes 5 bytes 708 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Fast High 8376 bytes 370 bytes 5 bytes 708 bytes 6708 bytes
v2.2 No CRT SHA-256 3K Signature Small Low 6274 bytes 362 bytes 5 bytes 708 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Small Mid 6552 bytes 362 bytes 5 bytes 708 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Small High 6552 bytes 362 bytes 5 bytes 708 bytes 9368 bytes
v2.2 No CRT SHA-256 3K Signature Fast Low 7112 bytes 361 bytes 5 bytes 708 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Fast Mid 7390 bytes 361 bytes 5 bytes 708 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Fast High 7390 bytes 361 bytes 5 bytes 708 bytes 9368 bytes
v2.2 n/a SHA-256 3K Verification Small n/a 7054 bytes 366 bytes 5 bytes 724 bytes 3108 bytes
v2.2 n/a SHA-256 3K Verification Fast n/a 7892 bytes 365 bytes 5 bytes 724 bytes 3108 bytes
Cryptolib STM32L073 RSA 3K CRT Sig FP.svg
Cryptolib STM32L073 RSA 3K NoCRT Sig FP.svg
Cryptolib STM32L073 RSA 3K Ver FP.svg