Cryptographic Performances on STM32L5 Series

Revision as of 09:33, 4 May 2021 by Registered User


1. Measurement configuration

1.1. Hardware configuration

STM32 MCU STM32L552ZET6Q
Device ID 0x472
Revision ID 0x2000
Board NUCLEO-L552ZE-Q

1.2. Firmware Configuration

Cryptographic Library version 040000B1

1.3. System Configuration

System Core Clock Frequency 110 MHz
Flash latency 5 wait states
Voltage scaling Range 0
Dual bank 0 (0: Single / 1: Dual)
ICACHE peripheral 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 build with High Speed optimization setting enabled.


2. Performances Values

2.1. AES Symmetric key encryption & decryption

In this section we provide 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 us.
  • Data flow: a big message is encrypted or decrypted by chunk. Bit rate is given in bytes per s.

2.1.1. Sole buffer mode

In this mode, operation is performed in one single call to one of the CMOX library APIs to encrypt or decrypt the whole message size.

Tables below shows the clock cycles and time (in us) needed to perform described operation in small and in fast configuration.

AES Mode Key size Buffer Size Cipher Operation Configuration Cycles Time (in us)
AES CBC 128Bits 16 bytes Encryption Small 4480 40
AES CBC 128Bits 16 bytes Encryption Fast 4666 42
AES CBC 128Bits 32 bytes Encryption Small 5570 50
AES CBC 128Bits 32 bytes Encryption Fast 4980 45
AES CBC 128Bits 64 bytes Encryption Small 8977 81
AES CBC 128Bits 64 bytes Encryption Fast 7688 69
AES CBC 128Bits 128 bytes Encryption Small 15763 143
AES CBC 128Bits 128 bytes Encryption Fast 13042 118
AES CBC 192Bits 16 bytes Encryption Small 4832 43
AES CBC 192Bits 16 bytes Encryption Fast 4950 45
AES CBC 192Bits 32 bytes Encryption Small 6125 55
AES CBC 192Bits 32 bytes Encryption Fast 5431 49
AES CBC 192Bits 64 bytes Encryption Small 10091 91
AES CBC 192Bits 64 bytes Encryption Fast 8468 76
AES CBC 192Bits 128 bytes Encryption Small 18066 164
AES CBC 192Bits 128 bytes Encryption Fast 14606 132
AES CBC 256Bits 16 bytes Encryption Small 5364 48
AES CBC 256Bits 16 bytes Encryption Fast 5457 49
AES CBC 256Bits 32 bytes Encryption Small 6908 62
AES CBC 256Bits 32 bytes Encryption Fast 6289 57
AES CBC 256Bits 64 bytes Encryption Small 11492 104
AES CBC 256Bits 64 bytes Encryption Fast 9748 88
AES CBC 256Bits 128 bytes Encryption Small 20629 187
AES CBC 256Bits 128 bytes Encryption Fast 16688 151
AES CBC 128Bits 16 bytes Decryption Small 6379 57
AES CBC 128Bits 16 bytes Decryption Fast 5980 54
AES CBC 128Bits 32 bytes Decryption Small 9119 82
AES CBC 128Bits 32 bytes Decryption Fast 6404 58
AES CBC 128Bits 64 bytes Decryption Small 16058 145
AES CBC 128Bits 64 bytes Decryption Fast 9121 82
AES CBC 128Bits 128 bytes Decryption Small 29936 272
AES CBC 128Bits 128 bytes Decryption Fast 14494 131
AES CBC 192Bits 16 bytes Decryption Small 7155 65
AES CBC 192Bits 16 bytes Decryption Fast 6526 59
AES CBC 192Bits 32 bytes Decryption Small 10650 96
AES CBC 192Bits 32 bytes Decryption Fast 7055 64
AES CBC 192Bits 64 bytes Decryption Small 18960 172
AES CBC 192Bits 64 bytes Decryption Fast 10153 92
AES CBC 192Bits 128 bytes Decryption Small 35606 323
AES CBC 192Bits 128 bytes Decryption Fast 16348 148
AES CBC 256Bits 16 bytes Decryption Small 8103 73
AES CBC 256Bits 16 bytes Decryption Fast 7231 65
AES CBC 256Bits 32 bytes Decryption Small 12344 112
AES CBC 256Bits 32 bytes Decryption Fast 7846 71
AES CBC 256Bits 64 bytes Decryption Small 22018 200
AES CBC 256Bits 64 bytes Decryption Fast 11352 103
AES CBC 256Bits 128 bytes Decryption Small 41400 376
AES CBC 256Bits 128 bytes Decryption Fast 18330 166
Cryptolib STM32L552 AES CBC SB Enc.svg
Cryptolib STM32L552 AES CBC SB Dec.svg


Table below shows flash and RAM usage (in bytes).

Cipher Operation Configuration Code Constant data Global Data Stack usage
Encryption Small 2960 380 1 524
Encryption Fast 3292 1404 1 548
Decryption Small 3056 636 1 552
Decryption Fast 3716 1660 1 556
Cryptolib STM32L552 AES CBC SB Enc FP.svg
Cryptolib STM32L552 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

Tables below shows the clock cycles and bit rate (in KBytes 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 (in KBytes per s)
AES CBC 128Bits 8000 128 bytes Encryption Small 858224 1025
AES CBC 128Bits 8000 128 bytes Encryption Fast 677400 1299
AES CBC 128Bits 8000 512 bytes Encryption Small 852544 1032
AES CBC 128Bits 8000 512 bytes Encryption Fast 671920 1309
AES CBC 128Bits 8000 1024 bytes Encryption Small 851512 1033
AES CBC 128Bits 8000 1024 bytes Encryption Fast 670856 1311
AES CBC 128Bits 8000 2048 bytes Encryption Small 851000 1034
AES CBC 128Bits 8000 2048 bytes Encryption Fast 670336 1312
AES CBC 192Bits 8000 128 bytes Encryption Small 1003328 877
AES CBC 192Bits 8000 128 bytes Encryption Fast 777784 1131
AES CBC 192Bits 8000 512 bytes Encryption Small 997616 882
AES CBC 192Bits 8000 512 bytes Encryption Fast 772392 1139
AES CBC 192Bits 8000 1024 bytes Encryption Small 996592 883
AES CBC 192Bits 8000 1024 bytes Encryption Fast 771376 1140
AES CBC 192Bits 8000 2048 bytes Encryption Small 996064 883
AES CBC 192Bits 8000 2048 bytes Encryption Fast 770872 1141
AES CBC 256Bits 8000 128 bytes Encryption Small 1148240 766
AES CBC 256Bits 8000 128 bytes Encryption Fast 878920 1001
AES CBC 256Bits 8000 512 bytes Encryption Small 1142576 770
AES CBC 256Bits 8000 512 bytes Encryption Fast 873440 1007
AES CBC 256Bits 8000 1024 bytes Encryption Small 1141576 770
AES CBC 256Bits 8000 1024 bytes Encryption Fast 872432 1008
AES CBC 256Bits 8000 2048 bytes Encryption Small 1141040 771
AES CBC 256Bits 8000 2048 bytes Encryption Fast 871928 1009
AES CBC 128Bits 8000 128 bytes Decryption Small 1769760 497
AES CBC 128Bits 8000 128 bytes Decryption Fast 711976 1235
AES CBC 128Bits 8000 512 bytes Decryption Small 1759496 500
AES CBC 128Bits 8000 512 bytes Decryption Fast 699160 1258
AES CBC 128Bits 8000 1024 bytes Decryption Small 1756672 500
AES CBC 128Bits 8000 1024 bytes Decryption Fast 695744 1264
AES CBC 128Bits 8000 2048 bytes Decryption Small 1753352 501
AES CBC 128Bits 8000 2048 bytes Decryption Fast 692112 1271
AES CBC 192Bits 8000 128 bytes Decryption Small 2110760 416
AES CBC 192Bits 8000 128 bytes Decryption Fast 813888 1081
AES CBC 192Bits 8000 512 bytes Decryption Small 2100608 418
AES CBC 192Bits 8000 512 bytes Decryption Fast 801232 1098
AES CBC 192Bits 8000 1024 bytes Decryption Small 2097704 419
AES CBC 192Bits 8000 1024 bytes Decryption Fast 797768 1103
AES CBC 192Bits 8000 2048 bytes Decryption Small 2094448 420
AES CBC 192Bits 8000 2048 bytes Decryption Fast 793832 1108
AES CBC 256Bits 8000 128 bytes Decryption Small 2451808 358
AES CBC 256Bits 8000 128 bytes Decryption Fast 916200 960
AES CBC 256Bits 8000 512 bytes Decryption Small 2441568 360
AES CBC 256Bits 8000 512 bytes Decryption Fast 903248 974
AES CBC 256Bits 8000 1024 bytes Decryption Small 2438760 360
AES CBC 256Bits 8000 1024 bytes Decryption Fast 899864 977
AES CBC 256Bits 8000 2048 bytes Decryption Small 2435328 361
AES CBC 256Bits 8000 2048 bytes Decryption Fast 895912 982
Cryptolib STM32L552 AES CBC DF Enc.svg
Cryptolib STM32L552 AES CBC DF Dec.svg


Table below shows flash and RAM usage (in bytes).

Cipher Operation Configuration Code Constant data Global Data Stack usage
Encryption Small 2852 372 1 140
Encryption Fast 3184 1396 1 172
Decryption Small 2948 628 1 176
Decryption Fast 3608 1652 1 180
Cryptolib STM32L552 AES CBC DF Enc FP.svg
Cryptolib STM32L552 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, operation is performed in one single call to one of the CMOX library APIs to digest the whole message size.

Tables below shows the clock cycles and time (in us) needed to perform described operation.

HASH Mode Buffer Size Cycles Time (in us)
SHA256 16 bytes 5808 52
SHA256 32 bytes 5309 48
SHA256 64 bytes 8480 77
SHA256 128 bytes 11427 103
SHA384 16 bytes 17438 158
SHA384 32 bytes 17009 154
SHA384 64 bytes 17149 155
SHA384 128 bytes 30831 280
Cryptolib STM32L552 HASH SB Dig.svg


Table below shows flash and RAM usage (in bytes).

HASH Mode Code Constant data Global Data Stack usage
SHA256 1780 296 1 564
SHA384 3012 744 1 1124
Cryptolib STM32L552 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

Tables below shows the clock cycles and bit rate (in KBytes per second) needed to perform described operation.

HASH Mode Message size Chunk Size Cycles Bit Rate (in KBytes per s)
SHA256 8000 128 bytes 400223 2198
SHA256 8000 512 bytes 377491 2331
SHA256 8000 1024 bytes 373770 2354
SHA256 8000 2048 bytes 371849 2366
SHA384 8000 128 bytes 879853 1000
SHA384 8000 512 bytes 839945 1047
SHA384 8000 1024 bytes 833099 1056
SHA384 8000 2048 bytes 829658 1060
Cryptolib STM32L552 HASH DF Dig.svg


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

HASH Mode Cycles Time (in us)
SHA256 4324 39
SHA384 15584 141

Table below shows flash and RAM usage (in bytes).

HASH Mode Code Constant data Global Data Stack usage
SHA256 1788 288 1 372
SHA384 3020 736 1 828
Cryptolib STM32L552 HASH DF Dig FP.svg


2.3. ECDSA Signature & Verification

In this section we provide the performance results for ECDSA Signature & Verification.

Tables below shows the clock cycles and time (in ms) needed to perform described operation in different configurations.

Curve Hash method Operation ECC Mathematics configuration Curve definition Cycles Time (in ms)
SECP256R1 SHA-256 Signature Small Low 2924624 26
SECP256R1 SHA-256 Signature Small High 2833152 25
SECP256R1 SHA-256 Signature SuperFast Low 1914056 17
SECP256R1 SHA-256 Signature SuperFast High 1856016 16
SECP256R1 SHA-256 Verification Small Low 7008992 63
SECP256R1 SHA-256 Verification Small High 6237136 56
SECP256R1 SHA-256 Verification SuperFast Low 4680328 42
SECP256R1 SHA-256 Verification SuperFast High 4119384 37
SECP384R1 SHA-384 Signature Small Low 8249576 74
SECP384R1 SHA-384 Signature Small High 7884680 71
SECP384R1 SHA-384 Signature Fast Low 7034360 63
SECP384R1 SHA-384 Signature Fast High 6713312 61
SECP384R1 SHA-384 Verification Small Low 19730496 179
SECP384R1 SHA-384 Verification Small High 17141648 155
SECP384R1 SHA-384 Verification Fast Low 17015888 154
SECP384R1 SHA-384 Verification Fast High 14637488 133
Cryptolib STM32L552 ECDSA Sig.svg
Cryptolib STM32L552 ECDSA Ver.svg


Table below shows ECDSA flash and RAM usage (in bytes).

Curve Hash method Operation ECC Mathematics configuration Curve definition Code Constant data Global Data Stack usage Working buffer
SECP256R1 SHA-256 Signature Small Low 11636 1184 1 328 628
SECP256R1 SHA-256 Signature Small High 11636 1568 1 328 696
SECP256R1 SHA-256 Signature SuperFast Low 12946 1184 1 332 628
SECP256R1 SHA-256 Signature SuperFast High 12946 1568 1 332 696
SECP256R1 SHA-256 Verification Small Low 12158 1200 1 424 856
SECP256R1 SHA-256 Verification Small High 12158 1584 1 424 1648
SECP256R1 SHA-256 Verification SuperFast Low 13468 1200 1 428 856
SECP256R1 SHA-256 Verification SuperFast High 13468 1584 1 428 1648
SECP384R1 SHA-384 Signature Small Low 11636 1664 1 328 884
SECP384R1 SHA-384 Signature Small High 11636 2240 1 328 984
SECP384R1 SHA-384 Signature Fast Low 12006 1664 1 344 884
SECP384R1 SHA-384 Signature Fast High 12006 2240 1 344 984
SECP384R1 SHA-384 Verification Small Low 12158 1680 1 424 1192
SECP384R1 SHA-384 Verification Small High 12158 2256 1 424 2272
SECP384R1 SHA-384 Verification Fast Low 12528 1680 1 440 1192
SECP384R1 SHA-384 Verification Fast High 12528 2256 1 440 2272
Cryptolib STM32L552 ECDSA SECP256R1 Sig FP.svg
Cryptolib STM32L552 ECDSA SECP256R1 Ver FP.svg
Cryptolib STM32L552 ECDSA SECP384R1 Sig FP.svg
Cryptolib STM32L552 ECDSA SECP384R1 Ver FP.svg


2.4. EdDSA Signature & Verification

In this section we provide the performance results for EdDSA Signature & Verification.

Tables below shows the 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 (in ms)
Ed25519 1023 Signature Small OptLow 4511896 41
Ed25519 1023 Signature Small OptHigh 2632648 23
Ed25519 1023 Signature SuperFast OptLow 3242920 29
Ed25519 1023 Signature SuperFast OptHigh 1919992 17
Ed25519 1023 Verification Small OptLow 6792304 61
Ed25519 1023 Verification Small OptHigh 5958792 54
Ed25519 1023 Verification SuperFast OptLow 4654664 42
Ed25519 1023 Verification SuperFast OptHigh 4072960 37
Cryptolib STM32L552 EdDSA Sig.svg
Cryptolib STM32L552 EdDSA Ver.svg


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 Signature Small OptLow 14100 1744 1 1236 1388
Ed25519 1023 Signature Small OptHigh 14506 2896 1 1236 1388
Ed25519 1023 Signature SuperFast OptLow 15410 1744 1 1236 1388
Ed25519 1023 Signature SuperFast OptHigh 15816 2896 1 1236 1388
Ed25519 1023 Verification Small OptLow 14186 1748 1 1244 1152
Ed25519 1023 Verification Small OptHigh 14592 2900 1 1244 1992
Ed25519 1023 Verification SuperFast OptLow 15496 1748 1 1244 1152
Ed25519 1023 Verification SuperFast OptHigh 15902 2900 1 1244 1992
Cryptolib STM32L552 EdDSA Sig FP.svg
Cryptolib STM32L552 EdDSA Ver FP.svg


2.5. RSA Signature & Verification

In this section we provide the performance results for RSA Signature & Verification.

Tables below shows the 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 (in ms)
v2.2 CRT SHA-256 3K Signature Small Low 198353328 1803
v2.2 CRT SHA-256 3K Signature Small Mid 149293056 1357
v2.2 CRT SHA-256 3K Signature Small High 125370232 1139
v2.2 CRT SHA-256 3K Signature Fast Low 158894368 1444
v2.2 CRT SHA-256 3K Signature Fast Mid 119683376 1088
v2.2 CRT SHA-256 3K Signature Fast High 100074160 909
v2.2 No CRT SHA-256 3K Signature Small Low 763443336 6940
v2.2 No CRT SHA-256 3K Signature Small Mid 573386688 5212
v2.2 No CRT SHA-256 3K Signature Small High 479617744 4360
v2.2 No CRT SHA-256 3K Signature Fast Low 606866800 5516
v2.2 No CRT SHA-256 3K Signature Fast Mid 455903856 4144
v2.2 No CRT SHA-256 3K Signature Fast High 380471192 3458
v2.2 n/a SHA-256 3K Verification Small n/a 3813464 34
v2.2 n/a SHA-256 3K Verification Fast n/a 3286840 29
Cryptolib STM32L552 RSA Sig.svg
Cryptolib STM32L552 RSA Ver.svg


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 6986 371 5 700 3704
v2.2 CRT SHA-256 3K Signature Small Mid 7234 371 5 700 4308
v2.2 CRT SHA-256 3K Signature Small High 7234 371 5 700 6708
v2.2 CRT SHA-256 3K Signature Fast Low 7356 371 5 700 3704
v2.2 CRT SHA-256 3K Signature Fast Mid 7604 371 5 700 4308
v2.2 CRT SHA-256 3K Signature Fast High 7604 371 5 700 6708
v2.2 No CRT SHA-256 3K Signature Small Low 6016 363 5 700 3484
v2.2 No CRT SHA-256 3K Signature Small Mid 6264 363 5 700 4664
v2.2 No CRT SHA-256 3K Signature Small High 6264 363 5 700 9368
v2.2 No CRT SHA-256 3K Signature Fast Low 6386 363 5 700 3484
v2.2 No CRT SHA-256 3K Signature Fast Mid 6634 363 5 700 4664
v2.2 No CRT SHA-256 3K Signature Fast High 6634 363 5 700 9368
v2.2 n/a SHA-256 3K Verification Small n/a 6762 367 5 716 3108
v2.2 n/a SHA-256 3K Verification Fast n/a 7132 367 5 716 3108
Cryptolib STM32L552 RSA 3K CRT Sig FP.svg
Cryptolib STM32L552 RSA 3K NoCRT Sig FP.svg
Cryptolib STM32L552 RSA 3K Ver FP.svg


No categories assignedEdit