Cryptographic performance on STM32WBA Series

Revision as of 11:55, 26 April 2023 by Registered User
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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


1. Measurement configuration

1.1. Hardware configuration

STM32 MCU STM32WBA52CGUx
Device ID 0x492
Revision ID 0x1000
Board NUCLEO-WBA52CG

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 100 MHz
Flash latency 3 wait states
Voltage scaling Range 1
ICACHE peripheral 1 (0: disabled / 1: enabled)
Prefetch Cache (ART) 1 (0: disabled / 1: enabled)

1.4. Development toolchains and compilers

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


2. Performance values

2.1. AES symmetric key encryption and 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 5296 52 µs
AES CBC 128 bits 32 bytes Encryption Fast 4765 47 µs
AES CBC 128 bits 64 bytes Encryption Small 8696 86 µs
AES CBC 128 bits 64 bytes Encryption Fast 7413 74 µs
AES CBC 128 bits 128 bytes Encryption Small 15 481 154 µs
AES CBC 128 bits 128 bytes Encryption Fast 12 727 127 µs
AES CBC 192 bits 32 bytes Encryption Small 5886 58 µs
AES CBC 192 bits 32 bytes Encryption Fast 5248 52 µs
AES CBC 192 bits 64 bytes Encryption Small 9858 98 µs
AES CBC 192 bits 64 bytes Encryption Fast 8319 83 µs
AES CBC 192 bits 128 bytes Encryption Small 17 806 178 µs
AES CBC 192 bits 128 bytes Encryption Fast 14 452 144 µs
AES CBC 256 bits 32 bytes Encryption Small 6708 67 µs
AES CBC 256 bits 32 bytes Encryption Fast 5879 58 µs
AES CBC 256 bits 64 bytes Encryption Small 11 258 112 µs
AES CBC 256 bits 64 bytes Encryption Fast 9341 93 µs
AES CBC 256 bits 128 bytes Encryption Small 20 361 203 µs
AES CBC 256 bits 128 bytes Encryption Fast 16 271 162 µs
AES CBC 128 bits 32 bytes Decryption Small 8859 88 µs
AES CBC 128 bits 32 bytes Decryption Fast 5951 59 µs
AES CBC 128 bits 64 bytes Decryption Small 15 806 158 µs
AES CBC 128 bits 64 bytes Decryption Fast 8612 86 µs
AES CBC 128 bits 128 bytes Decryption Small 29 674 296 µs
AES CBC 128 bits 128 bytes Decryption Fast 13 969 139 µs
AES CBC 192 bits 32 bytes Decryption Small 10 293 102 µs
AES CBC 192 bits 32 bytes Decryption Fast 6551 65 µs
AES CBC 192 bits 64 bytes Decryption Small 18 579 185 µs
AES CBC 192 bits 64 bytes Decryption Fast 9658 96 µs
AES CBC 192 bits 128 bytes Decryption Small 35 171 351 µs
AES CBC 192 bits 128 bytes Decryption Fast 15 814 158 µs
AES CBC 256 bits 32 bytes Decryption Small 11 869 118 µs
AES CBC 256 bits 32 bytes Decryption Fast 7426 74 µs
AES CBC 256 bits 64 bytes Decryption Small 21 537 215 µs
AES CBC 256 bits 64 bytes Decryption Fast 10 915 109 µs
AES CBC 256 bits 128 bytes Decryption Small 40 865 408 µs
AES CBC 256 bits 128 bytes Decryption Fast 17 863 178 µs
Cryptolib STM32WBA52 AES CBC SB Enc.svg
Cryptolib STM32WBA52 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 2960 bytes 380 bytes 1 bytes 524 bytes
Encryption Fast 3292 bytes 1404 bytes 1 bytes 548 bytes
Decryption Small 3056 bytes 636 bytes 1 bytes 552 bytes
Decryption Fast 3716 bytes 1660 bytes 1 bytes 556 bytes
Cryptolib STM32WBA52 AES CBC SB Enc FP.svg
Cryptolib STM32WBA52 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 the 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 855 584 935 kbyte/s
AES CBC 128 bits 8000 bytes 128 bytes Encryption Fast 673 616 1187 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Encryption Small 849 760 941 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Encryption Fast 667 952 1197 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Encryption Small 848 744 942 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Encryption Fast 666 944 1199 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Encryption Small 848 240 943 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Encryption Fast 666 448 1200 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Encryption Small 1 000 536 799 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Encryption Fast 774 440 1033 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Encryption Small 994 768 804 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Encryption Fast 768 776 1040 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Encryption Small 993 768 805 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Encryption Fast 767 776 1041 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Encryption Small 993 256 805 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Encryption Fast 767 280 1042 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Encryption Small 1 145 512 698 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Encryption Fast 875 112 914 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Encryption Small 1 139 712 701 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Encryption Fast 869 496 920 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Encryption Small 1 138 720 702 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Encryption Fast 868 472 921 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Encryption Small 1 138 216 702 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Encryption Fast 867 968 921 kbyte/s
AES CBC 128 bits 8000 bytes 128 bytes Decryption Small 1 761 568 454 kbyte/s
AES CBC 128 bits 8000 bytes 128 bytes Decryption Fast 696 600 1148 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Decryption Small 1 753 456 456 kbyte/s
AES CBC 128 bits 8000 bytes 512 bytes Decryption Fast 688 568 1161 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Decryption Small 1 751 040 456 kbyte/s
AES CBC 128 bits 8000 bytes 1024 bytes Decryption Fast 686 256 1165 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Decryption Small 1 748 240 457 kbyte/s
AES CBC 128 bits 8000 bytes 2048 bytes Decryption Fast 683 224 1170 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Decryption Small 2 102 416 380 kbyte/s
AES CBC 192 bits 8000 bytes 128 bytes Decryption Fast 798 280 1002 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Decryption Small 2 094 448 381 kbyte/s
AES CBC 192 bits 8000 bytes 512 bytes Decryption Fast 790 304 1012 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Decryption Small 2 092 064 382 kbyte/s
AES CBC 192 bits 8000 bytes 1024 bytes Decryption Fast 787 984 1015 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Decryption Small 2 089 264 382 kbyte/s
AES CBC 192 bits 8000 bytes 2048 bytes Decryption Fast 784 816 1019 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Decryption Small 2 443 472 327 kbyte/s
AES CBC 256 bits 8000 bytes 128 bytes Decryption Fast 902 344 886 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Decryption Small 2 435 432 328 kbyte/s
AES CBC 256 bits 8000 bytes 512 bytes Decryption Fast 892 704 896 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Decryption Small 2 433 080 328 kbyte/s
AES CBC 256 bits 8000 bytes 1024 bytes Decryption Fast 889 920 898 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Decryption Small 2 430 224 329 kbyte/s
AES CBC 256 bits 8000 bytes 2048 bytes Decryption Fast 886 784 902 kbyte/s
Cryptolib STM32WBA52 AES CBC DF Enc.svg
Cryptolib STM32WBA52 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 2852 bytes 372 bytes 1 bytes 140 bytes
Encryption Fast 3184 bytes 1396 bytes 1 bytes 172 bytes
Decryption Small 2948 bytes 628 bytes 1 bytes 176 bytes
Decryption Fast 3608 bytes 1652 bytes 1 bytes 180 bytes
Cryptolib STM32WBA52 AES CBC DF Enc FP.svg
Cryptolib STM32WBA52 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 5065 50 µs
SHA256 64 bytes 8219 82 µs
SHA256 128 bytes 11 160 111 µs
SHA384 32 bytes 16 499 164 µs
SHA384 64 bytes 16 678 166 µs
SHA384 128 bytes 30 348 303 µs
Cryptolib STM32WBA52 HASH SB Dig.svg


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

HASH mode Code Constant data Global data Stack usage
SHA256 1780 296 bytes 1 bytes 564 bytes
SHA384 3012 744 bytes 1 bytes 1124 bytes
Cryptolib STM32WBA52 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 397 676 2011 kbyte/s
SHA256 8000 bytes 512 bytes 375 254 2131 kbyte/s
SHA256 8000 bytes 1024 bytes 371 463 2153 kbyte/s
SHA256 8000 bytes 2048 bytes 369 576 2164 kbyte/s
SHA384 8000 bytes 128 bytes 877 195 911 kbyte/s
SHA384 8000 bytes 512 bytes 837 452 955 kbyte/s
SHA384 8000 bytes 1024 bytes 830 525 963 kbyte/s
SHA384 8000 bytes 2048 bytes 827 078 967 kbyte/s
Cryptolib STM32WBA52 HASH DF Dig.svg


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

HASH mode Cycles Time
SHA256 4302 43 µs
SHA384 15 429 154 µs

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

HASH mode Code Constant data Global data Stack usage
SHA256 1788 bytes 288 bytes 1 bytes 372 bytes
SHA384 3020 bytes 736 bytes 1 bytes 828 bytes
Cryptolib STM32WBA52 HASH DF Dig FP.svg


2.3. ECDSA signature and verification

In this section we provide the performance results for ECDSA signature and 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 2 917 808 29 ms
SECP256R1 Signature Small High 2 829 048 28 ms
SECP256R1 Signature SuperFast Low 1 909 112 19 ms
SECP256R1 Signature SuperFast High 1 844 032 18 ms
SECP256R1 Verification Small Low 7 001 176 70 ms
SECP256R1 Verification Small High 6 209 896 62 ms
SECP256R1 Verification SuperFast Low 4 665 488 46 ms
SECP256R1 Verification SuperFast High 4 116 840 41 ms
SECP384R1 Signature Small Low 8 245 464 82 ms
SECP384R1 Signature Small High 7 882 992 78 ms
SECP384R1 Signature Fast Low 7 025 136 70 ms
SECP384R1 Signature Fast High 6 711 016 67 ms
SECP384R1 Verification Small Low 19 725 584 197 ms
SECP384R1 Verification Small High 17 126 576 171 ms
SECP384R1 Verification Fast Low 16 891 728 168 ms
SECP384R1 Verification Fast High 14 641 512 146 ms
Cryptolib STM32WBA52 ECDSA Sig.svg
Cryptolib STM32WBA52 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 636 bytes 1184 bytes 1 bytes 328 bytes 628 bytes
SECP256R1 Signature Small High 11 636 bytes 1568 bytes 1 bytes 328 bytes 696 bytes
SECP256R1 Signature SuperFast Low 12 946 bytes 1184 bytes 1 bytes 332 bytes 628 bytes
SECP256R1 Signature SuperFast High 12 946 bytes 1568 bytes 1 bytes 332 bytes 696 bytes
SECP256R1 Verification Small Low 12 158 bytes 1200 bytes 1 bytes 424 bytes 856 bytes
SECP256R1 Verification Small High 12 158 bytes 1584 bytes 1 bytes 424 bytes 1648 bytes
SECP256R1 Verification SuperFast Low 13 468 bytes 1200 bytes 1 bytes 428 bytes 856 bytes
SECP256R1 Verification SuperFast High 13 468 bytes 1584 bytes 1 bytes 428 bytes 1648 bytes
SECP384R1 Signature Small Low 11 636 bytes 1664 bytes 1 bytes 328 bytes 884 bytes
SECP384R1 Signature Small High 11 636 bytes 2240 bytes 1 bytes 328 bytes 984 bytes
SECP384R1 Signature Fast Low 12 006 bytes 1664 bytes 1 bytes 344 bytes 884 bytes
SECP384R1 Signature Fast High 12 006 bytes 2240 bytes 1 bytes 344 bytes 984 bytes
SECP384R1 Verification Small Low 12 158 bytes 1680 bytes 1 bytes 424 bytes 1192 bytes
SECP384R1 Verification Small High 12 158 bytes 2256 bytes 1 bytes 424 bytes 2272 bytes
SECP384R1 Verification Fast Low 12 528 bytes 1680 bytes 1 bytes 440 bytes 1192 bytes
SECP384R1 Verification Fast High 12 528 bytes 2256 bytes 1 bytes 440 bytes 2272 bytes
Cryptolib STM32WBA52 ECDSA SECP256R1 Sig FP.svg
Cryptolib STM32WBA52 ECDSA SECP256R1 Ver FP.svg
Cryptolib STM32WBA52 ECDSA SECP384R1 Sig FP.svg
Cryptolib STM32WBA52 ECDSA SECP384R1 Ver FP.svg


2.4. EdDSA signature and verification

In this section we provide the performance results for EdDSA signature and 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 4 507 192 45 ms
Ed25519 1023 bytes Signature Small OptHigh 2 628 744 26 ms
Ed25519 1023 bytes Signature SuperFast OptLow 3 213 416 32 ms
Ed25519 1023 bytes Signature SuperFast OptHigh 1 901 752 19 ms
Ed25519 1023 bytes Verification Small OptLow 6 790 080 67 ms
Ed25519 1023 bytes Verification Small OptHigh 5 956 688 59 ms
Ed25519 1023 bytes Verification SuperFast OptLow 4 645 264 46 ms
Ed25519 1023 bytes Verification SuperFast OptHigh 4 058 672 40 ms
Cryptolib STM32WBA52 EdDSA Sig.svg
Cryptolib STM32WBA52 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 100 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature Small OptHigh 14 506 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptLow 15 410 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptHigh 15 816 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Verification Small OptLow 14 186 bytes 1748 bytes 1 bytes 1244 bytes 1152 bytes
Ed25519 1023 bytes Verification Small OptHigh 14 592 bytes 2900 bytes 1 bytes 1244 bytes 1992 bytes
Ed25519 1023 bytes Verification SuperFast OptLow 15 496 bytes 1748 bytes 1 bytes 1244 bytes 1152 bytes
Ed25519 1023 bytes Verification SuperFast OptHigh 15 902 bytes 2900 bytes 1 bytes 1244 bytes 1992 bytes
Cryptolib STM32WBA52 EdDSA Sig FP.svg
Cryptolib STM32WBA52 EdDSA Ver FP.svg


2.5. RSA signature and verification

In this section we provide the performance results for RSA signature and 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 198 351 888 1983 ms
v2.2 CRT SHA-256 3K Signature Small Mid 149 291 360 1492 ms
v2.2 CRT SHA-256 3K Signature Small High 125 368 672 1253 ms
v2.2 CRT SHA-256 3K Signature Fast Low 158 891 936 1588 ms
v2.2 CRT SHA-256 3K Signature Fast Mid 119 654 968 1196 ms
v2.2 CRT SHA-256 3K Signature Fast High 100 072 224 1000 ms
v2.2 No CRT SHA-256 3K Signature Small Low 763 442 592 7634 ms
v2.2 No CRT SHA-256 3K Signature Small Mid 573 385 744 5733 ms
v2.2 No CRT SHA-256 3K Signature Small High 479 616 872 4796 ms
v2.2 No CRT SHA-256 3K Signature Fast Low 606 864 864 6068 ms
v2.2 No CRT SHA-256 3K Signature Fast Mid 455 876 296 4558 ms
v2.2 No CRT SHA-256 3K Signature Fast High 380 469 896 3804 ms
v2.2 n/a SHA-256 3K Verification Small n/a 3 811 016 38 ms
v2.2 n/a SHA-256 3K Verification Fast n/a 3 285 032 32 ms
Cryptolib STM32WBA52 RSA Sig.svg
Cryptolib STM32WBA52 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 6986 bytes 372 bytes 5 bytes 700 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Small Mid 7234 bytes 372 bytes 5 bytes 700 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Small High 7234 bytes 372 bytes 5 bytes 700 bytes 6708 bytes
v2.2 CRT SHA-256 3K Signature Fast Low 7356 bytes 372 bytes 5 bytes 700 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Fast Mid 7604 bytes 372 bytes 5 bytes 700 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Fast High 7604 bytes 372 bytes 5 bytes 700 bytes 6708 bytes
v2.2 No CRT SHA-256 3K Signature Small Low 6016 bytes 364 bytes 5 bytes 700 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Small Mid 6264 bytes 364 bytes 5 bytes 700 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Small High 6264 bytes 364 bytes 5 bytes 700 bytes 9368 bytes
v2.2 No CRT SHA-256 3K Signature Fast Low 6386 bytes 364 bytes 5 bytes 700 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Fast Mid 6634 bytes 364 bytes 5 bytes 700 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Fast High 6634 bytes 364 bytes 5 bytes 700 bytes 9368 bytes
v2.2 n/a SHA-256 3K Verification Small n/a 6762 bytes 368 bytes 5 bytes 716 bytes 3108 bytes
v2.2 n/a SHA-256 3K Verification Fast n/a 7132 bytes 368 bytes 5 bytes 716 bytes 3108 bytes
Cryptolib STM32WBA52 RSA 3K CRT Sig FP.svg
Cryptolib STM32WBA52 RSA 3K NoCRT Sig FP.svg
Cryptolib STM32WBA52 RSA 3K Ver FP.svg