diff --git a/doc/crypto.dox b/doc/crypto.dox index a95d2375..ccc5fb27 100644 --- a/doc/crypto.dox +++ b/doc/crypto.dox @@ -34,6 +34,8 @@ All cryptographic algorithms have been optimized for 8-bit Arduino platforms like the Uno. Memory usage is also reduced, particularly for SHA1 and SHA256 which save 256 and 192 bytes respectively over traditional implementations. +For other algorithms, static sbox tables and the like are placed into +program memory to further reduce data memory usage. ChaCha with 20 rounds and 256-bit keys is the recommended symmetric encryption algorithm because it is twice as fast as AES128, @@ -51,15 +53,15 @@ All figures are for the Arduino Uno running at 16 MHz: - - - + + + - - - + + + - +
AlgorithmEncryption / Hashing (per byte)Decryption (per byte)Key SetupState Size (bytes)
AES128 (ECB mode)32.27us65.85us158.74us208
AES192 (ECB mode)43.44us79.59us165.53us240
AES256 (ECB mode)50.62us92.34us225.58us272
AES128 (ECB mode)36.90us66.48us160.00us208
AES192 (ECB mode)44.20us80.35us166.54us240
AES256 (ECB mode)51.50us94.22us227.97us272
Arcfour2.98us2.98us601.34us258
ChaCha (20 rounds)14.87us14.88us39.88us130
ChaCha (12 rounds)10.38us10.38us39.88us130
ChaCha (8 rounds)8.13us8.14us39.88us130
ChaCha (20 rounds)14.87us14.88us43.74us130
ChaCha (12 rounds)10.38us10.38us43.74us130
ChaCha (8 rounds)8.13us8.14us43.74us130
SHA121.90us 94
SHA25642.89us 106
SHA25643.85us 106
Where a cipher supports more than one key size (such as ChaCha and Arcfour),