Cryptographic Performances on STM32H7 Series

Revision as of 15:15, 6 May 2021 by Registered User (Created page with "{{DISPLAYTITLE:Cryptographic Performances on STM32H7 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 STM32H743ZI
Device ID 0x450
Revision ID 0x2003
Board STM32H743ZI-Nucleo

1.2. Firmware Configuration

Cryptographic Library version 040000B1

1.3. System Configuration

System Core Clock Frequency 400 MHz
Flash latency 4 wait states
Voltage scaling Range 3
Instruction Cache (ART/ICU) 1 (0: disabled / 1: enabled)
Data Cache (ART/DCU) 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 3843 9 µs
AES CBC 128Bits 32 bytes Encryption Fast 3215 8 µs
AES CBC 128Bits 64 bytes Encryption Small 5903 14 µs
AES CBC 128Bits 64 bytes Encryption Fast 4731 11 µs
AES CBC 128Bits 128 bytes Encryption Small 10112 25 µs
AES CBC 128Bits 128 bytes Encryption Fast 7846 19 µs
AES CBC 192Bits 32 bytes Encryption Small 4168 10 µs
AES CBC 192Bits 32 bytes Encryption Fast 3414 8 µs
AES CBC 192Bits 64 bytes Encryption Small 6634 16 µs
AES CBC 192Bits 64 bytes Encryption Fast 5146 12 µs
AES CBC 192Bits 128 bytes Encryption Small 11588 28 µs
AES CBC 192Bits 128 bytes Encryption Fast 8681 21 µs
AES CBC 256Bits 32 bytes Encryption Small 4783 11 µs
AES CBC 256Bits 32 bytes Encryption Fast 3889 9 µs
AES CBC 256Bits 64 bytes Encryption Small 7576 18 µs
AES CBC 256Bits 64 bytes Encryption Fast 5867 14 µs
AES CBC 256Bits 128 bytes Encryption Small 13233 33 µs
AES CBC 256Bits 128 bytes Encryption Fast 9818 24 µs
AES CBC 128Bits 32 bytes Decryption Small 6672 16 µs
AES CBC 128Bits 32 bytes Decryption Fast 3982 9 µs
AES CBC 128Bits 64 bytes Decryption Small 11536 28 µs
AES CBC 128Bits 64 bytes Decryption Fast 5314 13 µs
AES CBC 128Bits 128 bytes Decryption Small 21321 53 µs
AES CBC 128Bits 128 bytes Decryption Fast 8336 20 µs
AES CBC 192Bits 32 bytes Decryption Small 7592 18 µs
AES CBC 192Bits 32 bytes Decryption Fast 4287 10 µs
AES CBC 192Bits 64 bytes Decryption Small 13432 33 µs
AES CBC 192Bits 64 bytes Decryption Fast 5988 14 µs
AES CBC 192Bits 128 bytes Decryption Small 25177 62 µs
AES CBC 192Bits 128 bytes Decryption Fast 9396 23 µs
AES CBC 256Bits 32 bytes Decryption Small 8911 22 µs
AES CBC 256Bits 32 bytes Decryption Fast 4927 12 µs
AES CBC 256Bits 64 bytes Decryption Small 15712 39 µs
AES CBC 256Bits 64 bytes Decryption Fast 6644 16 µs
AES CBC 256Bits 128 bytes Decryption Small 29387 73 µs
AES CBC 256Bits 128 bytes Decryption Fast 10467 26 µs
Cryptolib STM32H743 AES CBC SB Enc.svg
Cryptolib STM32H743 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 2948 bytes 380 bytes 1 bytes 528 bytes
Encryption Fast 3268 bytes 1404 bytes 1 bytes 548 bytes
Decryption Small 3060 bytes 636 bytes 1 bytes 552 bytes
Decryption Fast 3720 bytes 1660 bytes 1 bytes 560 bytes
Cryptolib STM32H743 AES CBC SB Enc FP.svg
Cryptolib STM32H743 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 537264 5956 kB/s
AES CBC 128Bits 8000 bytes 128 bytes Encryption Fast 398952 8021 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Encryption Small 529952 6038 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Encryption Fast 391064 8182 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Encryption Small 528888 6050 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Encryption Fast 391064 8182 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Encryption Small 528432 6055 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Encryption Fast 390576 8193 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Encryption Small 625960 5112 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Encryption Fast 452608 7070 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Encryption Small 619328 5166 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Encryption Fast 447480 7151 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Encryption Small 617888 5178 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Encryption Fast 446328 7169 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Encryption Small 618360 5174 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Encryption Fast 445656 7180 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Encryption Small 718736 4452 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Encryption Fast 510592 6267 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Encryption Small 710296 4505 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Encryption Fast 504656 6340 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Encryption Small 708920 4513 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Encryption Fast 503264 6358 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Encryption Small 707736 4521 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Encryption Fast 503776 6352 kB/s
AES CBC 128Bits 8000 bytes 128 bytes Decryption Small 1242824 2574 kB/s
AES CBC 128Bits 8000 bytes 128 bytes Decryption Fast 393944 8122 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Decryption Small 1235936 2589 kB/s
AES CBC 128Bits 8000 bytes 512 bytes Decryption Fast 387032 8268 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Decryption Small 1233992 2593 kB/s
AES CBC 128Bits 8000 bytes 1024 bytes Decryption Fast 385360 8303 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Decryption Small 1232352 2596 kB/s
AES CBC 128Bits 8000 bytes 2048 bytes Decryption Fast 383664 8340 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Decryption Small 1483976 2156 kB/s
AES CBC 192Bits 8000 bytes 128 bytes Decryption Fast 446336 7169 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Decryption Small 1476912 2166 kB/s
AES CBC 192Bits 8000 bytes 512 bytes Decryption Fast 438888 7291 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Decryption Small 1474984 2169 kB/s
AES CBC 192Bits 8000 bytes 1024 bytes Decryption Fast 436368 7333 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Decryption Small 1473312 2171 kB/s
AES CBC 192Bits 8000 bytes 2048 bytes Decryption Fast 434072 7372 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Decryption Small 1733304 1846 kB/s
AES CBC 256Bits 8000 bytes 128 bytes Decryption Fast 503072 6360 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Decryption Small 1721392 1858 kB/s
AES CBC 256Bits 8000 bytes 512 bytes Decryption Fast 494360 6473 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Decryption Small 1718128 1862 kB/s
AES CBC 256Bits 8000 bytes 1024 bytes Decryption Fast 492888 6492 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Decryption Small 1715608 1865 kB/s
AES CBC 256Bits 8000 bytes 2048 bytes Decryption Fast 490904 6518 kB/s
Cryptolib STM32H743 AES CBC DF Enc.svg
Cryptolib STM32H743 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 2840 bytes 372 bytes 1 bytes 144 bytes
Encryption Fast 3160 bytes 1396 bytes 1 bytes 172 bytes
Decryption Small 2952 bytes 628 bytes 1 bytes 176 bytes
Decryption Fast 3612 bytes 1652 bytes 1 bytes 180 bytes
Cryptolib STM32H743 AES CBC DF Enc FP.svg
Cryptolib STM32H743 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 3514 8 µs
SHA256 64 bytes 5267 13 µs
SHA256 128 bytes 6888 17 µs
SHA384 32 bytes 10630 26 µs
SHA384 64 bytes 10551 26 µs
SHA384 128 bytes 18699 46 µs
Cryptolib STM32H743 HASH SB Dig.svg


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

HASH Mode Code Constant data Global Data Stack usage
SHA256 1872 296 bytes 1 bytes 564 bytes
SHA384 3068 744 bytes 1 bytes 1124 bytes
Cryptolib STM32H743 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 224778 14236 kB/s
SHA256 8000 bytes 512 bytes 207454 15425 kB/s
SHA256 8000 bytes 1024 bytes 205056 15605 kB/s
SHA256 8000 bytes 2048 bytes 203898 15694 kB/s
SHA384 8000 bytes 128 bytes 528527 6054 kB/s
SHA384 8000 bytes 512 bytes 502491 6368 kB/s
SHA384 8000 bytes 1024 bytes 497585 6431 kB/s
SHA384 8000 bytes 2048 bytes 495563 6457 kB/s
Cryptolib STM32H743 HASH DF Dig.svg


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

HASH Mode Cycles Time
SHA256 2938 7 µs
SHA384 9491 23 µs

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

HASH Mode Code Constant data Global Data Stack usage
SHA256 1884 bytes 288 bytes 1 bytes 372 bytes
SHA384 3080 bytes 736 bytes 1 bytes 828 bytes
Cryptolib STM32H743 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 2166072 5 ms
SECP256R1 Signature Small High 2092568 5 ms
SECP256R1 Signature SuperFast Low 1275536 3 ms
SECP256R1 Signature SuperFast High 1237576 3 ms
SECP256R1 Verification Small Low 5196624 12 ms
SECP256R1 Verification Small High 4576344 11 ms
SECP256R1 Verification SuperFast Low 3079568 7 ms
SECP256R1 Verification SuperFast High 2757832 6 ms
SECP384R1 Signature Small Low 6080528 15 ms
SECP384R1 Signature Small High 5785832 14 ms
SECP384R1 Signature Fast Low 4929360 12 ms
SECP384R1 Signature Fast High 4672336 11 ms
SECP384R1 Verification Small Low 14462480 36 ms
SECP384R1 Verification Small High 12559736 31 ms
SECP384R1 Verification Fast Low 11769304 29 ms
SECP384R1 Verification Fast High 10134984 25 ms
Cryptolib STM32H743 ECDSA Sig.svg
Cryptolib STM32H743 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 11746 bytes 1184 bytes 1 bytes 328 bytes 628 bytes
SECP256R1 Signature Small High 11746 bytes 1568 bytes 1 bytes 328 bytes 696 bytes
SECP256R1 Signature SuperFast Low 13056 bytes 1184 bytes 1 bytes 332 bytes 628 bytes
SECP256R1 Signature SuperFast High 13056 bytes 1568 bytes 1 bytes 332 bytes 696 bytes
SECP256R1 Verification Small Low 12238 bytes 1200 bytes 1 bytes 424 bytes 856 bytes
SECP256R1 Verification Small High 12238 bytes 1584 bytes 1 bytes 424 bytes 1648 bytes
SECP256R1 Verification SuperFast Low 13548 bytes 1200 bytes 1 bytes 428 bytes 856 bytes
SECP256R1 Verification SuperFast High 13548 bytes 1584 bytes 1 bytes 428 bytes 1648 bytes
SECP384R1 Signature Small Low 11746 bytes 1664 bytes 1 bytes 328 bytes 884 bytes
SECP384R1 Signature Small High 11746 bytes 2240 bytes 1 bytes 328 bytes 984 bytes
SECP384R1 Signature Fast Low 12116 bytes 1664 bytes 1 bytes 344 bytes 884 bytes
SECP384R1 Signature Fast High 12116 bytes 2240 bytes 1 bytes 344 bytes 984 bytes
SECP384R1 Verification Small Low 12238 bytes 1680 bytes 1 bytes 424 bytes 1192 bytes
SECP384R1 Verification Small High 12238 bytes 2256 bytes 1 bytes 424 bytes 2272 bytes
SECP384R1 Verification Fast Low 12608 bytes 1680 bytes 1 bytes 440 bytes 1192 bytes
SECP384R1 Verification Fast High 12608 bytes 2256 bytes 1 bytes 440 bytes 2272 bytes
Cryptolib STM32H743 ECDSA SECP256R1 Sig FP.svg
Cryptolib STM32H743 ECDSA SECP256R1 Ver FP.svg
Cryptolib STM32H743 ECDSA SECP384R1 Sig FP.svg
Cryptolib STM32H743 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 3261192 8 ms
Ed25519 1023 bytes Signature Small OptHigh 1908832 4 ms
Ed25519 1023 bytes Signature SuperFast OptLow 2142424 5 ms
Ed25519 1023 bytes Signature SuperFast OptHigh 1273056 3 ms
Ed25519 1023 bytes Verification Small OptLow 4950344 12 ms
Ed25519 1023 bytes Verification Small OptHigh 4368744 10 ms
Ed25519 1023 bytes Verification SuperFast OptLow 3079368 7 ms
Ed25519 1023 bytes Verification SuperFast OptHigh 2721280 6 ms
Cryptolib STM32H743 EdDSA Sig.svg
Cryptolib STM32H743 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 14158 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature Small OptHigh 14562 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptLow 15468 bytes 1744 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Signature SuperFast OptHigh 15872 bytes 2896 bytes 1 bytes 1236 bytes 1388 bytes
Ed25519 1023 bytes Verification Small OptLow 14256 bytes 1748 bytes 1 bytes 1244 bytes 1152 bytes
Ed25519 1023 bytes Verification Small OptHigh 14660 bytes 2900 bytes 1 bytes 1244 bytes 1992 bytes
Ed25519 1023 bytes Verification SuperFast OptLow 15566 bytes 1748 bytes 1 bytes 1244 bytes 1152 bytes
Ed25519 1023 bytes Verification SuperFast OptHigh 15970 bytes 2900 bytes 1 bytes 1244 bytes 1992 bytes
Cryptolib STM32H743 EdDSA Sig FP.svg
Cryptolib STM32H743 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 151225960 378 ms
v2.2 CRT SHA-256 3K Signature Small Mid 114153976 285 ms
v2.2 CRT SHA-256 3K Signature Small High 95541592 238 ms
v2.2 CRT SHA-256 3K Signature Fast Low 102089176 255 ms
v2.2 CRT SHA-256 3K Signature Fast Mid 77088368 192 ms
v2.2 CRT SHA-256 3K Signature Fast High 64063776 160 ms
v2.2 No CRT SHA-256 3K Signature Small Low 584168344 1460 ms
v2.2 No CRT SHA-256 3K Signature Small Mid 439243552 1098 ms
v2.2 No CRT SHA-256 3K Signature Small High 367004808 917 ms
v2.2 No CRT SHA-256 3K Signature Fast Low 379077872 947 ms
v2.2 No CRT SHA-256 3K Signature Fast Mid 285045456 712 ms
v2.2 No CRT SHA-256 3K Signature Fast High 237407016 593 ms
v2.2 n/a SHA-256 3K Verification Small n/a 3078184 7 ms
v2.2 n/a SHA-256 3K Verification Fast n/a 2034528 5 ms
Cryptolib STM32H743 RSA Sig.svg
Cryptolib STM32H743 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 7056 bytes 370 bytes 5 bytes 700 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Small Mid 7308 bytes 370 bytes 5 bytes 700 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Small High 7308 bytes 370 bytes 5 bytes 700 bytes 6708 bytes
v2.2 CRT SHA-256 3K Signature Fast Low 7426 bytes 370 bytes 5 bytes 700 bytes 3704 bytes
v2.2 CRT SHA-256 3K Signature Fast Mid 7678 bytes 370 bytes 5 bytes 700 bytes 4308 bytes
v2.2 CRT SHA-256 3K Signature Fast High 7678 bytes 370 bytes 5 bytes 700 bytes 6708 bytes
v2.2 No CRT SHA-256 3K Signature Small Low 6088 bytes 362 bytes 5 bytes 700 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Small Mid 6340 bytes 362 bytes 5 bytes 700 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Small High 6340 bytes 362 bytes 5 bytes 700 bytes 9368 bytes
v2.2 No CRT SHA-256 3K Signature Fast Low 6458 bytes 362 bytes 5 bytes 700 bytes 3484 bytes
v2.2 No CRT SHA-256 3K Signature Fast Mid 6710 bytes 362 bytes 5 bytes 700 bytes 4664 bytes
v2.2 No CRT SHA-256 3K Signature Fast High 6710 bytes 362 bytes 5 bytes 700 bytes 9368 bytes
v2.2 n/a SHA-256 3K Verification Small n/a 6842 bytes 366 bytes 5 bytes 716 bytes 3108 bytes
v2.2 n/a SHA-256 3K Verification Fast n/a 7212 bytes 366 bytes 5 bytes 716 bytes 3108 bytes
Cryptolib STM32H743 RSA 3K CRT Sig FP.svg
Cryptolib STM32H743 RSA 3K NoCRT Sig FP.svg
Cryptolib STM32H743 RSA 3K Ver FP.svg


No categories assignedEdit