Cryptographic Performances on STM32WB Series

Revision as of 15:20, 6 May 2021 by Registered User (Created page with "{{DISPLAYTITLE:Cryptographic Performances on STM32WB Series}} == Measurement configuration == === Hardware configuration === {| class="st-table" | '''''STM32 MCU''''' ||...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


1. Measurement configuration

1.1. Hardware configuration

STM32 MCU STM32WB55RG
Device ID 0x495
Revision ID 0x2001
Board P-NUCLEO-WB55

1.2. Firmware Configuration

Cryptographic Library version 040000B1

1.3. System Configuration

System Core Clock Frequency 64 MHz
Flash latency 3 wait states
Voltage scaling Range 1
Instruction Cache (ART/ICU) 1 (0: disabled / 1: enabled)
Data Cache (ART/DCU) 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 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 µs.
  • Data flow: a big message is encrypted or decrypted by chunk. Bit rate is given in Kbytes 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
AES CBC 128Bits 32 bytes Encryption Small 5846 91 µs
AES CBC 128Bits 32 bytes Encryption Fast 6251 97 µs
AES CBC 128Bits 64 bytes Encryption Small 9287 145 µs
AES CBC 128Bits 64 bytes Encryption Fast 10068 157 µs
AES CBC 128Bits 128 bytes Encryption Small 16142 252 µs
AES CBC 128Bits 128 bytes Encryption Fast 17656 275 µs
AES CBC 192Bits 32 bytes Encryption Small 6458 100 µs
AES CBC 192Bits 32 bytes Encryption Fast 6854 107 µs
AES CBC 192Bits 64 bytes Encryption Small 10444 163 µs
AES CBC 192Bits 64 bytes Encryption Fast 11258 175 µs
AES CBC 192Bits 128 bytes Encryption Small 18416 287 µs
AES CBC 192Bits 128 bytes Encryption Fast 20036 313 µs
AES CBC 256Bits 32 bytes Encryption Small 7344 114 µs
AES CBC 256Bits 32 bytes Encryption Fast 7855 122 µs
AES CBC 256Bits 64 bytes Encryption Small 11873 185 µs
AES CBC 256Bits 64 bytes Encryption Fast 12889 201 µs
AES CBC 256Bits 128 bytes Encryption Small 20937 327 µs
AES CBC 256Bits 128 bytes Encryption Fast 22921 358 µs
AES CBC 128Bits 32 bytes Decryption Small 9867 154 µs
AES CBC 128Bits 32 bytes Decryption Fast 8246 128 µs
AES CBC 128Bits 64 bytes Decryption Small 17226 269 µs
AES CBC 128Bits 64 bytes Decryption Fast 12218 190 µs
AES CBC 128Bits 128 bytes Decryption Small 31942 499 µs
AES CBC 128Bits 128 bytes Decryption Fast 20173 315 µs
AES CBC 192Bits 32 bytes Decryption Small 11280 176 µs
AES CBC 192Bits 32 bytes Decryption Fast 9360 146 µs
AES CBC 192Bits 64 bytes Decryption Small 20069 313 µs
AES CBC 192Bits 64 bytes Decryption Fast 13954 218 µs
AES CBC 192Bits 128 bytes Decryption Small 37600 587 µs
AES CBC 192Bits 128 bytes Decryption Fast 23119 361 µs
AES CBC 256Bits 32 bytes Decryption Small 13094 204 µs
AES CBC 256Bits 32 bytes Decryption Fast 10691 167 µs
AES CBC 256Bits 64 bytes Decryption Small 23271 363 µs
AES CBC 256Bits 64 bytes Decryption Fast 15925 248 µs
AES CBC 256Bits 128 bytes Decryption Small 43681 682 µs
AES CBC 256Bits 128 bytes Decryption Fast 26378 412 µs
Cryptolib STM32WB55 AES CBC SB Enc.svg
Cryptolib STM32WB55 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 2936 bytes 380 bytes 1 bytes 524 bytes
Encryption Fast 3188 bytes 1404 bytes 1 bytes 548 bytes
Decryption Small 3068 bytes 636 bytes 1 bytes 552 bytes
Decryption Fast 3644 bytes 1660 bytes 1 bytes 556 bytes
Cryptolib STM32WB55 AES CBC SB Enc FP.svg
Cryptolib STM32WB55 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
AES CBC 128Bits 8000 bytes 128 bytes Encryption Small 874960 585 kB/s
AES CBC 128Bits 8000 bytes 128 bytes Encryption Fast 969024 528 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Encryption Small 865944 591 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Encryption Fast 960056 533 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Encryption Small 864392 592 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Encryption Fast 958704 534 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Encryption Small 863608 592 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Encryption Fast 958336 534 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Encryption Small 1012088 505 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Encryption Fast 1122432 456 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Encryption Small 1003680 510 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Encryption Fast 1112856 460 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Encryption Small 1002096 510 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Encryption Fast 1111088 460 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Encryption Small 1001464 511 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Encryption Fast 1110280 461 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Encryption Small 1150336 445 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Encryption Fast 1275136 401 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Encryption Small 1141832 448 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Encryption Fast 1266080 404 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Encryption Small 1140464 448 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Encryption Fast 1264432 404 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Encryption Small 1139680 449 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Encryption Fast 1264392 404 kB/s
AES CBC 128Bits 8000 bytes 128 bytes Decryption Small 1880776 272 kB/s
AES CBC 128Bits 8000 bytes 128 bytes Decryption Fast 1028896 497 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Decryption Small 1863960 274 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Decryption Fast 1010032 506 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Decryption Small 1859888 275 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Decryption Fast 1006504 508 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Decryption Small 1856056 275 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Decryption Fast 1002960 510 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Decryption Small 2233624 229 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Decryption Fast 1187432 431 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Decryption Small 2217408 230 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Decryption Fast 1170632 437 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Decryption Small 2213664 231 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Decryption Fast 1166576 438 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Decryption Small 2209952 231 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Decryption Fast 1162576 440 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Decryption Small 2588088 197 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Decryption Fast 1346928 380 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Decryption Small 2571832 199 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Decryption Fast 1327496 385 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Decryption Small 2567816 199 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Decryption Fast 1323832 386 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Decryption Small 2564048 199 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Decryption Fast 1320216 387 kB/s
Cryptolib STM32WB55 AES CBC DF Enc.svg
Cryptolib STM32WB55 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 2828 bytes 372 bytes 1 bytes 140 bytes
Encryption Fast 3080 bytes 1396 bytes 1 bytes 172 bytes
Decryption Small 2960 bytes 628 bytes 1 bytes 176 bytes
Decryption Fast 3536 bytes 1652 bytes 1 bytes 180 bytes
Cryptolib STM32WB55 AES CBC DF Enc FP.svg
Cryptolib STM32WB55 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 µs) needed to perform described operation.

HASH Mode Buffer Size Cycles Time
SHA256 32 bytes 5690 88 µs
SHA256 64 bytes 9037 141 µs
SHA256 128 bytes 12031 187 µs
SHA384 32 bytes 19376 302 µs
SHA384 64 bytes 19582 305 µs
SHA384 128 bytes 36328 567 µs
Cryptolib STM32WB55 HASH SB Dig.svg


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

HASH Mode Code Constant data Global Data Stack usage
SHA256 1848 296 bytes 1 bytes 564 bytes
SHA384 3004 744 bytes 1 bytes 1124 bytes
Cryptolib STM32WB55 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
SHA256 8000 bytes 128 bytes 425786 1202 kB/s
SHA256 8000 bytes 512 bytes 397319 1288 kB/s
SHA256 8000 bytes 1024 bytes 392537 1304 kB/s
SHA256 8000 bytes 2048 bytes 390133 1312 kB/s
SHA384 8000 bytes 128 bytes 1076672 475 kB/s
SHA384 8000 bytes 512 bytes 1028028 498 kB/s
SHA384 8000 bytes 1024 bytes 1019596 502 kB/s
SHA384 8000 bytes 2048 bytes 1015380 504 kB/s
Cryptolib STM32WB55 HASH DF Dig.svg


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

HASH Mode Cycles Time
SHA256 4623 72 µs
SHA384 18091 282 µs

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

HASH Mode Code Constant data Global Data Stack usage
SHA256 1856 bytes 288 bytes 1 bytes 372 bytes
SHA384 3012 bytes 736 bytes 1 bytes 828 bytes
Cryptolib STM32WB55 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 Operation ECC Mathematics configuration Curve definition Cycles Time
SECP256R1 Signature Small Low 3075208 48 ms
SECP256R1 Signature Small High 2991968 46 ms
SECP256R1 Signature SuperFast Low 2694104 42 ms
SECP256R1 Signature SuperFast High 2608416 40 ms
SECP256R1 Verification Small Low 7448632 116 ms
SECP256R1 Verification Small High 6621144 103 ms
SECP256R1 Verification SuperFast Low 6549376 102 ms
SECP256R1 Verification SuperFast High 5794800 90 ms
SECP384R1 Signature Small Low 8388992 131 ms
SECP384R1 Signature Small High 8037800 125 ms
SECP384R1 Signature Fast Low 8304872 129 ms
SECP384R1 Signature Fast High 7939504 124 ms
SECP384R1 Verification Small Low 20196544 315 ms
SECP384R1 Verification Small High 17572728 274 ms
SECP384R1 Verification Fast Low 19993632 312 ms
SECP384R1 Verification Fast High 17381696 271 ms
Cryptolib STM32WB55 ECDSA Sig.svg
Cryptolib STM32WB55 ECDSA Ver.svg


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 11732 bytes 1184 bytes 1 bytes 328 bytes 628 bytes
SECP256R1 Signature Small High 11732 bytes 1568 bytes 1 bytes 328 bytes 696 bytes
SECP256R1 Signature SuperFast Low 13042 bytes 1184 bytes 1 bytes 332 bytes 628 bytes
SECP256R1 Signature SuperFast High 13042 bytes 1568 bytes 1 bytes 332 bytes 696 bytes
SECP256R1 Verification Small Low 12216 bytes 1200 bytes 1 bytes 424 bytes 856 bytes
SECP256R1 Verification Small High 12216 bytes 1584 bytes 1 bytes 424 bytes 1648 bytes
SECP256R1 Verification SuperFast Low 13526 bytes 1200 bytes 1 bytes 428 bytes 856 bytes
SECP256R1 Verification SuperFast High 13526 bytes 1584 bytes 1 bytes 428 bytes 1648 bytes
SECP384R1 Signature Small Low 11732 bytes 1664 bytes 1 bytes 328 bytes 884 bytes
SECP384R1 Signature Small High 11732 bytes 2240 bytes 1 bytes 328 bytes 984 bytes
SECP384R1 Signature Fast Low 12102 bytes 1664 bytes 1 bytes 344 bytes 884 bytes
SECP384R1 Signature Fast High 12102 bytes 2240 bytes 1 bytes 344 bytes 984 bytes
SECP384R1 Verification Small Low 12216 bytes 1680 bytes 1 bytes 424 bytes 1192 bytes
SECP384R1 Verification Small High 12216 bytes 2256 bytes 1 bytes 424 bytes 2272 bytes
SECP384R1 Verification Fast Low 12586 bytes 1680 bytes 1 bytes 440 bytes 1192 bytes
SECP384R1 Verification Fast High 12586 bytes 2256 bytes 1 bytes 440 bytes 2272 bytes
Cryptolib STM32WB55 ECDSA SECP256R1 Sig FP.svg
Cryptolib STM32WB55 ECDSA SECP256R1 Ver FP.svg
Cryptolib STM32WB55 ECDSA SECP384R1 Sig FP.svg
Cryptolib STM32WB55 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
Ed25519 1023 bytes Signature Small OptLow 4867104 76 ms
Ed25519 1023 bytes Signature Small OptHigh 2848296 44 ms
Ed25519 1023 bytes Signature SuperFast OptLow 4374312 68 ms
Ed25519 1023 bytes Signature SuperFast OptHigh 2569768 40 ms
Ed25519 1023 bytes Verification Small OptLow 7257320 113 ms
Ed25519 1023 bytes Verification Small OptHigh 6367608 99 ms
Ed25519 1023 bytes Verification SuperFast OptLow 6428984 100 ms
Ed25519 1023 bytes Verification SuperFast OptHigh 5639016 88 ms
Cryptolib STM32WB55 EdDSA Sig.svg
Cryptolib STM32WB55 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 bytes Signature Small OptLow 14088 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature Small OptHigh 14494 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptLow 15398 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptHigh 15804 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Verification Small OptLow 14178 bytes 1748 bytes 1 bytes 1244 bytes 1152 bytes
Ed25519 1023 bytes Verification Small OptHigh 14584 bytes 2900 bytes 1 bytes 1244 bytes 1992 bytes
Ed25519 1023 bytes Verification SuperFast OptLow 15488 bytes 1748 bytes 1 bytes 1244 bytes 1152 bytes
Ed25519 1023 bytes Verification SuperFast OptHigh 15894 bytes 2900 bytes 1 bytes 1244 bytes 1992 bytes
Cryptolib STM32WB55 EdDSA Sig FP.svg
Cryptolib STM32WB55 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
v2.2 CRT SHA-256 3K Signature Small Low 187730904 2933 ms
v2.2 CRT SHA-256 3K Signature Small Mid 141318672 2208 ms
v2.2 CRT SHA-256 3K Signature Small High 118681608 1854 ms
v2.2 CRT SHA-256 3K Signature Fast Low 187024936 2922 ms
v2.2 CRT SHA-256 3K Signature Fast Mid 140843192 2200 ms
v2.2 CRT SHA-256 3K Signature Fast High 118266136 1847 ms
v2.2 No CRT SHA-256 3K Signature Small Low 713657520 11150 ms
v2.2 No CRT SHA-256 3K Signature Small Mid 536044336 8375 ms
v2.2 No CRT SHA-256 3K Signature Small High 448383472 7005 ms
v2.2 No CRT SHA-256 3K Signature Fast Low 712427032 11131 ms
v2.2 No CRT SHA-256 3K Signature Fast Mid 535159896 8361 ms
v2.2 No CRT SHA-256 3K Signature Fast High 447635992 6994 ms
v2.2 n/a SHA-256 3K Verification Small n/a 3822504 59 ms
v2.2 n/a SHA-256 3K Verification Fast n/a 3772624 58 ms
Cryptolib STM32WB55 RSA Sig.svg
Cryptolib STM32WB55 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 7034 bytes 370 bytes 5 bytes 700 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Small Mid 7282 bytes 370 bytes 5 bytes 700 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Small High 7282 bytes 370 bytes 5 bytes 700 bytes 6708 bytes
v2.2 CRT SHA-256 3K Signature Fast Low 7404 bytes 370 bytes 5 bytes 700 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Fast Mid 7652 bytes 370 bytes 5 bytes 700 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Fast High 7652 bytes 370 bytes 5 bytes 700 bytes 6708 bytes
v2.2 No CRT SHA-256 3K Signature Small Low 6064 bytes 362 bytes 5 bytes 700 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Small Mid 6312 bytes 362 bytes 5 bytes 700 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Small High 6312 bytes 362 bytes 5 bytes 700 bytes 9368 bytes
v2.2 No CRT SHA-256 3K Signature Fast Low 6434 bytes 362 bytes 5 bytes 700 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Fast Mid 6682 bytes 362 bytes 5 bytes 700 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Fast High 6682 bytes 362 bytes 5 bytes 700 bytes 9368 bytes
v2.2 n/a SHA-256 3K Verification Small n/a 6810 bytes 366 bytes 5 bytes 716 bytes 3108 bytes
v2.2 n/a SHA-256 3K Verification Fast n/a 7180 bytes 366 bytes 5 bytes 716 bytes 3108 bytes
Cryptolib STM32WB55 RSA 3K CRT Sig FP.svg
Cryptolib STM32WB55 RSA 3K NoCRT Sig FP.svg
Cryptolib STM32WB55 RSA 3K Ver FP.svg


No categories assignedEdit