The Skinny-C repository contains a cut-down implementation of Skinny-64, Skinny-128, and Mantis-8 for Arduino devices. The source code is under the arduino/libraries/Skinny directory, and uses the framework of Rhys Weatherley's cryptography library for Arduino.
The Arduino version of Skinny-C uses C code for 32-bit ARM platforms and inline assembly for AVR platforms. The plain C version was too slow on AVR to be of practical use.
To install the library, copy the contents of the "arduino/libraries/Skinny" directory to "sketchbook/libraries/Skinny" on your system. You should then be able to load and compile the examples from within the Arudino IDE.
The following figures are for the AVR-based Arduino Uno running at 16 MHz, compared against the ChaCha20 and Speck implementations from the basic framework:
Encryption Algorithm | Encryption (per byte) | Decryption (per byte) | Key Setup | State Size (bytes) |
Skinny-128 (128-bit key, ECB mode) | 23.09us | 23.13us | 150.32us | 325 |
Skinny-128 (256-bit key, ECB mode) | 27.56us | 27.59us | 493.86us | 389 |
Skinny-128 (384-bit key, ECB mode) | 32.02us | 32.06us | 966.91us | 453 |
Skinny-64 (64-bit key, ECB mode) | 11.73us | 11.75us | 122.18us | 133 |
Skinny-64 (128-bit key, ECB mode) | 13.13us | 13.15us | 345.72us | 149 |
Skinny-64 (192-bit key, ECB mode) | 14.53us | 14.55us | 593.15us | 165 |
Mantis-8 (128-bit key, 64-bit tweak, ECB mode) | 14.76us | 15.75us | 12.20us | 34 |
ChaCha (20 rounds) | 14.87us | 14.88us | 43.74us | 132 |
Speck (128-bit key, ECB mode) | 9.74us | 10.12us | 253.94us | 275 |
Speck (256-bit key, ECB mode) | 10.31us | 10.71us | 275.26us | 275 |
SpeckTiny (128-bit key, ECB mode) | 33.93us | 10.22us | 35 | |
SpeckTiny (256-bit key, ECB mode) | 36.46us | 16.89us | 35 |
The following figures are for the ARM-based Arduino Due running at 84 MHz:
Encryption Algorithm | Encryption (per byte) | Decryption (per byte) | Key Setup | State Size (bytes) |
Skinny-128 (128-bit key, ECB mode) | 8.67us | 9.03us | 35.01us | 332 |
Skinny-128 (256-bit key, ECB mode) | 10.38us | 10.81us | 86.34us | 396 |
Skinny-128 (384-bit key, ECB mode) | 12.09us | 12.59us | 152.33us | 460 |
Skinny-64 (64-bit key, ECB mode) | 3.14us | 3.27us | 25.12us | 140 |
Skinny-64 (128-bit key, ECB mode) | 3.52us | 3.66us | 49.30us | 156 |
Skinny-64 (192-bit key, ECB mode) | 3.90us | 4.05us | 78.72us | 172 |
Mantis-8 (128-bit key, 64-bit tweak, ECB mode) | 3.93us | 3.93us | 5.54us | 36 |
ChaCha (20 rounds) | 0.87us | 0.88us | 4.96us | 136 |
Speck (128-bit key, ECB mode) | 0.97us | 0.96us | 36.80us | 288 |
Speck (256-bit key, ECB mode) | 1.03us | 1.01us | 39.31us | 288 |
SpeckTiny (128-bit key, ECB mode) | 2.72us | 1.47us | 48 | |
SpeckTiny (256-bit key, ECB mode) | 2.90us | 1.83us | 48 |