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 |
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 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 (in us) |
---|---|---|---|---|---|---|
AES CBC | 128Bits | 32 bytes | Encryption | Small | 5299 | 48 |
AES CBC | 128Bits | 32 bytes | Encryption | Fast | 4870 | 44 |
AES CBC | 128Bits | 64 bytes | Encryption | Small | 8692 | 79 |
AES CBC | 128Bits | 64 bytes | Encryption | Fast | 7466 | 67 |
AES CBC | 128Bits | 128 bytes | Encryption | Small | 15483 | 140 |
AES CBC | 128Bits | 128 bytes | Encryption | Fast | 12725 | 115 |
AES CBC | 192Bits | 32 bytes | Encryption | Small | 5922 | 53 |
AES CBC | 192Bits | 32 bytes | Encryption | Fast | 5221 | 47 |
AES CBC | 192Bits | 64 bytes | Encryption | Small | 9887 | 89 |
AES CBC | 192Bits | 64 bytes | Encryption | Fast | 8218 | 74 |
AES CBC | 192Bits | 128 bytes | Encryption | Small | 17820 | 162 |
AES CBC | 192Bits | 128 bytes | Encryption | Fast | 14277 | 129 |
AES CBC | 256Bits | 32 bytes | Encryption | Small | 6751 | 61 |
AES CBC | 256Bits | 32 bytes | Encryption | Fast | 6164 | 56 |
AES CBC | 256Bits | 64 bytes | Encryption | Small | 11308 | 102 |
AES CBC | 256Bits | 64 bytes | Encryption | Fast | 9629 | 87 |
AES CBC | 256Bits | 128 bytes | Encryption | Small | 20400 | 185 |
AES CBC | 256Bits | 128 bytes | Encryption | Fast | 16467 | 149 |
AES CBC | 128Bits | 32 bytes | Decryption | Small | 8968 | 81 |
AES CBC | 128Bits | 32 bytes | Decryption | Fast | 6198 | 56 |
AES CBC | 128Bits | 64 bytes | Decryption | Small | 15907 | 144 |
AES CBC | 128Bits | 64 bytes | Decryption | Fast | 8827 | 80 |
AES CBC | 128Bits | 128 bytes | Decryption | Small | 29785 | 270 |
AES CBC | 128Bits | 128 bytes | Decryption | Fast | 14122 | 128 |
AES CBC | 192Bits | 32 bytes | Decryption | Small | 10428 | 94 |
AES CBC | 192Bits | 32 bytes | Decryption | Fast | 6919 | 62 |
AES CBC | 192Bits | 64 bytes | Decryption | Small | 18739 | 170 |
AES CBC | 192Bits | 64 bytes | Decryption | Fast | 9986 | 90 |
AES CBC | 192Bits | 128 bytes | Decryption | Small | 35345 | 321 |
AES CBC | 192Bits | 128 bytes | Decryption | Fast | 16093 | 146 |
AES CBC | 256Bits | 32 bytes | Decryption | Small | 12165 | 110 |
AES CBC | 256Bits | 32 bytes | Decryption | Fast | 7648 | 69 |
AES CBC | 256Bits | 64 bytes | Decryption | Small | 21838 | 198 |
AES CBC | 256Bits | 64 bytes | Decryption | Fast | 11082 | 100 |
AES CBC | 256Bits | 128 bytes | Decryption | Small | 41185 | 374 |
AES CBC | 256Bits | 128 bytes | Decryption | Fast | 18073 | 164 |
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 |
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 | 859280 | 1024 |
AES CBC | 128Bits | 8000 | 128 bytes | Encryption | Fast | 669184 | 1315 |
AES CBC | 128Bits | 8000 | 512 bytes | Encryption | Small | 852768 | 1031 |
AES CBC | 128Bits | 8000 | 512 bytes | Encryption | Fast | 663696 | 1325 |
AES CBC | 128Bits | 8000 | 1024 bytes | Encryption | Small | 851624 | 1033 |
AES CBC | 128Bits | 8000 | 1024 bytes | Encryption | Fast | 662616 | 1328 |
AES CBC | 128Bits | 8000 | 2048 bytes | Encryption | Small | 851056 | 1034 |
AES CBC | 128Bits | 8000 | 2048 bytes | Encryption | Fast | 662112 | 1329 |
AES CBC | 192Bits | 8000 | 128 bytes | Encryption | Small | 1004288 | 876 |
AES CBC | 192Bits | 8000 | 128 bytes | Encryption | Fast | 769432 | 1143 |
AES CBC | 192Bits | 8000 | 512 bytes | Encryption | Small | 997784 | 881 |
AES CBC | 192Bits | 8000 | 512 bytes | Encryption | Fast | 764032 | 1151 |
AES CBC | 192Bits | 8000 | 1024 bytes | Encryption | Small | 996632 | 882 |
AES CBC | 192Bits | 8000 | 1024 bytes | Encryption | Fast | 763008 | 1153 |
AES CBC | 192Bits | 8000 | 2048 bytes | Encryption | Small | 996064 | 883 |
AES CBC | 192Bits | 8000 | 2048 bytes | Encryption | Fast | 762504 | 1154 |
AES CBC | 256Bits | 8000 | 128 bytes | Encryption | Small | 1149240 | 765 |
AES CBC | 256Bits | 8000 | 128 bytes | Encryption | Fast | 869920 | 1011 |
AES CBC | 256Bits | 8000 | 512 bytes | Encryption | Small | 1142736 | 770 |
AES CBC | 256Bits | 8000 | 512 bytes | Encryption | Fast | 864416 | 1018 |
AES CBC | 256Bits | 8000 | 1024 bytes | Encryption | Small | 1141592 | 770 |
AES CBC | 256Bits | 8000 | 1024 bytes | Encryption | Fast | 863400 | 1019 |
AES CBC | 256Bits | 8000 | 2048 bytes | Encryption | Small | 1141008 | 771 |
AES CBC | 256Bits | 8000 | 2048 bytes | Encryption | Fast | 862904 | 1019 |
AES CBC | 128Bits | 8000 | 128 bytes | Decryption | Small | 1765960 | 498 |
AES CBC | 128Bits | 8000 | 128 bytes | Decryption | Fast | 703032 | 1251 |
AES CBC | 128Bits | 8000 | 512 bytes | Decryption | Small | 1758240 | 500 |
AES CBC | 128Bits | 8000 | 512 bytes | Decryption | Fast | 689304 | 1276 |
AES CBC | 128Bits | 8000 | 1024 bytes | Decryption | Small | 1755760 | 501 |
AES CBC | 128Bits | 8000 | 1024 bytes | Decryption | Fast | 685704 | 1283 |
AES CBC | 128Bits | 8000 | 2048 bytes | Decryption | Small | 1752592 | 502 |
AES CBC | 128Bits | 8000 | 2048 bytes | Decryption | Fast | 681856 | 1290 |
AES CBC | 192Bits | 8000 | 128 bytes | Decryption | Small | 2107136 | 417 |
AES CBC | 192Bits | 8000 | 128 bytes | Decryption | Fast | 804624 | 1093 |
AES CBC | 192Bits | 8000 | 512 bytes | Decryption | Small | 2099456 | 419 |
AES CBC | 192Bits | 8000 | 512 bytes | Decryption | Fast | 790792 | 1112 |
AES CBC | 192Bits | 8000 | 1024 bytes | Decryption | Small | 2096880 | 419 |
AES CBC | 192Bits | 8000 | 1024 bytes | Decryption | Fast | 787216 | 1117 |
AES CBC | 192Bits | 8000 | 2048 bytes | Decryption | Small | 2093720 | 420 |
AES CBC | 192Bits | 8000 | 2048 bytes | Decryption | Fast | 783304 | 1123 |
AES CBC | 256Bits | 8000 | 128 bytes | Decryption | Small | 2447976 | 359 |
AES CBC | 256Bits | 8000 | 128 bytes | Decryption | Fast | 907496 | 969 |
AES CBC | 256Bits | 8000 | 512 bytes | Decryption | Small | 2440272 | 360 |
AES CBC | 256Bits | 8000 | 512 bytes | Decryption | Fast | 892664 | 985 |
AES CBC | 256Bits | 8000 | 1024 bytes | Decryption | Small | 2437816 | 360 |
AES CBC | 256Bits | 8000 | 1024 bytes | Decryption | Fast | 888864 | 990 |
AES CBC | 256Bits | 8000 | 2048 bytes | Decryption | Small | 2434672 | 361 |
AES CBC | 256Bits | 8000 | 2048 bytes | Decryption | Fast | 884960 | 994 |
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 |
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 | 32 bytes | 5337 | 48 |
SHA256 | 64 bytes | 8507 | 77 |
SHA256 | 128 bytes | 11413 | 103 |
SHA384 | 32 bytes | 16969 | 154 |
SHA384 | 64 bytes | 17165 | 156 |
SHA384 | 128 bytes | 30803 | 280 |
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 |
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 | 402655 | 2185 |
SHA256 | 8000 | 512 bytes | 378001 | 2328 |
SHA256 | 8000 | 1024 bytes | 373926 | 2353 |
SHA256 | 8000 | 2048 bytes | 371867 | 2366 |
SHA384 | 8000 | 128 bytes | 881240 | 998 |
SHA384 | 8000 | 512 bytes | 840224 | 1047 |
SHA384 | 8000 | 1024 bytes | 833191 | 1056 |
SHA384 | 8000 | 2048 bytes | 829645 | 1060 |
Table below shows final tag generation done through the call to cmox_hash_generateTag.
HASH Mode | Cycles | Time (in us) |
---|---|---|
SHA256 | 4370 | 39 |
SHA384 | 15552 | 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 |
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 |
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 |
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 |
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 |
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 |
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 |