-
Notifications
You must be signed in to change notification settings - Fork 48
Crypto Performance
Artem Yushev edited this page Apr 14, 2021
·
5 revisions
I2C Fast Mode (400KHz)
- Without power limitation
- @ 25°C
- VCC = 3.3V
- RSA Signature scheme: RSA SSA PKCS#1 v1.5 without hashing
- ECDSA Signature scheme: ECDSA FIPS 186-3 without hashing
- Encryption/Decryption scheme: RSAES PKCS#1 v1.5
- Hash scheme: SHA256
- Key Derivation scheme: TLS v1.2 PRF SHA256
- RSA Key size: 2048 bits
- ECC Key size: 256 bits (NIST P-256)
Scheme | Algorithm | Performance in ms1 | Performance with Shielded Connection in ms1 | Notes |
---|---|---|---|---|
Calcualte Signature | RSA | ~310 | ~315 | Doesn't include message hashing before calling a toolbox funciton |
ECDSA | ~60 | ~65 | ||
Verify signature | RSA | ~45 | ~55 | |
ECDSA | ~85 | ~90 | ||
Diffie-Hellman key agreement | ECC | ~60 | ~65 | Based on ephemeral key pair |
Key pair generation | RSA | ~29002 | ~2910 | Generate 2048 bit RSA key pair |
ECC | ~75 | ~80 | Generate 256 bit ECC key pair | |
Encryption | RSA | ~30 | ~45 | Encrypt 127 bytes |
Decryption | RSA | ~310 | ~320 | Decrypt 127 bytes |
Key derivation | PRF as per TLS v1.2 | ~135 | ~150 | |
Hash calculation | SHA256 | ~12 Kbyte/s | ~11 Kbyte/s | In blocks of 1280 bytes |
Write Data | N/A | 18 | - | 100 bytes |
Read Data | N/A | 9 | - | 100 bytes |
1 Minimum Execution of the entire sequence in milli seconds, except the External World timings
2 RSA key pair generation performance is not predictable and typically have a variation in performance. This could be significantly higher or lower as the one specified in the table which is an average value over collected samples
Scheme | Algorithm | Performance in ms1 | Performance with Shielded Connection in ms1 | Notes |
---|---|---|---|---|
Calcualte Signature | RSA | ~310 | ~320 | Doesn't include message hashing before calling a toolbox funciton |
ECDSA | ~65 | ~70 | ||
Verify signature | RSA | ~40 | ~50 | |
ECDSA | ~85 | ~95 | ||
Diffie-Hellman key agreement | ECC | ~55 | ~60 | Based on ephemeral key pair |
Key pair generation | RSA | ~29002 | ~2910 | Generate 2048 bit RSA key pair |
ECC | ~55 | ~60 | Generate 256 bit ECC key pair in session | |
Encryption | RSA | ~40 | ~50 | Encrypt 127 bytes |
Decryption | RSA | ~315 | ~325 | Decrypt 127 bytes |
Encryption | AES-128 | ~28 | ~35 | Encrypt 256 bytes |
Decryption | AES-128 | ~35 | ~42 | Decrypt 256 bytes |
Key derivation | PRF as per TLS v1.2 | ~135 | ~150 | To derive a key of 40 bytes; Shared secret (32 bytes) from session context and; The input key derivation data size is 48 bytes |
Key derivation | HKDF with SHA256 | ~130 | ~135 | Using a pre-shared secret from a data object |
HMAC | HMAC with SHA256 | ~90 | ~95 | Using a pre-shared secret from a data object and 128 bytes of input data |
Hash calculation | SHA256 | ~15 Kbyte/s | ~14 Kbyte/s | In blocks of 1280 bytes |
Write Data | N/A | 18 | - | 100 bytes |
Read Data | N/A | 9 | - | 100 bytes |
1 Minimum Execution of the entire sequence in milli seconds, except the External World timings
2 RSA key pair generation performance is not predictable and typically have a variation in performance. This could be significantly higher or lower as the one specified in the table which is an average value over collected samples