diff --git a/doc/crypto.dox b/doc/crypto.dox index 2aef5ed6..bd71e448 100644 --- a/doc/crypto.dox +++ b/doc/crypto.dox @@ -58,6 +58,8 @@ speed is critical but exact bit-compatibility of hash values is not. \section crypto_performance Performance +\subsection crypto_performance_avr Performance on AVR + All figures are for the Arduino Uno running at 16 MHz. Figures for the Ardunino Mega 2560 running at 16 MHz are similar: @@ -105,4 +107,47 @@ Where a cipher supports more than one key size (such as ChaCha), the values are typically almost identical for 128-bit and 256-bit keys so only the maximum is shown above. +\subsection crypto_performance_arm Performance on ARM + +All figures are for the Arduino Due running at 84 MHz: + +
Encryption Algorithm | Encryption (per byte) | Decryption (per byte) | Key Setup | State Size (bytes) |
AES128 (ECB mode) | 6.65us | 11.00us | 35.15us | 220 |
AES192 (ECB mode) | 8.02us | 13.31us | 36.59us | 252 |
AES256 (ECB mode) | 9.39us | 15.63 | 50.19us | 284 |
ChaCha (20 rounds) | 0.87us | 0.88us | 4.96us | 136 |
ChaCha (12 rounds) | 0.70us | 0.71us | 4.96us | 136 |
ChaCha (8 rounds) | 0.62us | 0.62us | 4.96us | 136 |
AEAD Algorithm | Encryption (per byte) | Decryption (per byte) | Key Setup | State Size (bytes) |
ChaChaPoly | 1.66us | 1.66us | 45.02us | 280 |
GCM<AES128> | 11.01us | 10.92us | 247.90us | 344 |
GCM<AES192> | 12.40us | 12.31us | 294.07us | 376 |
GCM<AES256> | 13.73us | 13.64us | 347.40us | 408 |
Hash Algorithm | Hashing (per byte) | Finalization | State Size (bytes) | |
SHA1 | 0.94us | 62.55us | 112 | |
SHA256 | 1.15us | 76.60us | 120 | |
SHA512 | 2.87us | 370.37us | 224 | |
SHA3_256 | 5.36us | 697.65us | 424 | |
SHA3_512 | 9.89us | 697.81us | 424 | |
BLAKE2s | 0.76us | 50.88us | 184 | |
BLAKE2b | 1.33us | 170.93us | 352 | |
Authentication Algorithm | Hashing (per byte) | Finalization | Key Setup | State Size (bytes) |
SHA1 (HMAC mode) | 0.94us | 193.92us | 65.09us | 112 |
SHA256 (HMAC mode) | 1.15us | 238.98us | 80.44us | 120 |
BLAKE2s (HMAC mode) | 0.76us | 165.64us | 59.92us | 184 |
Poly1305 | 0.85us | 19.25us | 2.35us | 96 |
GHASH | 4.37us | 1.50us | 4.37us | 36 |
Public Key Operation | Time (per operation) | Comment | ||
Curve25519::eval() | 103ms | Raw curve evaluation | ||
Curve25519::dh1() | 103ms | First half of Diffie-Hellman key agreement | ||
Curve25519::dh2() | 104ms | Second half of Diffie-Hellman key agreement | ||
Ed25519::sign() | 195ms | Digital signature generation | ||
Ed25519::verify() | 306ms | Digital signature verification | ||
Ed25519::derivePublicKey() | 194ms | Derive a public key from a private key |