diff --git a/AES128_8cpp_source.html b/AES128_8cpp_source.html index b65e87e5..11f06834 100644 --- a/AES128_8cpp_source.html +++ b/AES128_8cpp_source.html @@ -175,7 +175,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/AES192_8cpp_source.html b/AES192_8cpp_source.html index 85e58d4b..d17a0c80 100644 --- a/AES192_8cpp_source.html +++ b/AES192_8cpp_source.html @@ -175,7 +175,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/AES256_8cpp_source.html b/AES256_8cpp_source.html index 6e1e6e48..36b3646c 100644 --- a/AES256_8cpp_source.html +++ b/AES256_8cpp_source.html @@ -182,7 +182,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/AESCommon_8cpp_source.html b/AESCommon_8cpp_source.html index 48f6ae28..9e889f16 100644 --- a/AESCommon_8cpp_source.html +++ b/AESCommon_8cpp_source.html @@ -415,7 +415,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/AES_8h_source.html b/AES_8h_source.html index e6ad3da5..5437444a 100644 --- a/AES_8h_source.html +++ b/AES_8h_source.html @@ -203,7 +203,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/AuthenticatedCipher_8cpp_source.html b/AuthenticatedCipher_8cpp_source.html index 348b59cf..43774f6e 100644 --- a/AuthenticatedCipher_8cpp_source.html +++ b/AuthenticatedCipher_8cpp_source.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/AuthenticatedCipher_8h_source.html b/AuthenticatedCipher_8h_source.html index 7cd82cd6..4ec47ac9 100644 --- a/AuthenticatedCipher_8h_source.html +++ b/AuthenticatedCipher_8h_source.html @@ -141,7 +141,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BLAKE2b_8cpp_source.html b/BLAKE2b_8cpp_source.html index e2b8a5d1..ffea6cb4 100644 --- a/BLAKE2b_8cpp_source.html +++ b/BLAKE2b_8cpp_source.html @@ -331,7 +331,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BLAKE2b_8h_source.html b/BLAKE2b_8h_source.html index 65d74fa4..87a04f20 100644 --- a/BLAKE2b_8h_source.html +++ b/BLAKE2b_8h_source.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BLAKE2s_8cpp_source.html b/BLAKE2s_8cpp_source.html index ee9c8c1b..5ad41037 100644 --- a/BLAKE2s_8cpp_source.html +++ b/BLAKE2s_8cpp_source.html @@ -323,7 +323,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BLAKE2s_8h_source.html b/BLAKE2s_8h_source.html index c04b1b15..e2f5dc8f 100644 --- a/BLAKE2s_8h_source.html +++ b/BLAKE2s_8h_source.html @@ -161,7 +161,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BigNumberUtil_8cpp_source.html b/BigNumberUtil_8cpp_source.html index 903e58c9..eb786fe1 100644 --- a/BigNumberUtil_8cpp_source.html +++ b/BigNumberUtil_8cpp_source.html @@ -557,7 +557,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BigNumberUtil_8h_source.html b/BigNumberUtil_8h_source.html index 8cd0888d..c3155f82 100644 --- a/BigNumberUtil_8h_source.html +++ b/BigNumberUtil_8h_source.html @@ -199,7 +199,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Bitmap_8cpp_source.html b/Bitmap_8cpp_source.html index 2ef6b900..221fa2fd 100644 --- a/Bitmap_8cpp_source.html +++ b/Bitmap_8cpp_source.html @@ -694,7 +694,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Bitmap_8h_source.html b/Bitmap_8h_source.html index f31c7be1..cb33ba04 100644 --- a/Bitmap_8h_source.html +++ b/Bitmap_8h_source.html @@ -271,7 +271,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BlinkLED_8cpp_source.html b/BlinkLED_8cpp_source.html index f0ba4bae..179e6be1 100644 --- a/BlinkLED_8cpp_source.html +++ b/BlinkLED_8cpp_source.html @@ -196,7 +196,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BlinkLED_8h_source.html b/BlinkLED_8h_source.html index fea4fa7a..bab66e28 100644 --- a/BlinkLED_8h_source.html +++ b/BlinkLED_8h_source.html @@ -157,7 +157,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BlockCipher_8cpp_source.html b/BlockCipher_8cpp_source.html index 71b20cb8..9006d542 100644 --- a/BlockCipher_8cpp_source.html +++ b/BlockCipher_8cpp_source.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BlockCipher_8h_source.html b/BlockCipher_8h_source.html index b173a17e..d2ecb032 100644 --- a/BlockCipher_8h_source.html +++ b/BlockCipher_8h_source.html @@ -146,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BoolField_8cpp_source.html b/BoolField_8cpp_source.html index 7bca766d..270edad8 100644 --- a/BoolField_8cpp_source.html +++ b/BoolField_8cpp_source.html @@ -202,7 +202,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/BoolField_8h_source.html b/BoolField_8h_source.html index 6313863a..1a5d2062 100644 --- a/BoolField_8h_source.html +++ b/BoolField_8h_source.html @@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/CBC_8cpp_source.html b/CBC_8cpp_source.html index 93ef13a5..22fdaaa0 100644 --- a/CBC_8cpp_source.html +++ b/CBC_8cpp_source.html @@ -208,7 +208,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/CBC_8h_source.html b/CBC_8h_source.html index 9ba8c098..770418b7 100644 --- a/CBC_8h_source.html +++ b/CBC_8h_source.html @@ -172,7 +172,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/CFB_8cpp_source.html b/CFB_8cpp_source.html index 0a9a3e8b..80cde5c8 100644 --- a/CFB_8cpp_source.html +++ b/CFB_8cpp_source.html @@ -233,7 +233,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/CFB_8h_source.html b/CFB_8h_source.html index be5831e0..0f6c8b9a 100644 --- a/CFB_8h_source.html +++ b/CFB_8h_source.html @@ -171,7 +171,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/CTR_8cpp_source.html b/CTR_8cpp_source.html index cc109eb0..43157713 100644 --- a/CTR_8cpp_source.html +++ b/CTR_8cpp_source.html @@ -228,7 +228,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/CTR_8h_source.html b/CTR_8h_source.html index 801d29ed..07971c8b 100644 --- a/CTR_8h_source.html +++ b/CTR_8h_source.html @@ -175,7 +175,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ChaChaPoly_8cpp_source.html b/ChaChaPoly_8cpp_source.html index 10d5c33a..67dc9150 100644 --- a/ChaChaPoly_8cpp_source.html +++ b/ChaChaPoly_8cpp_source.html @@ -262,7 +262,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ChaChaPoly_8h_source.html b/ChaChaPoly_8h_source.html index a80dde0d..609f4795 100644 --- a/ChaChaPoly_8h_source.html +++ b/ChaChaPoly_8h_source.html @@ -173,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ChaCha_8cpp_source.html b/ChaCha_8cpp_source.html index bbe8195e..6b5e367b 100644 --- a/ChaCha_8cpp_source.html +++ b/ChaCha_8cpp_source.html @@ -311,7 +311,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ChaCha_8h_source.html b/ChaCha_8h_source.html index f2a2fe55..374d02c1 100644 --- a/ChaCha_8h_source.html +++ b/ChaCha_8h_source.html @@ -170,7 +170,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Charlieplex_8cpp_source.html b/Charlieplex_8cpp_source.html index 2b8fac9a..8a22d249 100644 --- a/Charlieplex_8cpp_source.html +++ b/Charlieplex_8cpp_source.html @@ -232,7 +232,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Charlieplex_8h_source.html b/Charlieplex_8h_source.html index d88b7685..72cf79bf 100644 --- a/Charlieplex_8h_source.html +++ b/Charlieplex_8h_source.html @@ -162,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ChaseLEDs_8cpp_source.html b/ChaseLEDs_8cpp_source.html index 020138d1..26b25bc3 100644 --- a/ChaseLEDs_8cpp_source.html +++ b/ChaseLEDs_8cpp_source.html @@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ChaseLEDs_8h_source.html b/ChaseLEDs_8h_source.html index c33c133d..ae73ac1f 100644 --- a/ChaseLEDs_8h_source.html +++ b/ChaseLEDs_8h_source.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Cipher_8cpp_source.html b/Cipher_8cpp_source.html index c9d97826..e17a1863 100644 --- a/Cipher_8cpp_source.html +++ b/Cipher_8cpp_source.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Cipher_8h_source.html b/Cipher_8h_source.html index 9f870889..77f550b3 100644 --- a/Cipher_8h_source.html +++ b/Cipher_8h_source.html @@ -148,7 +148,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Crypto_8cpp_source.html b/Crypto_8cpp_source.html index 6a8a89ae..2c379086 100644 --- a/Crypto_8cpp_source.html +++ b/Crypto_8cpp_source.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Crypto_8h_source.html b/Crypto_8h_source.html index bba15f43..3ac6e51d 100644 --- a/Crypto_8h_source.html +++ b/Crypto_8h_source.html @@ -130,7 +130,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Curve25519_8cpp_source.html b/Curve25519_8cpp_source.html index f3d73581..672006f7 100644 --- a/Curve25519_8cpp_source.html +++ b/Curve25519_8cpp_source.html @@ -1458,7 +1458,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Curve25519_8h_source.html b/Curve25519_8h_source.html index 50bf0bfb..185ded70 100644 --- a/Curve25519_8h_source.html +++ b/Curve25519_8h_source.html @@ -173,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DMD_8cpp_source.html b/DMD_8cpp_source.html index bee84b77..694ac0c7 100644 --- a/DMD_8cpp_source.html +++ b/DMD_8cpp_source.html @@ -456,7 +456,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DMD_8h_source.html b/DMD_8h_source.html index 2f0817a0..8b93d533 100644 --- a/DMD_8h_source.html +++ b/DMD_8h_source.html @@ -170,7 +170,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DS1307RTC_8cpp_source.html b/DS1307RTC_8cpp_source.html index 23e79d08..810bb1fe 100644 --- a/DS1307RTC_8cpp_source.html +++ b/DS1307RTC_8cpp_source.html @@ -415,7 +415,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DS1307RTC_8h_source.html b/DS1307RTC_8h_source.html index 2806e06f..e3a99846 100644 --- a/DS1307RTC_8h_source.html +++ b/DS1307RTC_8h_source.html @@ -172,7 +172,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DS3231RTC_8cpp_source.html b/DS3231RTC_8cpp_source.html index 3347f462..b674f3cb 100644 --- a/DS3231RTC_8cpp_source.html +++ b/DS3231RTC_8cpp_source.html @@ -657,7 +657,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DS3231RTC_8h_source.html b/DS3231RTC_8h_source.html index 37f0ae4e..dc79e230 100644 --- a/DS3231RTC_8h_source.html +++ b/DS3231RTC_8h_source.html @@ -202,7 +202,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DS3232RTC_8cpp_source.html b/DS3232RTC_8cpp_source.html index 95015c64..54e07a29 100644 --- a/DS3232RTC_8cpp_source.html +++ b/DS3232RTC_8cpp_source.html @@ -575,7 +575,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DS3232RTC_8h_source.html b/DS3232RTC_8h_source.html index 1313b8bf..ef8894e9 100644 --- a/DS3232RTC_8h_source.html +++ b/DS3232RTC_8h_source.html @@ -190,7 +190,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DejaVuSans9_8h_source.html b/DejaVuSans9_8h_source.html index 235b0641..9f420a07 100644 --- a/DejaVuSans9_8h_source.html +++ b/DejaVuSans9_8h_source.html @@ -257,7 +257,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DejaVuSansBold9_8h_source.html b/DejaVuSansBold9_8h_source.html index b5965bb8..b730469e 100644 --- a/DejaVuSansBold9_8h_source.html +++ b/DejaVuSansBold9_8h_source.html @@ -257,7 +257,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/DejaVuSansItalic9_8h_source.html b/DejaVuSansItalic9_8h_source.html index def61f91..7fd07825 100644 --- a/DejaVuSansItalic9_8h_source.html +++ b/DejaVuSansItalic9_8h_source.html @@ -257,7 +257,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/EAX_8cpp_source.html b/EAX_8cpp_source.html index c7cea0aa..f94409e6 100644 --- a/EAX_8cpp_source.html +++ b/EAX_8cpp_source.html @@ -301,7 +301,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/EAX_8h_source.html b/EAX_8h_source.html index f9bacae4..2ef5f790 100644 --- a/EAX_8h_source.html +++ b/EAX_8h_source.html @@ -196,7 +196,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/EEPROM24_8cpp_source.html b/EEPROM24_8cpp_source.html index b32ab281..97720be1 100644 --- a/EEPROM24_8cpp_source.html +++ b/EEPROM24_8cpp_source.html @@ -282,7 +282,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/EEPROM24_8h_source.html b/EEPROM24_8h_source.html index b844d7a1..6fb6a88a 100644 --- a/EEPROM24_8h_source.html +++ b/EEPROM24_8h_source.html @@ -186,7 +186,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Ed25519_8cpp_source.html b/Ed25519_8cpp_source.html index cf363010..e35da9eb 100644 --- a/Ed25519_8cpp_source.html +++ b/Ed25519_8cpp_source.html @@ -572,7 +572,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Ed25519_8h_source.html b/Ed25519_8h_source.html index d31186b8..de2b4e64 100644 --- a/Ed25519_8h_source.html +++ b/Ed25519_8h_source.html @@ -168,7 +168,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Field_8cpp_source.html b/Field_8cpp_source.html index ace44362..a6559e04 100644 --- a/Field_8cpp_source.html +++ b/Field_8cpp_source.html @@ -196,7 +196,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Field_8h_source.html b/Field_8h_source.html index b66e7599..f48316df 100644 --- a/Field_8h_source.html +++ b/Field_8h_source.html @@ -164,7 +164,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Form_8cpp_source.html b/Form_8cpp_source.html index 952e6527..f99c7a98 100644 --- a/Form_8cpp_source.html +++ b/Form_8cpp_source.html @@ -278,7 +278,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Form_8h_source.html b/Form_8h_source.html index 445f17f1..287324e3 100644 --- a/Form_8h_source.html +++ b/Form_8h_source.html @@ -172,7 +172,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/GCM_8cpp_source.html b/GCM_8cpp_source.html index cb4d5519..54e4e4a7 100644 --- a/GCM_8cpp_source.html +++ b/GCM_8cpp_source.html @@ -352,7 +352,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/GCM_8h_source.html b/GCM_8h_source.html index 530f7af5..990b7186 100644 --- a/GCM_8h_source.html +++ b/GCM_8h_source.html @@ -191,7 +191,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/GF128_8cpp_source.html b/GF128_8cpp_source.html index 9a4b0e03..02cadb04 100644 --- a/GF128_8cpp_source.html +++ b/GF128_8cpp_source.html @@ -501,7 +501,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/GF128_8h_source.html b/GF128_8h_source.html index 86ce4146..bcab4639 100644 --- a/GF128_8h_source.html +++ b/GF128_8h_source.html @@ -137,7 +137,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/GHASH_8cpp_source.html b/GHASH_8cpp_source.html index 3b24f0ac..4f86a630 100644 --- a/GHASH_8cpp_source.html +++ b/GHASH_8cpp_source.html @@ -190,7 +190,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/GHASH_8h_source.html b/GHASH_8h_source.html index 692a65a0..1b08b3a4 100644 --- a/GHASH_8h_source.html +++ b/GHASH_8h_source.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Hash_8cpp_source.html b/Hash_8cpp_source.html index 44c5e6b9..345a36e4 100644 --- a/Hash_8cpp_source.html +++ b/Hash_8cpp_source.html @@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Hash_8h_source.html b/Hash_8h_source.html index 1d4c1cd0..c1107ee5 100644 --- a/Hash_8h_source.html +++ b/Hash_8h_source.html @@ -154,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/I2CMaster_8cpp_source.html b/I2CMaster_8cpp_source.html index c59ac350..49cc30e5 100644 --- a/I2CMaster_8cpp_source.html +++ b/I2CMaster_8cpp_source.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/I2CMaster_8h_source.html b/I2CMaster_8h_source.html index e495dbeb..e0e2f8b8 100644 --- a/I2CMaster_8h_source.html +++ b/I2CMaster_8h_source.html @@ -140,7 +140,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/IRreceiver_8cpp_source.html b/IRreceiver_8cpp_source.html index 14d665ac..6d268560 100644 --- a/IRreceiver_8cpp_source.html +++ b/IRreceiver_8cpp_source.html @@ -261,7 +261,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/IRreceiver_8h_source.html b/IRreceiver_8h_source.html index a9e67053..baa93b98 100644 --- a/IRreceiver_8h_source.html +++ b/IRreceiver_8h_source.html @@ -157,7 +157,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/IntField_8cpp_source.html b/IntField_8cpp_source.html index 677f948b..87cd708f 100644 --- a/IntField_8cpp_source.html +++ b/IntField_8cpp_source.html @@ -208,7 +208,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/IntField_8h_source.html b/IntField_8h_source.html index 3b8358b4..ca95f6f2 100644 --- a/IntField_8h_source.html +++ b/IntField_8h_source.html @@ -173,7 +173,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/KeccakCore_8cpp_source.html b/KeccakCore_8cpp_source.html index 2f8aad65..d0a5b0ee 100644 --- a/KeccakCore_8cpp_source.html +++ b/KeccakCore_8cpp_source.html @@ -221,1731 +221,1764 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
219  }
220 }
221 
-
225 void KeccakCore::clear()
-
226 {
-
227  clean(state);
-
228 }
-
229 
-
243 void KeccakCore::setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
-
244 {
-
245  uint8_t *Abytes = (uint8_t *)state.A;
-
246  size_t size = blockSize();
-
247  reset();
-
248  if (len <= size) {
-
249  // Because the state has just been reset, state.A is set to
-
250  // all-zeroes. We can copy the key directly into the state
-
251  // and then XOR the block with the pad value.
-
252  memcpy(Abytes, key, len);
-
253  } else {
-
254  // The key is larger than the block size. Hash it down.
-
255  // Afterwards, state.A will contain the first block of data
-
256  // to be extracted. We truncate it to the first "hashSize"
-
257  // bytes and XOR with the padding.
-
258  update(key, len);
-
259  this->pad(0x06);
-
260  memset(Abytes + hashSize, pad, size - hashSize);
-
261  memset(Abytes + size, 0, sizeof(state.A) - size);
-
262  size = hashSize;
-
263  }
-
264  while (size > 0) {
-
265  *Abytes++ ^= pad;
-
266  --size;
-
267  }
-
268  keccakp();
-
269 }
-
270 
-
274 void KeccakCore::keccakp()
-
275 {
-
276  uint64_t B[5][5];
-
277 #if defined(__AVR__)
-
278  // This assembly code was generated by the "genkeccak.c" program.
-
279  // Do not modify this code directly. Instead modify "genkeccak.c"
-
280  // and then re-generate the code here.
-
281  for (uint8_t round = 0; round < 24; ++round) {
-
282  __asm__ __volatile__ (
-
283  "push r29\n"
-
284  "push r28\n"
-
285  "mov r28,r26\n"
-
286  "mov r29,r27\n"
-
287 
-
288  // Step mapping theta. Compute C.
-
289  "ldi r20,5\n"
-
290  "100:\n"
-
291  "ld r8,Z\n"
-
292  "ldd r9,Z+1\n"
-
293  "ldd r10,Z+2\n"
-
294  "ldd r11,Z+3\n"
-
295  "ldd r12,Z+4\n"
-
296  "ldd r13,Z+5\n"
-
297  "ldd r14,Z+6\n"
-
298  "ldd r15,Z+7\n"
-
299  "ldi r19,4\n"
-
300  "101:\n"
-
301  "adiw r30,40\n"
-
302  "ld __tmp_reg__,Z\n"
-
303  "eor r8,__tmp_reg__\n"
-
304  "ldd __tmp_reg__,Z+1\n"
-
305  "eor r9,__tmp_reg__\n"
-
306  "ldd __tmp_reg__,Z+2\n"
-
307  "eor r10,__tmp_reg__\n"
-
308  "ldd __tmp_reg__,Z+3\n"
-
309  "eor r11,__tmp_reg__\n"
-
310  "ldd __tmp_reg__,Z+4\n"
-
311  "eor r12,__tmp_reg__\n"
-
312  "ldd __tmp_reg__,Z+5\n"
-
313  "eor r13,__tmp_reg__\n"
-
314  "ldd __tmp_reg__,Z+6\n"
-
315  "eor r14,__tmp_reg__\n"
-
316  "ldd __tmp_reg__,Z+7\n"
-
317  "eor r15,__tmp_reg__\n"
-
318  "dec r19\n"
-
319  "brne 101b\n"
-
320  "st X+,r8\n"
-
321  "st X+,r9\n"
-
322  "st X+,r10\n"
-
323  "st X+,r11\n"
-
324  "st X+,r12\n"
-
325  "st X+,r13\n"
-
326  "st X+,r14\n"
-
327  "st X+,r15\n"
-
328  "subi r30,152\n"
-
329  "sbc r31,__zero_reg__\n"
-
330  "dec r20\n"
-
331  "brne 100b\n"
-
332  "sbiw r30,40\n"
-
333  "sbiw r26,40\n"
-
334 
-
335  // Step mapping theta. Compute D and XOR with A.
-
336  "ldd r8,Y+8\n"
-
337  "ldd r9,Y+9\n"
-
338  "ldd r10,Y+10\n"
-
339  "ldd r11,Y+11\n"
-
340  "ldd r12,Y+12\n"
-
341  "ldd r13,Y+13\n"
-
342  "ldd r14,Y+14\n"
-
343  "ldd r15,Y+15\n"
-
344  "lsl r8\n"
-
345  "rol r9\n"
-
346  "rol r10\n"
-
347  "rol r11\n"
-
348  "rol r12\n"
-
349  "rol r13\n"
-
350  "rol r14\n"
-
351  "rol r15\n"
-
352  "adc r8, __zero_reg__\n"
-
353  "ldd __tmp_reg__,Y+32\n"
-
354  "eor r8,__tmp_reg__\n"
-
355  "ldd __tmp_reg__,Y+33\n"
-
356  "eor r9,__tmp_reg__\n"
-
357  "ldd __tmp_reg__,Y+34\n"
-
358  "eor r10,__tmp_reg__\n"
-
359  "ldd __tmp_reg__,Y+35\n"
-
360  "eor r11,__tmp_reg__\n"
-
361  "ldd __tmp_reg__,Y+36\n"
-
362  "eor r12,__tmp_reg__\n"
-
363  "ldd __tmp_reg__,Y+37\n"
-
364  "eor r13,__tmp_reg__\n"
-
365  "ldd __tmp_reg__,Y+38\n"
-
366  "eor r14,__tmp_reg__\n"
-
367  "ldd __tmp_reg__,Y+39\n"
-
368  "eor r15,__tmp_reg__\n"
-
369  "ldi r19,5\n"
-
370  "103:\n"
-
371  "ld __tmp_reg__,Z\n"
-
372  "eor __tmp_reg__,r8\n"
-
373  "st Z,__tmp_reg__\n"
-
374  "ldd __tmp_reg__,Z+1\n"
-
375  "eor __tmp_reg__,r9\n"
-
376  "std Z+1,__tmp_reg__\n"
-
377  "ldd __tmp_reg__,Z+2\n"
-
378  "eor __tmp_reg__,r10\n"
-
379  "std Z+2,__tmp_reg__\n"
-
380  "ldd __tmp_reg__,Z+3\n"
-
381  "eor __tmp_reg__,r11\n"
-
382  "std Z+3,__tmp_reg__\n"
-
383  "ldd __tmp_reg__,Z+4\n"
-
384  "eor __tmp_reg__,r12\n"
-
385  "std Z+4,__tmp_reg__\n"
-
386  "ldd __tmp_reg__,Z+5\n"
-
387  "eor __tmp_reg__,r13\n"
-
388  "std Z+5,__tmp_reg__\n"
-
389  "ldd __tmp_reg__,Z+6\n"
-
390  "eor __tmp_reg__,r14\n"
-
391  "std Z+6,__tmp_reg__\n"
-
392  "ldd __tmp_reg__,Z+7\n"
-
393  "eor __tmp_reg__,r15\n"
-
394  "std Z+7,__tmp_reg__\n"
-
395  "adiw r30,40\n"
-
396  "dec r19\n"
-
397  "brne 103b\n"
-
398  "subi r30,192\n"
-
399  "sbc r31,__zero_reg__\n"
-
400  "ldd r8,Y+16\n"
-
401  "ldd r9,Y+17\n"
-
402  "ldd r10,Y+18\n"
-
403  "ldd r11,Y+19\n"
-
404  "ldd r12,Y+20\n"
-
405  "ldd r13,Y+21\n"
-
406  "ldd r14,Y+22\n"
-
407  "ldd r15,Y+23\n"
-
408  "lsl r8\n"
-
409  "rol r9\n"
-
410  "rol r10\n"
-
411  "rol r11\n"
-
412  "rol r12\n"
-
413  "rol r13\n"
-
414  "rol r14\n"
-
415  "rol r15\n"
-
416  "adc r8, __zero_reg__\n"
-
417  "ld __tmp_reg__,Y\n"
-
418  "eor r8,__tmp_reg__\n"
-
419  "ldd __tmp_reg__,Y+1\n"
-
420  "eor r9,__tmp_reg__\n"
-
421  "ldd __tmp_reg__,Y+2\n"
-
422  "eor r10,__tmp_reg__\n"
-
423  "ldd __tmp_reg__,Y+3\n"
-
424  "eor r11,__tmp_reg__\n"
-
425  "ldd __tmp_reg__,Y+4\n"
-
426  "eor r12,__tmp_reg__\n"
-
427  "ldd __tmp_reg__,Y+5\n"
-
428  "eor r13,__tmp_reg__\n"
-
429  "ldd __tmp_reg__,Y+6\n"
-
430  "eor r14,__tmp_reg__\n"
-
431  "ldd __tmp_reg__,Y+7\n"
-
432  "eor r15,__tmp_reg__\n"
-
433  "ldi r19,5\n"
-
434  "104:\n"
-
435  "ld __tmp_reg__,Z\n"
-
436  "eor __tmp_reg__,r8\n"
-
437  "st Z,__tmp_reg__\n"
-
438  "ldd __tmp_reg__,Z+1\n"
-
439  "eor __tmp_reg__,r9\n"
-
440  "std Z+1,__tmp_reg__\n"
-
441  "ldd __tmp_reg__,Z+2\n"
-
442  "eor __tmp_reg__,r10\n"
-
443  "std Z+2,__tmp_reg__\n"
-
444  "ldd __tmp_reg__,Z+3\n"
-
445  "eor __tmp_reg__,r11\n"
-
446  "std Z+3,__tmp_reg__\n"
-
447  "ldd __tmp_reg__,Z+4\n"
-
448  "eor __tmp_reg__,r12\n"
-
449  "std Z+4,__tmp_reg__\n"
-
450  "ldd __tmp_reg__,Z+5\n"
-
451  "eor __tmp_reg__,r13\n"
-
452  "std Z+5,__tmp_reg__\n"
-
453  "ldd __tmp_reg__,Z+6\n"
-
454  "eor __tmp_reg__,r14\n"
-
455  "std Z+6,__tmp_reg__\n"
-
456  "ldd __tmp_reg__,Z+7\n"
-
457  "eor __tmp_reg__,r15\n"
-
458  "std Z+7,__tmp_reg__\n"
-
459  "adiw r30,40\n"
-
460  "dec r19\n"
-
461  "brne 104b\n"
-
462  "subi r30,192\n"
-
463  "sbc r31,__zero_reg__\n"
-
464  "ldd r8,Y+24\n"
-
465  "ldd r9,Y+25\n"
-
466  "ldd r10,Y+26\n"
-
467  "ldd r11,Y+27\n"
-
468  "ldd r12,Y+28\n"
-
469  "ldd r13,Y+29\n"
-
470  "ldd r14,Y+30\n"
-
471  "ldd r15,Y+31\n"
-
472  "lsl r8\n"
-
473  "rol r9\n"
-
474  "rol r10\n"
-
475  "rol r11\n"
-
476  "rol r12\n"
-
477  "rol r13\n"
-
478  "rol r14\n"
-
479  "rol r15\n"
-
480  "adc r8, __zero_reg__\n"
-
481  "ldd __tmp_reg__,Y+8\n"
-
482  "eor r8,__tmp_reg__\n"
-
483  "ldd __tmp_reg__,Y+9\n"
-
484  "eor r9,__tmp_reg__\n"
-
485  "ldd __tmp_reg__,Y+10\n"
-
486  "eor r10,__tmp_reg__\n"
-
487  "ldd __tmp_reg__,Y+11\n"
-
488  "eor r11,__tmp_reg__\n"
-
489  "ldd __tmp_reg__,Y+12\n"
-
490  "eor r12,__tmp_reg__\n"
-
491  "ldd __tmp_reg__,Y+13\n"
-
492  "eor r13,__tmp_reg__\n"
-
493  "ldd __tmp_reg__,Y+14\n"
-
494  "eor r14,__tmp_reg__\n"
-
495  "ldd __tmp_reg__,Y+15\n"
-
496  "eor r15,__tmp_reg__\n"
-
497  "ldi r19,5\n"
-
498  "105:\n"
-
499  "ld __tmp_reg__,Z\n"
-
500  "eor __tmp_reg__,r8\n"
-
501  "st Z,__tmp_reg__\n"
-
502  "ldd __tmp_reg__,Z+1\n"
-
503  "eor __tmp_reg__,r9\n"
-
504  "std Z+1,__tmp_reg__\n"
-
505  "ldd __tmp_reg__,Z+2\n"
-
506  "eor __tmp_reg__,r10\n"
-
507  "std Z+2,__tmp_reg__\n"
-
508  "ldd __tmp_reg__,Z+3\n"
-
509  "eor __tmp_reg__,r11\n"
-
510  "std Z+3,__tmp_reg__\n"
-
511  "ldd __tmp_reg__,Z+4\n"
-
512  "eor __tmp_reg__,r12\n"
-
513  "std Z+4,__tmp_reg__\n"
-
514  "ldd __tmp_reg__,Z+5\n"
-
515  "eor __tmp_reg__,r13\n"
-
516  "std Z+5,__tmp_reg__\n"
-
517  "ldd __tmp_reg__,Z+6\n"
-
518  "eor __tmp_reg__,r14\n"
-
519  "std Z+6,__tmp_reg__\n"
-
520  "ldd __tmp_reg__,Z+7\n"
-
521  "eor __tmp_reg__,r15\n"
-
522  "std Z+7,__tmp_reg__\n"
-
523  "adiw r30,40\n"
-
524  "dec r19\n"
-
525  "brne 105b\n"
-
526  "subi r30,192\n"
-
527  "sbc r31,__zero_reg__\n"
-
528  "ldd r8,Y+32\n"
-
529  "ldd r9,Y+33\n"
-
530  "ldd r10,Y+34\n"
-
531  "ldd r11,Y+35\n"
-
532  "ldd r12,Y+36\n"
-
533  "ldd r13,Y+37\n"
-
534  "ldd r14,Y+38\n"
-
535  "ldd r15,Y+39\n"
-
536  "lsl r8\n"
-
537  "rol r9\n"
-
538  "rol r10\n"
-
539  "rol r11\n"
-
540  "rol r12\n"
-
541  "rol r13\n"
-
542  "rol r14\n"
-
543  "rol r15\n"
-
544  "adc r8, __zero_reg__\n"
-
545  "ldd __tmp_reg__,Y+16\n"
-
546  "eor r8,__tmp_reg__\n"
-
547  "ldd __tmp_reg__,Y+17\n"
-
548  "eor r9,__tmp_reg__\n"
-
549  "ldd __tmp_reg__,Y+18\n"
-
550  "eor r10,__tmp_reg__\n"
-
551  "ldd __tmp_reg__,Y+19\n"
-
552  "eor r11,__tmp_reg__\n"
-
553  "ldd __tmp_reg__,Y+20\n"
-
554  "eor r12,__tmp_reg__\n"
-
555  "ldd __tmp_reg__,Y+21\n"
-
556  "eor r13,__tmp_reg__\n"
-
557  "ldd __tmp_reg__,Y+22\n"
-
558  "eor r14,__tmp_reg__\n"
-
559  "ldd __tmp_reg__,Y+23\n"
-
560  "eor r15,__tmp_reg__\n"
-
561  "ldi r19,5\n"
-
562  "106:\n"
-
563  "ld __tmp_reg__,Z\n"
-
564  "eor __tmp_reg__,r8\n"
-
565  "st Z,__tmp_reg__\n"
-
566  "ldd __tmp_reg__,Z+1\n"
-
567  "eor __tmp_reg__,r9\n"
-
568  "std Z+1,__tmp_reg__\n"
-
569  "ldd __tmp_reg__,Z+2\n"
-
570  "eor __tmp_reg__,r10\n"
-
571  "std Z+2,__tmp_reg__\n"
-
572  "ldd __tmp_reg__,Z+3\n"
-
573  "eor __tmp_reg__,r11\n"
-
574  "std Z+3,__tmp_reg__\n"
-
575  "ldd __tmp_reg__,Z+4\n"
-
576  "eor __tmp_reg__,r12\n"
-
577  "std Z+4,__tmp_reg__\n"
-
578  "ldd __tmp_reg__,Z+5\n"
-
579  "eor __tmp_reg__,r13\n"
-
580  "std Z+5,__tmp_reg__\n"
-
581  "ldd __tmp_reg__,Z+6\n"
-
582  "eor __tmp_reg__,r14\n"
-
583  "std Z+6,__tmp_reg__\n"
-
584  "ldd __tmp_reg__,Z+7\n"
-
585  "eor __tmp_reg__,r15\n"
-
586  "std Z+7,__tmp_reg__\n"
-
587  "adiw r30,40\n"
-
588  "dec r19\n"
-
589  "brne 106b\n"
-
590  "subi r30,192\n"
-
591  "sbc r31,__zero_reg__\n"
-
592  "ld r8,Y\n"
-
593  "ldd r9,Y+1\n"
-
594  "ldd r10,Y+2\n"
-
595  "ldd r11,Y+3\n"
-
596  "ldd r12,Y+4\n"
-
597  "ldd r13,Y+5\n"
-
598  "ldd r14,Y+6\n"
-
599  "ldd r15,Y+7\n"
-
600  "lsl r8\n"
-
601  "rol r9\n"
-
602  "rol r10\n"
-
603  "rol r11\n"
-
604  "rol r12\n"
-
605  "rol r13\n"
-
606  "rol r14\n"
-
607  "rol r15\n"
-
608  "adc r8, __zero_reg__\n"
-
609  "ldd __tmp_reg__,Y+24\n"
-
610  "eor r8,__tmp_reg__\n"
-
611  "ldd __tmp_reg__,Y+25\n"
-
612  "eor r9,__tmp_reg__\n"
-
613  "ldd __tmp_reg__,Y+26\n"
-
614  "eor r10,__tmp_reg__\n"
-
615  "ldd __tmp_reg__,Y+27\n"
-
616  "eor r11,__tmp_reg__\n"
-
617  "ldd __tmp_reg__,Y+28\n"
-
618  "eor r12,__tmp_reg__\n"
-
619  "ldd __tmp_reg__,Y+29\n"
-
620  "eor r13,__tmp_reg__\n"
-
621  "ldd __tmp_reg__,Y+30\n"
-
622  "eor r14,__tmp_reg__\n"
-
623  "ldd __tmp_reg__,Y+31\n"
-
624  "eor r15,__tmp_reg__\n"
-
625  "ldi r19,5\n"
-
626  "107:\n"
-
627  "ld __tmp_reg__,Z\n"
-
628  "eor __tmp_reg__,r8\n"
-
629  "st Z,__tmp_reg__\n"
-
630  "ldd __tmp_reg__,Z+1\n"
-
631  "eor __tmp_reg__,r9\n"
-
632  "std Z+1,__tmp_reg__\n"
-
633  "ldd __tmp_reg__,Z+2\n"
-
634  "eor __tmp_reg__,r10\n"
-
635  "std Z+2,__tmp_reg__\n"
-
636  "ldd __tmp_reg__,Z+3\n"
-
637  "eor __tmp_reg__,r11\n"
-
638  "std Z+3,__tmp_reg__\n"
-
639  "ldd __tmp_reg__,Z+4\n"
-
640  "eor __tmp_reg__,r12\n"
-
641  "std Z+4,__tmp_reg__\n"
-
642  "ldd __tmp_reg__,Z+5\n"
-
643  "eor __tmp_reg__,r13\n"
-
644  "std Z+5,__tmp_reg__\n"
-
645  "ldd __tmp_reg__,Z+6\n"
-
646  "eor __tmp_reg__,r14\n"
-
647  "std Z+6,__tmp_reg__\n"
-
648  "ldd __tmp_reg__,Z+7\n"
-
649  "eor __tmp_reg__,r15\n"
-
650  "std Z+7,__tmp_reg__\n"
-
651  "adiw r30,40\n"
-
652  "dec r19\n"
-
653  "brne 107b\n"
-
654  "subi r30,232\n"
-
655  "sbc r31,__zero_reg__\n"
-
656 
-
657  // Step mappings rho and pi combined into one step.
-
658 
-
659  // B[0][0] = A[0][0]
-
660  "ld r8,Z\n"
-
661  "ldd r9,Z+1\n"
-
662  "ldd r10,Z+2\n"
-
663  "ldd r11,Z+3\n"
-
664  "ldd r12,Z+4\n"
-
665  "ldd r13,Z+5\n"
-
666  "ldd r14,Z+6\n"
-
667  "ldd r15,Z+7\n"
-
668  "st X+,r8\n"
-
669  "st X+,r9\n"
-
670  "st X+,r10\n"
-
671  "st X+,r11\n"
-
672  "st X+,r12\n"
-
673  "st X+,r13\n"
-
674  "st X+,r14\n"
-
675  "st X+,r15\n"
-
676 
-
677  // B[1][0] = leftRotate28_64(A[0][3])
-
678  "adiw r26,32\n"
-
679  "ldd r8,Z+24\n"
-
680  "ldd r9,Z+25\n"
-
681  "ldd r10,Z+26\n"
-
682  "ldd r11,Z+27\n"
-
683  "ldd r12,Z+28\n"
-
684  "ldd r13,Z+29\n"
-
685  "ldd r14,Z+30\n"
-
686  "ldd r15,Z+31\n"
-
687  "lsl r8\n"
-
688  "rol r9\n"
-
689  "rol r10\n"
-
690  "rol r11\n"
-
691  "rol r12\n"
-
692  "rol r13\n"
-
693  "rol r14\n"
-
694  "rol r15\n"
-
695  "adc r8, __zero_reg__\n"
-
696  "lsl r8\n"
-
697  "rol r9\n"
-
698  "rol r10\n"
-
699  "rol r11\n"
-
700  "rol r12\n"
-
701  "rol r13\n"
-
702  "rol r14\n"
-
703  "rol r15\n"
-
704  "adc r8, __zero_reg__\n"
-
705  "lsl r8\n"
-
706  "rol r9\n"
-
707  "rol r10\n"
-
708  "rol r11\n"
-
709  "rol r12\n"
-
710  "rol r13\n"
-
711  "rol r14\n"
-
712  "rol r15\n"
-
713  "adc r8, __zero_reg__\n"
-
714  "lsl r8\n"
-
715  "rol r9\n"
-
716  "rol r10\n"
-
717  "rol r11\n"
-
718  "rol r12\n"
-
719  "rol r13\n"
-
720  "rol r14\n"
-
721  "rol r15\n"
-
722  "adc r8, __zero_reg__\n"
+
240 void KeccakCore::encrypt(void *output, const void *input, size_t size)
+
241 {
+
242  // Stop accepting input while we are generating output.
+
243  state.inputSize = 0;
+
244 
+
245  // Copy the output data into the caller's return buffer.
+
246  uint8_t *out = (uint8_t *)output;
+
247  const uint8_t *in = (const uint8_t *)input;
+
248  uint8_t tempSize;
+
249  while (size > 0) {
+
250  // Generate another output block if the current one has been exhausted.
+
251  if (state.outputSize >= _blockSize) {
+
252  keccakp();
+
253  state.outputSize = 0;
+
254  }
+
255 
+
256  // How many bytes can we extract this time around?
+
257  tempSize = _blockSize - state.outputSize;
+
258  if (tempSize > size)
+
259  tempSize = size;
+
260 
+
261  // XOR the partial output data into the caller's return buffer.
+
262  const uint8_t *d = ((const uint8_t *)(state.A)) + state.outputSize;
+
263  for (uint8_t index = 0; index < tempSize; ++index)
+
264  out[index] = in[index] ^ d[index];
+
265  state.outputSize += tempSize;
+
266  size -= tempSize;
+
267  out += tempSize;
+
268  in += tempSize;
+
269  }
+
270 }
+
271 
+
275 void KeccakCore::clear()
+
276 {
+
277  clean(state);
+
278 }
+
279 
+
293 void KeccakCore::setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
+
294 {
+
295  uint8_t *Abytes = (uint8_t *)state.A;
+
296  size_t size = blockSize();
+
297  reset();
+
298  if (len <= size) {
+
299  // Because the state has just been reset, state.A is set to
+
300  // all-zeroes. We can copy the key directly into the state
+
301  // and then XOR the block with the pad value.
+
302  memcpy(Abytes, key, len);
+
303  } else {
+
304  // The key is larger than the block size. Hash it down.
+
305  // Afterwards, state.A will contain the first block of data
+
306  // to be extracted. We truncate it to the first "hashSize"
+
307  // bytes and XOR with the padding.
+
308  update(key, len);
+
309  this->pad(0x06);
+
310  memset(Abytes + hashSize, pad, size - hashSize);
+
311  memset(Abytes + size, 0, sizeof(state.A) - size);
+
312  size = hashSize;
+
313  }
+
314  while (size > 0) {
+
315  *Abytes++ ^= pad;
+
316  --size;
+
317  }
+
318  keccakp();
+
319 }
+
320 
+
324 void KeccakCore::keccakp()
+
325 {
+
326  uint64_t B[5][5];
+
327 #if defined(__AVR__)
+
328  // This assembly code was generated by the "genkeccak.c" program.
+
329  // Do not modify this code directly. Instead modify "genkeccak.c"
+
330  // and then re-generate the code here.
+
331  for (uint8_t round = 0; round < 24; ++round) {
+
332  __asm__ __volatile__ (
+
333  "push r29\n"
+
334  "push r28\n"
+
335  "mov r28,r26\n"
+
336  "mov r29,r27\n"
+
337 
+
338  // Step mapping theta. Compute C.
+
339  "ldi r20,5\n"
+
340  "100:\n"
+
341  "ld r8,Z\n"
+
342  "ldd r9,Z+1\n"
+
343  "ldd r10,Z+2\n"
+
344  "ldd r11,Z+3\n"
+
345  "ldd r12,Z+4\n"
+
346  "ldd r13,Z+5\n"
+
347  "ldd r14,Z+6\n"
+
348  "ldd r15,Z+7\n"
+
349  "ldi r19,4\n"
+
350  "101:\n"
+
351  "adiw r30,40\n"
+
352  "ld __tmp_reg__,Z\n"
+
353  "eor r8,__tmp_reg__\n"
+
354  "ldd __tmp_reg__,Z+1\n"
+
355  "eor r9,__tmp_reg__\n"
+
356  "ldd __tmp_reg__,Z+2\n"
+
357  "eor r10,__tmp_reg__\n"
+
358  "ldd __tmp_reg__,Z+3\n"
+
359  "eor r11,__tmp_reg__\n"
+
360  "ldd __tmp_reg__,Z+4\n"
+
361  "eor r12,__tmp_reg__\n"
+
362  "ldd __tmp_reg__,Z+5\n"
+
363  "eor r13,__tmp_reg__\n"
+
364  "ldd __tmp_reg__,Z+6\n"
+
365  "eor r14,__tmp_reg__\n"
+
366  "ldd __tmp_reg__,Z+7\n"
+
367  "eor r15,__tmp_reg__\n"
+
368  "dec r19\n"
+
369  "brne 101b\n"
+
370  "st X+,r8\n"
+
371  "st X+,r9\n"
+
372  "st X+,r10\n"
+
373  "st X+,r11\n"
+
374  "st X+,r12\n"
+
375  "st X+,r13\n"
+
376  "st X+,r14\n"
+
377  "st X+,r15\n"
+
378  "subi r30,152\n"
+
379  "sbc r31,__zero_reg__\n"
+
380  "dec r20\n"
+
381  "brne 100b\n"
+
382  "sbiw r30,40\n"
+
383  "sbiw r26,40\n"
+
384 
+
385  // Step mapping theta. Compute D and XOR with A.
+
386  "ldd r8,Y+8\n"
+
387  "ldd r9,Y+9\n"
+
388  "ldd r10,Y+10\n"
+
389  "ldd r11,Y+11\n"
+
390  "ldd r12,Y+12\n"
+
391  "ldd r13,Y+13\n"
+
392  "ldd r14,Y+14\n"
+
393  "ldd r15,Y+15\n"
+
394  "lsl r8\n"
+
395  "rol r9\n"
+
396  "rol r10\n"
+
397  "rol r11\n"
+
398  "rol r12\n"
+
399  "rol r13\n"
+
400  "rol r14\n"
+
401  "rol r15\n"
+
402  "adc r8, __zero_reg__\n"
+
403  "ldd __tmp_reg__,Y+32\n"
+
404  "eor r8,__tmp_reg__\n"
+
405  "ldd __tmp_reg__,Y+33\n"
+
406  "eor r9,__tmp_reg__\n"
+
407  "ldd __tmp_reg__,Y+34\n"
+
408  "eor r10,__tmp_reg__\n"
+
409  "ldd __tmp_reg__,Y+35\n"
+
410  "eor r11,__tmp_reg__\n"
+
411  "ldd __tmp_reg__,Y+36\n"
+
412  "eor r12,__tmp_reg__\n"
+
413  "ldd __tmp_reg__,Y+37\n"
+
414  "eor r13,__tmp_reg__\n"
+
415  "ldd __tmp_reg__,Y+38\n"
+
416  "eor r14,__tmp_reg__\n"
+
417  "ldd __tmp_reg__,Y+39\n"
+
418  "eor r15,__tmp_reg__\n"
+
419  "ldi r19,5\n"
+
420  "103:\n"
+
421  "ld __tmp_reg__,Z\n"
+
422  "eor __tmp_reg__,r8\n"
+
423  "st Z,__tmp_reg__\n"
+
424  "ldd __tmp_reg__,Z+1\n"
+
425  "eor __tmp_reg__,r9\n"
+
426  "std Z+1,__tmp_reg__\n"
+
427  "ldd __tmp_reg__,Z+2\n"
+
428  "eor __tmp_reg__,r10\n"
+
429  "std Z+2,__tmp_reg__\n"
+
430  "ldd __tmp_reg__,Z+3\n"
+
431  "eor __tmp_reg__,r11\n"
+
432  "std Z+3,__tmp_reg__\n"
+
433  "ldd __tmp_reg__,Z+4\n"
+
434  "eor __tmp_reg__,r12\n"
+
435  "std Z+4,__tmp_reg__\n"
+
436  "ldd __tmp_reg__,Z+5\n"
+
437  "eor __tmp_reg__,r13\n"
+
438  "std Z+5,__tmp_reg__\n"
+
439  "ldd __tmp_reg__,Z+6\n"
+
440  "eor __tmp_reg__,r14\n"
+
441  "std Z+6,__tmp_reg__\n"
+
442  "ldd __tmp_reg__,Z+7\n"
+
443  "eor __tmp_reg__,r15\n"
+
444  "std Z+7,__tmp_reg__\n"
+
445  "adiw r30,40\n"
+
446  "dec r19\n"
+
447  "brne 103b\n"
+
448  "subi r30,192\n"
+
449  "sbc r31,__zero_reg__\n"
+
450  "ldd r8,Y+16\n"
+
451  "ldd r9,Y+17\n"
+
452  "ldd r10,Y+18\n"
+
453  "ldd r11,Y+19\n"
+
454  "ldd r12,Y+20\n"
+
455  "ldd r13,Y+21\n"
+
456  "ldd r14,Y+22\n"
+
457  "ldd r15,Y+23\n"
+
458  "lsl r8\n"
+
459  "rol r9\n"
+
460  "rol r10\n"
+
461  "rol r11\n"
+
462  "rol r12\n"
+
463  "rol r13\n"
+
464  "rol r14\n"
+
465  "rol r15\n"
+
466  "adc r8, __zero_reg__\n"
+
467  "ld __tmp_reg__,Y\n"
+
468  "eor r8,__tmp_reg__\n"
+
469  "ldd __tmp_reg__,Y+1\n"
+
470  "eor r9,__tmp_reg__\n"
+
471  "ldd __tmp_reg__,Y+2\n"
+
472  "eor r10,__tmp_reg__\n"
+
473  "ldd __tmp_reg__,Y+3\n"
+
474  "eor r11,__tmp_reg__\n"
+
475  "ldd __tmp_reg__,Y+4\n"
+
476  "eor r12,__tmp_reg__\n"
+
477  "ldd __tmp_reg__,Y+5\n"
+
478  "eor r13,__tmp_reg__\n"
+
479  "ldd __tmp_reg__,Y+6\n"
+
480  "eor r14,__tmp_reg__\n"
+
481  "ldd __tmp_reg__,Y+7\n"
+
482  "eor r15,__tmp_reg__\n"
+
483  "ldi r19,5\n"
+
484  "104:\n"
+
485  "ld __tmp_reg__,Z\n"
+
486  "eor __tmp_reg__,r8\n"
+
487  "st Z,__tmp_reg__\n"
+
488  "ldd __tmp_reg__,Z+1\n"
+
489  "eor __tmp_reg__,r9\n"
+
490  "std Z+1,__tmp_reg__\n"
+
491  "ldd __tmp_reg__,Z+2\n"
+
492  "eor __tmp_reg__,r10\n"
+
493  "std Z+2,__tmp_reg__\n"
+
494  "ldd __tmp_reg__,Z+3\n"
+
495  "eor __tmp_reg__,r11\n"
+
496  "std Z+3,__tmp_reg__\n"
+
497  "ldd __tmp_reg__,Z+4\n"
+
498  "eor __tmp_reg__,r12\n"
+
499  "std Z+4,__tmp_reg__\n"
+
500  "ldd __tmp_reg__,Z+5\n"
+
501  "eor __tmp_reg__,r13\n"
+
502  "std Z+5,__tmp_reg__\n"
+
503  "ldd __tmp_reg__,Z+6\n"
+
504  "eor __tmp_reg__,r14\n"
+
505  "std Z+6,__tmp_reg__\n"
+
506  "ldd __tmp_reg__,Z+7\n"
+
507  "eor __tmp_reg__,r15\n"
+
508  "std Z+7,__tmp_reg__\n"
+
509  "adiw r30,40\n"
+
510  "dec r19\n"
+
511  "brne 104b\n"
+
512  "subi r30,192\n"
+
513  "sbc r31,__zero_reg__\n"
+
514  "ldd r8,Y+24\n"
+
515  "ldd r9,Y+25\n"
+
516  "ldd r10,Y+26\n"
+
517  "ldd r11,Y+27\n"
+
518  "ldd r12,Y+28\n"
+
519  "ldd r13,Y+29\n"
+
520  "ldd r14,Y+30\n"
+
521  "ldd r15,Y+31\n"
+
522  "lsl r8\n"
+
523  "rol r9\n"
+
524  "rol r10\n"
+
525  "rol r11\n"
+
526  "rol r12\n"
+
527  "rol r13\n"
+
528  "rol r14\n"
+
529  "rol r15\n"
+
530  "adc r8, __zero_reg__\n"
+
531  "ldd __tmp_reg__,Y+8\n"
+
532  "eor r8,__tmp_reg__\n"
+
533  "ldd __tmp_reg__,Y+9\n"
+
534  "eor r9,__tmp_reg__\n"
+
535  "ldd __tmp_reg__,Y+10\n"
+
536  "eor r10,__tmp_reg__\n"
+
537  "ldd __tmp_reg__,Y+11\n"
+
538  "eor r11,__tmp_reg__\n"
+
539  "ldd __tmp_reg__,Y+12\n"
+
540  "eor r12,__tmp_reg__\n"
+
541  "ldd __tmp_reg__,Y+13\n"
+
542  "eor r13,__tmp_reg__\n"
+
543  "ldd __tmp_reg__,Y+14\n"
+
544  "eor r14,__tmp_reg__\n"
+
545  "ldd __tmp_reg__,Y+15\n"
+
546  "eor r15,__tmp_reg__\n"
+
547  "ldi r19,5\n"
+
548  "105:\n"
+
549  "ld __tmp_reg__,Z\n"
+
550  "eor __tmp_reg__,r8\n"
+
551  "st Z,__tmp_reg__\n"
+
552  "ldd __tmp_reg__,Z+1\n"
+
553  "eor __tmp_reg__,r9\n"
+
554  "std Z+1,__tmp_reg__\n"
+
555  "ldd __tmp_reg__,Z+2\n"
+
556  "eor __tmp_reg__,r10\n"
+
557  "std Z+2,__tmp_reg__\n"
+
558  "ldd __tmp_reg__,Z+3\n"
+
559  "eor __tmp_reg__,r11\n"
+
560  "std Z+3,__tmp_reg__\n"
+
561  "ldd __tmp_reg__,Z+4\n"
+
562  "eor __tmp_reg__,r12\n"
+
563  "std Z+4,__tmp_reg__\n"
+
564  "ldd __tmp_reg__,Z+5\n"
+
565  "eor __tmp_reg__,r13\n"
+
566  "std Z+5,__tmp_reg__\n"
+
567  "ldd __tmp_reg__,Z+6\n"
+
568  "eor __tmp_reg__,r14\n"
+
569  "std Z+6,__tmp_reg__\n"
+
570  "ldd __tmp_reg__,Z+7\n"
+
571  "eor __tmp_reg__,r15\n"
+
572  "std Z+7,__tmp_reg__\n"
+
573  "adiw r30,40\n"
+
574  "dec r19\n"
+
575  "brne 105b\n"
+
576  "subi r30,192\n"
+
577  "sbc r31,__zero_reg__\n"
+
578  "ldd r8,Y+32\n"
+
579  "ldd r9,Y+33\n"
+
580  "ldd r10,Y+34\n"
+
581  "ldd r11,Y+35\n"
+
582  "ldd r12,Y+36\n"
+
583  "ldd r13,Y+37\n"
+
584  "ldd r14,Y+38\n"
+
585  "ldd r15,Y+39\n"
+
586  "lsl r8\n"
+
587  "rol r9\n"
+
588  "rol r10\n"
+
589  "rol r11\n"
+
590  "rol r12\n"
+
591  "rol r13\n"
+
592  "rol r14\n"
+
593  "rol r15\n"
+
594  "adc r8, __zero_reg__\n"
+
595  "ldd __tmp_reg__,Y+16\n"
+
596  "eor r8,__tmp_reg__\n"
+
597  "ldd __tmp_reg__,Y+17\n"
+
598  "eor r9,__tmp_reg__\n"
+
599  "ldd __tmp_reg__,Y+18\n"
+
600  "eor r10,__tmp_reg__\n"
+
601  "ldd __tmp_reg__,Y+19\n"
+
602  "eor r11,__tmp_reg__\n"
+
603  "ldd __tmp_reg__,Y+20\n"
+
604  "eor r12,__tmp_reg__\n"
+
605  "ldd __tmp_reg__,Y+21\n"
+
606  "eor r13,__tmp_reg__\n"
+
607  "ldd __tmp_reg__,Y+22\n"
+
608  "eor r14,__tmp_reg__\n"
+
609  "ldd __tmp_reg__,Y+23\n"
+
610  "eor r15,__tmp_reg__\n"
+
611  "ldi r19,5\n"
+
612  "106:\n"
+
613  "ld __tmp_reg__,Z\n"
+
614  "eor __tmp_reg__,r8\n"
+
615  "st Z,__tmp_reg__\n"
+
616  "ldd __tmp_reg__,Z+1\n"
+
617  "eor __tmp_reg__,r9\n"
+
618  "std Z+1,__tmp_reg__\n"
+
619  "ldd __tmp_reg__,Z+2\n"
+
620  "eor __tmp_reg__,r10\n"
+
621  "std Z+2,__tmp_reg__\n"
+
622  "ldd __tmp_reg__,Z+3\n"
+
623  "eor __tmp_reg__,r11\n"
+
624  "std Z+3,__tmp_reg__\n"
+
625  "ldd __tmp_reg__,Z+4\n"
+
626  "eor __tmp_reg__,r12\n"
+
627  "std Z+4,__tmp_reg__\n"
+
628  "ldd __tmp_reg__,Z+5\n"
+
629  "eor __tmp_reg__,r13\n"
+
630  "std Z+5,__tmp_reg__\n"
+
631  "ldd __tmp_reg__,Z+6\n"
+
632  "eor __tmp_reg__,r14\n"
+
633  "std Z+6,__tmp_reg__\n"
+
634  "ldd __tmp_reg__,Z+7\n"
+
635  "eor __tmp_reg__,r15\n"
+
636  "std Z+7,__tmp_reg__\n"
+
637  "adiw r30,40\n"
+
638  "dec r19\n"
+
639  "brne 106b\n"
+
640  "subi r30,192\n"
+
641  "sbc r31,__zero_reg__\n"
+
642  "ld r8,Y\n"
+
643  "ldd r9,Y+1\n"
+
644  "ldd r10,Y+2\n"
+
645  "ldd r11,Y+3\n"
+
646  "ldd r12,Y+4\n"
+
647  "ldd r13,Y+5\n"
+
648  "ldd r14,Y+6\n"
+
649  "ldd r15,Y+7\n"
+
650  "lsl r8\n"
+
651  "rol r9\n"
+
652  "rol r10\n"
+
653  "rol r11\n"
+
654  "rol r12\n"
+
655  "rol r13\n"
+
656  "rol r14\n"
+
657  "rol r15\n"
+
658  "adc r8, __zero_reg__\n"
+
659  "ldd __tmp_reg__,Y+24\n"
+
660  "eor r8,__tmp_reg__\n"
+
661  "ldd __tmp_reg__,Y+25\n"
+
662  "eor r9,__tmp_reg__\n"
+
663  "ldd __tmp_reg__,Y+26\n"
+
664  "eor r10,__tmp_reg__\n"
+
665  "ldd __tmp_reg__,Y+27\n"
+
666  "eor r11,__tmp_reg__\n"
+
667  "ldd __tmp_reg__,Y+28\n"
+
668  "eor r12,__tmp_reg__\n"
+
669  "ldd __tmp_reg__,Y+29\n"
+
670  "eor r13,__tmp_reg__\n"
+
671  "ldd __tmp_reg__,Y+30\n"
+
672  "eor r14,__tmp_reg__\n"
+
673  "ldd __tmp_reg__,Y+31\n"
+
674  "eor r15,__tmp_reg__\n"
+
675  "ldi r19,5\n"
+
676  "107:\n"
+
677  "ld __tmp_reg__,Z\n"
+
678  "eor __tmp_reg__,r8\n"
+
679  "st Z,__tmp_reg__\n"
+
680  "ldd __tmp_reg__,Z+1\n"
+
681  "eor __tmp_reg__,r9\n"
+
682  "std Z+1,__tmp_reg__\n"
+
683  "ldd __tmp_reg__,Z+2\n"
+
684  "eor __tmp_reg__,r10\n"
+
685  "std Z+2,__tmp_reg__\n"
+
686  "ldd __tmp_reg__,Z+3\n"
+
687  "eor __tmp_reg__,r11\n"
+
688  "std Z+3,__tmp_reg__\n"
+
689  "ldd __tmp_reg__,Z+4\n"
+
690  "eor __tmp_reg__,r12\n"
+
691  "std Z+4,__tmp_reg__\n"
+
692  "ldd __tmp_reg__,Z+5\n"
+
693  "eor __tmp_reg__,r13\n"
+
694  "std Z+5,__tmp_reg__\n"
+
695  "ldd __tmp_reg__,Z+6\n"
+
696  "eor __tmp_reg__,r14\n"
+
697  "std Z+6,__tmp_reg__\n"
+
698  "ldd __tmp_reg__,Z+7\n"
+
699  "eor __tmp_reg__,r15\n"
+
700  "std Z+7,__tmp_reg__\n"
+
701  "adiw r30,40\n"
+
702  "dec r19\n"
+
703  "brne 107b\n"
+
704  "subi r30,232\n"
+
705  "sbc r31,__zero_reg__\n"
+
706 
+
707  // Step mappings rho and pi combined into one step.
+
708 
+
709  // B[0][0] = A[0][0]
+
710  "ld r8,Z\n"
+
711  "ldd r9,Z+1\n"
+
712  "ldd r10,Z+2\n"
+
713  "ldd r11,Z+3\n"
+
714  "ldd r12,Z+4\n"
+
715  "ldd r13,Z+5\n"
+
716  "ldd r14,Z+6\n"
+
717  "ldd r15,Z+7\n"
+
718  "st X+,r8\n"
+
719  "st X+,r9\n"
+
720  "st X+,r10\n"
+
721  "st X+,r11\n"
+
722  "st X+,r12\n"
723  "st X+,r13\n"
724  "st X+,r14\n"
725  "st X+,r15\n"
-
726  "st X+,r8\n"
-
727  "st X+,r9\n"
-
728  "st X+,r10\n"
-
729  "st X+,r11\n"
-
730  "st X+,r12\n"
-
731 
-
732  // B[2][0] = leftRotate1_64(A[0][1])
-
733  "adiw r26,32\n"
-
734  "ldd r8,Z+8\n"
-
735  "ldd r9,Z+9\n"
-
736  "ldd r10,Z+10\n"
-
737  "ldd r11,Z+11\n"
-
738  "ldd r12,Z+12\n"
-
739  "ldd r13,Z+13\n"
-
740  "ldd r14,Z+14\n"
-
741  "ldd r15,Z+15\n"
-
742  "lsl r8\n"
-
743  "rol r9\n"
-
744  "rol r10\n"
-
745  "rol r11\n"
-
746  "rol r12\n"
-
747  "rol r13\n"
-
748  "rol r14\n"
-
749  "rol r15\n"
-
750  "adc r8, __zero_reg__\n"
-
751  "st X+,r8\n"
-
752  "st X+,r9\n"
-
753  "st X+,r10\n"
-
754  "st X+,r11\n"
-
755  "st X+,r12\n"
-
756  "st X+,r13\n"
-
757  "st X+,r14\n"
-
758  "st X+,r15\n"
-
759 
-
760  // B[3][0] = leftRotate27_64(A[0][4])
-
761  "adiw r26,32\n"
-
762  "ldd r8,Z+32\n"
-
763  "ldd r9,Z+33\n"
-
764  "ldd r10,Z+34\n"
-
765  "ldd r11,Z+35\n"
-
766  "ldd r12,Z+36\n"
-
767  "ldd r13,Z+37\n"
-
768  "ldd r14,Z+38\n"
-
769  "ldd r15,Z+39\n"
-
770  "lsl r8\n"
-
771  "rol r9\n"
-
772  "rol r10\n"
-
773  "rol r11\n"
-
774  "rol r12\n"
-
775  "rol r13\n"
-
776  "rol r14\n"
-
777  "rol r15\n"
-
778  "adc r8, __zero_reg__\n"
-
779  "lsl r8\n"
-
780  "rol r9\n"
-
781  "rol r10\n"
-
782  "rol r11\n"
-
783  "rol r12\n"
-
784  "rol r13\n"
-
785  "rol r14\n"
-
786  "rol r15\n"
-
787  "adc r8, __zero_reg__\n"
-
788  "lsl r8\n"
-
789  "rol r9\n"
-
790  "rol r10\n"
-
791  "rol r11\n"
-
792  "rol r12\n"
-
793  "rol r13\n"
-
794  "rol r14\n"
-
795  "rol r15\n"
-
796  "adc r8, __zero_reg__\n"
-
797  "st X+,r13\n"
-
798  "st X+,r14\n"
-
799  "st X+,r15\n"
-
800  "st X+,r8\n"
-
801  "st X+,r9\n"
-
802  "st X+,r10\n"
-
803  "st X+,r11\n"
-
804  "st X+,r12\n"
-
805 
-
806  // B[4][0] = leftRotate62_64(A[0][2])
-
807  "adiw r26,32\n"
-
808  "ldd r8,Z+16\n"
-
809  "ldd r9,Z+17\n"
-
810  "ldd r10,Z+18\n"
-
811  "ldd r11,Z+19\n"
-
812  "ldd r12,Z+20\n"
-
813  "ldd r13,Z+21\n"
-
814  "ldd r14,Z+22\n"
-
815  "ldd r15,Z+23\n"
-
816  "bst r8,0\n"
-
817  "ror r15\n"
-
818  "ror r14\n"
-
819  "ror r13\n"
-
820  "ror r12\n"
-
821  "ror r11\n"
-
822  "ror r10\n"
-
823  "ror r9\n"
-
824  "ror r8\n"
-
825  "bld r15,7\n"
-
826  "bst r8,0\n"
-
827  "ror r15\n"
-
828  "ror r14\n"
-
829  "ror r13\n"
-
830  "ror r12\n"
-
831  "ror r11\n"
-
832  "ror r10\n"
-
833  "ror r9\n"
-
834  "ror r8\n"
-
835  "bld r15,7\n"
-
836  "st X+,r8\n"
-
837  "st X+,r9\n"
-
838  "st X+,r10\n"
-
839  "st X+,r11\n"
-
840  "st X+,r12\n"
-
841  "st X+,r13\n"
-
842  "st X+,r14\n"
-
843  "st X+,r15\n"
-
844 
-
845  // B[0][1] = leftRotate44_64(A[1][1])
-
846  "subi r26,160\n"
-
847  "sbc r27,__zero_reg__\n"
-
848  "adiw r30,40\n"
-
849  "ldd r8,Z+8\n"
-
850  "ldd r9,Z+9\n"
-
851  "ldd r10,Z+10\n"
-
852  "ldd r11,Z+11\n"
-
853  "ldd r12,Z+12\n"
-
854  "ldd r13,Z+13\n"
-
855  "ldd r14,Z+14\n"
-
856  "ldd r15,Z+15\n"
-
857  "lsl r8\n"
-
858  "rol r9\n"
-
859  "rol r10\n"
-
860  "rol r11\n"
-
861  "rol r12\n"
-
862  "rol r13\n"
-
863  "rol r14\n"
-
864  "rol r15\n"
-
865  "adc r8, __zero_reg__\n"
-
866  "lsl r8\n"
-
867  "rol r9\n"
-
868  "rol r10\n"
-
869  "rol r11\n"
-
870  "rol r12\n"
-
871  "rol r13\n"
-
872  "rol r14\n"
-
873  "rol r15\n"
-
874  "adc r8, __zero_reg__\n"
-
875  "lsl r8\n"
-
876  "rol r9\n"
-
877  "rol r10\n"
-
878  "rol r11\n"
-
879  "rol r12\n"
-
880  "rol r13\n"
-
881  "rol r14\n"
-
882  "rol r15\n"
-
883  "adc r8, __zero_reg__\n"
-
884  "lsl r8\n"
-
885  "rol r9\n"
-
886  "rol r10\n"
-
887  "rol r11\n"
-
888  "rol r12\n"
-
889  "rol r13\n"
-
890  "rol r14\n"
-
891  "rol r15\n"
-
892  "adc r8, __zero_reg__\n"
-
893  "st X+,r11\n"
-
894  "st X+,r12\n"
-
895  "st X+,r13\n"
-
896  "st X+,r14\n"
-
897  "st X+,r15\n"
-
898  "st X+,r8\n"
-
899  "st X+,r9\n"
-
900  "st X+,r10\n"
-
901 
-
902  // B[1][1] = leftRotate20_64(A[1][4])
-
903  "adiw r26,32\n"
-
904  "ldd r8,Z+32\n"
-
905  "ldd r9,Z+33\n"
-
906  "ldd r10,Z+34\n"
-
907  "ldd r11,Z+35\n"
-
908  "ldd r12,Z+36\n"
-
909  "ldd r13,Z+37\n"
-
910  "ldd r14,Z+38\n"
-
911  "ldd r15,Z+39\n"
-
912  "lsl r8\n"
-
913  "rol r9\n"
-
914  "rol r10\n"
-
915  "rol r11\n"
-
916  "rol r12\n"
-
917  "rol r13\n"
-
918  "rol r14\n"
-
919  "rol r15\n"
-
920  "adc r8, __zero_reg__\n"
-
921  "lsl r8\n"
-
922  "rol r9\n"
-
923  "rol r10\n"
-
924  "rol r11\n"
-
925  "rol r12\n"
-
926  "rol r13\n"
-
927  "rol r14\n"
-
928  "rol r15\n"
-
929  "adc r8, __zero_reg__\n"
-
930  "lsl r8\n"
-
931  "rol r9\n"
-
932  "rol r10\n"
-
933  "rol r11\n"
-
934  "rol r12\n"
-
935  "rol r13\n"
-
936  "rol r14\n"
-
937  "rol r15\n"
-
938  "adc r8, __zero_reg__\n"
-
939  "lsl r8\n"
-
940  "rol r9\n"
-
941  "rol r10\n"
-
942  "rol r11\n"
-
943  "rol r12\n"
-
944  "rol r13\n"
-
945  "rol r14\n"
-
946  "rol r15\n"
-
947  "adc r8, __zero_reg__\n"
-
948  "st X+,r14\n"
-
949  "st X+,r15\n"
-
950  "st X+,r8\n"
-
951  "st X+,r9\n"
-
952  "st X+,r10\n"
-
953  "st X+,r11\n"
-
954  "st X+,r12\n"
-
955  "st X+,r13\n"
-
956 
-
957  // B[2][1] = leftRotate6_64(A[1][2])
-
958  "adiw r26,32\n"
-
959  "ldd r8,Z+16\n"
-
960  "ldd r9,Z+17\n"
-
961  "ldd r10,Z+18\n"
-
962  "ldd r11,Z+19\n"
-
963  "ldd r12,Z+20\n"
-
964  "ldd r13,Z+21\n"
-
965  "ldd r14,Z+22\n"
-
966  "ldd r15,Z+23\n"
-
967  "bst r8,0\n"
-
968  "ror r15\n"
-
969  "ror r14\n"
-
970  "ror r13\n"
-
971  "ror r12\n"
-
972  "ror r11\n"
-
973  "ror r10\n"
-
974  "ror r9\n"
-
975  "ror r8\n"
-
976  "bld r15,7\n"
-
977  "bst r8,0\n"
-
978  "ror r15\n"
-
979  "ror r14\n"
-
980  "ror r13\n"
-
981  "ror r12\n"
-
982  "ror r11\n"
-
983  "ror r10\n"
-
984  "ror r9\n"
-
985  "ror r8\n"
-
986  "bld r15,7\n"
-
987  "st X+,r15\n"
-
988  "st X+,r8\n"
-
989  "st X+,r9\n"
-
990  "st X+,r10\n"
-
991  "st X+,r11\n"
-
992  "st X+,r12\n"
-
993  "st X+,r13\n"
-
994  "st X+,r14\n"
-
995 
-
996  // B[3][1] = leftRotate36_64(A[1][0])
-
997  "adiw r26,32\n"
-
998  "ld r8,Z\n"
-
999  "ldd r9,Z+1\n"
-
1000  "ldd r10,Z+2\n"
-
1001  "ldd r11,Z+3\n"
-
1002  "ldd r12,Z+4\n"
-
1003  "ldd r13,Z+5\n"
-
1004  "ldd r14,Z+6\n"
-
1005  "ldd r15,Z+7\n"
-
1006  "lsl r8\n"
-
1007  "rol r9\n"
-
1008  "rol r10\n"
-
1009  "rol r11\n"
-
1010  "rol r12\n"
-
1011  "rol r13\n"
-
1012  "rol r14\n"
-
1013  "rol r15\n"
-
1014  "adc r8, __zero_reg__\n"
-
1015  "lsl r8\n"
-
1016  "rol r9\n"
-
1017  "rol r10\n"
-
1018  "rol r11\n"
-
1019  "rol r12\n"
-
1020  "rol r13\n"
-
1021  "rol r14\n"
-
1022  "rol r15\n"
-
1023  "adc r8, __zero_reg__\n"
-
1024  "lsl r8\n"
-
1025  "rol r9\n"
-
1026  "rol r10\n"
-
1027  "rol r11\n"
-
1028  "rol r12\n"
-
1029  "rol r13\n"
-
1030  "rol r14\n"
-
1031  "rol r15\n"
-
1032  "adc r8, __zero_reg__\n"
-
1033  "lsl r8\n"
-
1034  "rol r9\n"
-
1035  "rol r10\n"
-
1036  "rol r11\n"
-
1037  "rol r12\n"
-
1038  "rol r13\n"
-
1039  "rol r14\n"
-
1040  "rol r15\n"
-
1041  "adc r8, __zero_reg__\n"
+
726 
+
727  // B[1][0] = leftRotate28_64(A[0][3])
+
728  "adiw r26,32\n"
+
729  "ldd r8,Z+24\n"
+
730  "ldd r9,Z+25\n"
+
731  "ldd r10,Z+26\n"
+
732  "ldd r11,Z+27\n"
+
733  "ldd r12,Z+28\n"
+
734  "ldd r13,Z+29\n"
+
735  "ldd r14,Z+30\n"
+
736  "ldd r15,Z+31\n"
+
737  "lsl r8\n"
+
738  "rol r9\n"
+
739  "rol r10\n"
+
740  "rol r11\n"
+
741  "rol r12\n"
+
742  "rol r13\n"
+
743  "rol r14\n"
+
744  "rol r15\n"
+
745  "adc r8, __zero_reg__\n"
+
746  "lsl r8\n"
+
747  "rol r9\n"
+
748  "rol r10\n"
+
749  "rol r11\n"
+
750  "rol r12\n"
+
751  "rol r13\n"
+
752  "rol r14\n"
+
753  "rol r15\n"
+
754  "adc r8, __zero_reg__\n"
+
755  "lsl r8\n"
+
756  "rol r9\n"
+
757  "rol r10\n"
+
758  "rol r11\n"
+
759  "rol r12\n"
+
760  "rol r13\n"
+
761  "rol r14\n"
+
762  "rol r15\n"
+
763  "adc r8, __zero_reg__\n"
+
764  "lsl r8\n"
+
765  "rol r9\n"
+
766  "rol r10\n"
+
767  "rol r11\n"
+
768  "rol r12\n"
+
769  "rol r13\n"
+
770  "rol r14\n"
+
771  "rol r15\n"
+
772  "adc r8, __zero_reg__\n"
+
773  "st X+,r13\n"
+
774  "st X+,r14\n"
+
775  "st X+,r15\n"
+
776  "st X+,r8\n"
+
777  "st X+,r9\n"
+
778  "st X+,r10\n"
+
779  "st X+,r11\n"
+
780  "st X+,r12\n"
+
781 
+
782  // B[2][0] = leftRotate1_64(A[0][1])
+
783  "adiw r26,32\n"
+
784  "ldd r8,Z+8\n"
+
785  "ldd r9,Z+9\n"
+
786  "ldd r10,Z+10\n"
+
787  "ldd r11,Z+11\n"
+
788  "ldd r12,Z+12\n"
+
789  "ldd r13,Z+13\n"
+
790  "ldd r14,Z+14\n"
+
791  "ldd r15,Z+15\n"
+
792  "lsl r8\n"
+
793  "rol r9\n"
+
794  "rol r10\n"
+
795  "rol r11\n"
+
796  "rol r12\n"
+
797  "rol r13\n"
+
798  "rol r14\n"
+
799  "rol r15\n"
+
800  "adc r8, __zero_reg__\n"
+
801  "st X+,r8\n"
+
802  "st X+,r9\n"
+
803  "st X+,r10\n"
+
804  "st X+,r11\n"
+
805  "st X+,r12\n"
+
806  "st X+,r13\n"
+
807  "st X+,r14\n"
+
808  "st X+,r15\n"
+
809 
+
810  // B[3][0] = leftRotate27_64(A[0][4])
+
811  "adiw r26,32\n"
+
812  "ldd r8,Z+32\n"
+
813  "ldd r9,Z+33\n"
+
814  "ldd r10,Z+34\n"
+
815  "ldd r11,Z+35\n"
+
816  "ldd r12,Z+36\n"
+
817  "ldd r13,Z+37\n"
+
818  "ldd r14,Z+38\n"
+
819  "ldd r15,Z+39\n"
+
820  "lsl r8\n"
+
821  "rol r9\n"
+
822  "rol r10\n"
+
823  "rol r11\n"
+
824  "rol r12\n"
+
825  "rol r13\n"
+
826  "rol r14\n"
+
827  "rol r15\n"
+
828  "adc r8, __zero_reg__\n"
+
829  "lsl r8\n"
+
830  "rol r9\n"
+
831  "rol r10\n"
+
832  "rol r11\n"
+
833  "rol r12\n"
+
834  "rol r13\n"
+
835  "rol r14\n"
+
836  "rol r15\n"
+
837  "adc r8, __zero_reg__\n"
+
838  "lsl r8\n"
+
839  "rol r9\n"
+
840  "rol r10\n"
+
841  "rol r11\n"
+
842  "rol r12\n"
+
843  "rol r13\n"
+
844  "rol r14\n"
+
845  "rol r15\n"
+
846  "adc r8, __zero_reg__\n"
+
847  "st X+,r13\n"
+
848  "st X+,r14\n"
+
849  "st X+,r15\n"
+
850  "st X+,r8\n"
+
851  "st X+,r9\n"
+
852  "st X+,r10\n"
+
853  "st X+,r11\n"
+
854  "st X+,r12\n"
+
855 
+
856  // B[4][0] = leftRotate62_64(A[0][2])
+
857  "adiw r26,32\n"
+
858  "ldd r8,Z+16\n"
+
859  "ldd r9,Z+17\n"
+
860  "ldd r10,Z+18\n"
+
861  "ldd r11,Z+19\n"
+
862  "ldd r12,Z+20\n"
+
863  "ldd r13,Z+21\n"
+
864  "ldd r14,Z+22\n"
+
865  "ldd r15,Z+23\n"
+
866  "bst r8,0\n"
+
867  "ror r15\n"
+
868  "ror r14\n"
+
869  "ror r13\n"
+
870  "ror r12\n"
+
871  "ror r11\n"
+
872  "ror r10\n"
+
873  "ror r9\n"
+
874  "ror r8\n"
+
875  "bld r15,7\n"
+
876  "bst r8,0\n"
+
877  "ror r15\n"
+
878  "ror r14\n"
+
879  "ror r13\n"
+
880  "ror r12\n"
+
881  "ror r11\n"
+
882  "ror r10\n"
+
883  "ror r9\n"
+
884  "ror r8\n"
+
885  "bld r15,7\n"
+
886  "st X+,r8\n"
+
887  "st X+,r9\n"
+
888  "st X+,r10\n"
+
889  "st X+,r11\n"
+
890  "st X+,r12\n"
+
891  "st X+,r13\n"
+
892  "st X+,r14\n"
+
893  "st X+,r15\n"
+
894 
+
895  // B[0][1] = leftRotate44_64(A[1][1])
+
896  "subi r26,160\n"
+
897  "sbc r27,__zero_reg__\n"
+
898  "adiw r30,40\n"
+
899  "ldd r8,Z+8\n"
+
900  "ldd r9,Z+9\n"
+
901  "ldd r10,Z+10\n"
+
902  "ldd r11,Z+11\n"
+
903  "ldd r12,Z+12\n"
+
904  "ldd r13,Z+13\n"
+
905  "ldd r14,Z+14\n"
+
906  "ldd r15,Z+15\n"
+
907  "lsl r8\n"
+
908  "rol r9\n"
+
909  "rol r10\n"
+
910  "rol r11\n"
+
911  "rol r12\n"
+
912  "rol r13\n"
+
913  "rol r14\n"
+
914  "rol r15\n"
+
915  "adc r8, __zero_reg__\n"
+
916  "lsl r8\n"
+
917  "rol r9\n"
+
918  "rol r10\n"
+
919  "rol r11\n"
+
920  "rol r12\n"
+
921  "rol r13\n"
+
922  "rol r14\n"
+
923  "rol r15\n"
+
924  "adc r8, __zero_reg__\n"
+
925  "lsl r8\n"
+
926  "rol r9\n"
+
927  "rol r10\n"
+
928  "rol r11\n"
+
929  "rol r12\n"
+
930  "rol r13\n"
+
931  "rol r14\n"
+
932  "rol r15\n"
+
933  "adc r8, __zero_reg__\n"
+
934  "lsl r8\n"
+
935  "rol r9\n"
+
936  "rol r10\n"
+
937  "rol r11\n"
+
938  "rol r12\n"
+
939  "rol r13\n"
+
940  "rol r14\n"
+
941  "rol r15\n"
+
942  "adc r8, __zero_reg__\n"
+
943  "st X+,r11\n"
+
944  "st X+,r12\n"
+
945  "st X+,r13\n"
+
946  "st X+,r14\n"
+
947  "st X+,r15\n"
+
948  "st X+,r8\n"
+
949  "st X+,r9\n"
+
950  "st X+,r10\n"
+
951 
+
952  // B[1][1] = leftRotate20_64(A[1][4])
+
953  "adiw r26,32\n"
+
954  "ldd r8,Z+32\n"
+
955  "ldd r9,Z+33\n"
+
956  "ldd r10,Z+34\n"
+
957  "ldd r11,Z+35\n"
+
958  "ldd r12,Z+36\n"
+
959  "ldd r13,Z+37\n"
+
960  "ldd r14,Z+38\n"
+
961  "ldd r15,Z+39\n"
+
962  "lsl r8\n"
+
963  "rol r9\n"
+
964  "rol r10\n"
+
965  "rol r11\n"
+
966  "rol r12\n"
+
967  "rol r13\n"
+
968  "rol r14\n"
+
969  "rol r15\n"
+
970  "adc r8, __zero_reg__\n"
+
971  "lsl r8\n"
+
972  "rol r9\n"
+
973  "rol r10\n"
+
974  "rol r11\n"
+
975  "rol r12\n"
+
976  "rol r13\n"
+
977  "rol r14\n"
+
978  "rol r15\n"
+
979  "adc r8, __zero_reg__\n"
+
980  "lsl r8\n"
+
981  "rol r9\n"
+
982  "rol r10\n"
+
983  "rol r11\n"
+
984  "rol r12\n"
+
985  "rol r13\n"
+
986  "rol r14\n"
+
987  "rol r15\n"
+
988  "adc r8, __zero_reg__\n"
+
989  "lsl r8\n"
+
990  "rol r9\n"
+
991  "rol r10\n"
+
992  "rol r11\n"
+
993  "rol r12\n"
+
994  "rol r13\n"
+
995  "rol r14\n"
+
996  "rol r15\n"
+
997  "adc r8, __zero_reg__\n"
+
998  "st X+,r14\n"
+
999  "st X+,r15\n"
+
1000  "st X+,r8\n"
+
1001  "st X+,r9\n"
+
1002  "st X+,r10\n"
+
1003  "st X+,r11\n"
+
1004  "st X+,r12\n"
+
1005  "st X+,r13\n"
+
1006 
+
1007  // B[2][1] = leftRotate6_64(A[1][2])
+
1008  "adiw r26,32\n"
+
1009  "ldd r8,Z+16\n"
+
1010  "ldd r9,Z+17\n"
+
1011  "ldd r10,Z+18\n"
+
1012  "ldd r11,Z+19\n"
+
1013  "ldd r12,Z+20\n"
+
1014  "ldd r13,Z+21\n"
+
1015  "ldd r14,Z+22\n"
+
1016  "ldd r15,Z+23\n"
+
1017  "bst r8,0\n"
+
1018  "ror r15\n"
+
1019  "ror r14\n"
+
1020  "ror r13\n"
+
1021  "ror r12\n"
+
1022  "ror r11\n"
+
1023  "ror r10\n"
+
1024  "ror r9\n"
+
1025  "ror r8\n"
+
1026  "bld r15,7\n"
+
1027  "bst r8,0\n"
+
1028  "ror r15\n"
+
1029  "ror r14\n"
+
1030  "ror r13\n"
+
1031  "ror r12\n"
+
1032  "ror r11\n"
+
1033  "ror r10\n"
+
1034  "ror r9\n"
+
1035  "ror r8\n"
+
1036  "bld r15,7\n"
+
1037  "st X+,r15\n"
+
1038  "st X+,r8\n"
+
1039  "st X+,r9\n"
+
1040  "st X+,r10\n"
+
1041  "st X+,r11\n"
1042  "st X+,r12\n"
1043  "st X+,r13\n"
1044  "st X+,r14\n"
-
1045  "st X+,r15\n"
-
1046  "st X+,r8\n"
-
1047  "st X+,r9\n"
-
1048  "st X+,r10\n"
-
1049  "st X+,r11\n"
-
1050 
-
1051  // B[4][1] = leftRotate55_64(A[1][3])
-
1052  "adiw r26,32\n"
-
1053  "ldd r8,Z+24\n"
-
1054  "ldd r9,Z+25\n"
-
1055  "ldd r10,Z+26\n"
-
1056  "ldd r11,Z+27\n"
-
1057  "ldd r12,Z+28\n"
-
1058  "ldd r13,Z+29\n"
-
1059  "ldd r14,Z+30\n"
-
1060  "ldd r15,Z+31\n"
-
1061  "bst r8,0\n"
-
1062  "ror r15\n"
-
1063  "ror r14\n"
-
1064  "ror r13\n"
-
1065  "ror r12\n"
-
1066  "ror r11\n"
-
1067  "ror r10\n"
-
1068  "ror r9\n"
-
1069  "ror r8\n"
-
1070  "bld r15,7\n"
-
1071  "st X+,r9\n"
-
1072  "st X+,r10\n"
-
1073  "st X+,r11\n"
-
1074  "st X+,r12\n"
-
1075  "st X+,r13\n"
-
1076  "st X+,r14\n"
-
1077  "st X+,r15\n"
-
1078  "st X+,r8\n"
-
1079 
-
1080  // B[0][2] = leftRotate43_64(A[2][2])
-
1081  "subi r26,160\n"
-
1082  "sbc r27,__zero_reg__\n"
-
1083  "adiw r30,40\n"
-
1084  "ldd r8,Z+16\n"
-
1085  "ldd r9,Z+17\n"
-
1086  "ldd r10,Z+18\n"
-
1087  "ldd r11,Z+19\n"
-
1088  "ldd r12,Z+20\n"
-
1089  "ldd r13,Z+21\n"
-
1090  "ldd r14,Z+22\n"
-
1091  "ldd r15,Z+23\n"
-
1092  "lsl r8\n"
-
1093  "rol r9\n"
-
1094  "rol r10\n"
-
1095  "rol r11\n"
-
1096  "rol r12\n"
-
1097  "rol r13\n"
-
1098  "rol r14\n"
-
1099  "rol r15\n"
-
1100  "adc r8, __zero_reg__\n"
-
1101  "lsl r8\n"
-
1102  "rol r9\n"
-
1103  "rol r10\n"
-
1104  "rol r11\n"
-
1105  "rol r12\n"
-
1106  "rol r13\n"
-
1107  "rol r14\n"
-
1108  "rol r15\n"
-
1109  "adc r8, __zero_reg__\n"
-
1110  "lsl r8\n"
-
1111  "rol r9\n"
-
1112  "rol r10\n"
-
1113  "rol r11\n"
-
1114  "rol r12\n"
-
1115  "rol r13\n"
-
1116  "rol r14\n"
-
1117  "rol r15\n"
-
1118  "adc r8, __zero_reg__\n"
-
1119  "st X+,r11\n"
-
1120  "st X+,r12\n"
-
1121  "st X+,r13\n"
-
1122  "st X+,r14\n"
-
1123  "st X+,r15\n"
-
1124  "st X+,r8\n"
-
1125  "st X+,r9\n"
-
1126  "st X+,r10\n"
-
1127 
-
1128  // B[1][2] = leftRotate3_64(A[2][0])
-
1129  "adiw r26,32\n"
-
1130  "ld r8,Z\n"
-
1131  "ldd r9,Z+1\n"
-
1132  "ldd r10,Z+2\n"
-
1133  "ldd r11,Z+3\n"
-
1134  "ldd r12,Z+4\n"
-
1135  "ldd r13,Z+5\n"
-
1136  "ldd r14,Z+6\n"
-
1137  "ldd r15,Z+7\n"
-
1138  "lsl r8\n"
-
1139  "rol r9\n"
-
1140  "rol r10\n"
-
1141  "rol r11\n"
-
1142  "rol r12\n"
-
1143  "rol r13\n"
-
1144  "rol r14\n"
-
1145  "rol r15\n"
-
1146  "adc r8, __zero_reg__\n"
-
1147  "lsl r8\n"
-
1148  "rol r9\n"
-
1149  "rol r10\n"
-
1150  "rol r11\n"
-
1151  "rol r12\n"
-
1152  "rol r13\n"
-
1153  "rol r14\n"
-
1154  "rol r15\n"
-
1155  "adc r8, __zero_reg__\n"
-
1156  "lsl r8\n"
-
1157  "rol r9\n"
-
1158  "rol r10\n"
-
1159  "rol r11\n"
-
1160  "rol r12\n"
-
1161  "rol r13\n"
-
1162  "rol r14\n"
-
1163  "rol r15\n"
-
1164  "adc r8, __zero_reg__\n"
-
1165  "st X+,r8\n"
-
1166  "st X+,r9\n"
-
1167  "st X+,r10\n"
-
1168  "st X+,r11\n"
-
1169  "st X+,r12\n"
-
1170  "st X+,r13\n"
-
1171  "st X+,r14\n"
-
1172  "st X+,r15\n"
-
1173 
-
1174  // B[2][2] = leftRotate25_64(A[2][3])
-
1175  "adiw r26,32\n"
-
1176  "ldd r8,Z+24\n"
-
1177  "ldd r9,Z+25\n"
-
1178  "ldd r10,Z+26\n"
-
1179  "ldd r11,Z+27\n"
-
1180  "ldd r12,Z+28\n"
-
1181  "ldd r13,Z+29\n"
-
1182  "ldd r14,Z+30\n"
-
1183  "ldd r15,Z+31\n"
-
1184  "lsl r8\n"
-
1185  "rol r9\n"
-
1186  "rol r10\n"
-
1187  "rol r11\n"
-
1188  "rol r12\n"
-
1189  "rol r13\n"
-
1190  "rol r14\n"
-
1191  "rol r15\n"
-
1192  "adc r8, __zero_reg__\n"
-
1193  "st X+,r13\n"
-
1194  "st X+,r14\n"
-
1195  "st X+,r15\n"
-
1196  "st X+,r8\n"
-
1197  "st X+,r9\n"
-
1198  "st X+,r10\n"
-
1199  "st X+,r11\n"
-
1200  "st X+,r12\n"
-
1201 
-
1202  // B[3][2] = leftRotate10_64(A[2][1])
-
1203  "adiw r26,32\n"
-
1204  "ldd r8,Z+8\n"
-
1205  "ldd r9,Z+9\n"
-
1206  "ldd r10,Z+10\n"
-
1207  "ldd r11,Z+11\n"
-
1208  "ldd r12,Z+12\n"
-
1209  "ldd r13,Z+13\n"
-
1210  "ldd r14,Z+14\n"
-
1211  "ldd r15,Z+15\n"
-
1212  "lsl r8\n"
-
1213  "rol r9\n"
-
1214  "rol r10\n"
-
1215  "rol r11\n"
-
1216  "rol r12\n"
-
1217  "rol r13\n"
-
1218  "rol r14\n"
-
1219  "rol r15\n"
-
1220  "adc r8, __zero_reg__\n"
-
1221  "lsl r8\n"
-
1222  "rol r9\n"
-
1223  "rol r10\n"
-
1224  "rol r11\n"
-
1225  "rol r12\n"
-
1226  "rol r13\n"
-
1227  "rol r14\n"
-
1228  "rol r15\n"
-
1229  "adc r8, __zero_reg__\n"
-
1230  "st X+,r15\n"
-
1231  "st X+,r8\n"
-
1232  "st X+,r9\n"
-
1233  "st X+,r10\n"
-
1234  "st X+,r11\n"
-
1235  "st X+,r12\n"
-
1236  "st X+,r13\n"
-
1237  "st X+,r14\n"
-
1238 
-
1239  // B[4][2] = leftRotate39_64(A[2][4])
-
1240  "adiw r26,32\n"
-
1241  "ldd r8,Z+32\n"
-
1242  "ldd r9,Z+33\n"
-
1243  "ldd r10,Z+34\n"
-
1244  "ldd r11,Z+35\n"
-
1245  "ldd r12,Z+36\n"
-
1246  "ldd r13,Z+37\n"
-
1247  "ldd r14,Z+38\n"
-
1248  "ldd r15,Z+39\n"
-
1249  "bst r8,0\n"
-
1250  "ror r15\n"
-
1251  "ror r14\n"
-
1252  "ror r13\n"
-
1253  "ror r12\n"
-
1254  "ror r11\n"
-
1255  "ror r10\n"
-
1256  "ror r9\n"
-
1257  "ror r8\n"
-
1258  "bld r15,7\n"
-
1259  "st X+,r11\n"
-
1260  "st X+,r12\n"
-
1261  "st X+,r13\n"
-
1262  "st X+,r14\n"
-
1263  "st X+,r15\n"
-
1264  "st X+,r8\n"
-
1265  "st X+,r9\n"
-
1266  "st X+,r10\n"
-
1267 
-
1268  // B[0][3] = leftRotate21_64(A[3][3])
-
1269  "subi r26,160\n"
-
1270  "sbc r27,__zero_reg__\n"
-
1271  "adiw r30,40\n"
-
1272  "ldd r8,Z+24\n"
-
1273  "ldd r9,Z+25\n"
-
1274  "ldd r10,Z+26\n"
-
1275  "ldd r11,Z+27\n"
-
1276  "ldd r12,Z+28\n"
-
1277  "ldd r13,Z+29\n"
-
1278  "ldd r14,Z+30\n"
-
1279  "ldd r15,Z+31\n"
-
1280  "bst r8,0\n"
-
1281  "ror r15\n"
-
1282  "ror r14\n"
-
1283  "ror r13\n"
-
1284  "ror r12\n"
-
1285  "ror r11\n"
-
1286  "ror r10\n"
-
1287  "ror r9\n"
-
1288  "ror r8\n"
-
1289  "bld r15,7\n"
-
1290  "bst r8,0\n"
-
1291  "ror r15\n"
-
1292  "ror r14\n"
-
1293  "ror r13\n"
-
1294  "ror r12\n"
-
1295  "ror r11\n"
-
1296  "ror r10\n"
-
1297  "ror r9\n"
-
1298  "ror r8\n"
-
1299  "bld r15,7\n"
-
1300  "bst r8,0\n"
-
1301  "ror r15\n"
-
1302  "ror r14\n"
-
1303  "ror r13\n"
-
1304  "ror r12\n"
-
1305  "ror r11\n"
-
1306  "ror r10\n"
-
1307  "ror r9\n"
-
1308  "ror r8\n"
-
1309  "bld r15,7\n"
-
1310  "st X+,r13\n"
-
1311  "st X+,r14\n"
-
1312  "st X+,r15\n"
-
1313  "st X+,r8\n"
-
1314  "st X+,r9\n"
-
1315  "st X+,r10\n"
-
1316  "st X+,r11\n"
-
1317  "st X+,r12\n"
-
1318 
-
1319  // B[1][3] = leftRotate45_64(A[3][1])
-
1320  "adiw r26,32\n"
-
1321  "ldd r8,Z+8\n"
-
1322  "ldd r9,Z+9\n"
-
1323  "ldd r10,Z+10\n"
-
1324  "ldd r11,Z+11\n"
-
1325  "ldd r12,Z+12\n"
-
1326  "ldd r13,Z+13\n"
-
1327  "ldd r14,Z+14\n"
-
1328  "ldd r15,Z+15\n"
-
1329  "bst r8,0\n"
-
1330  "ror r15\n"
-
1331  "ror r14\n"
-
1332  "ror r13\n"
-
1333  "ror r12\n"
-
1334  "ror r11\n"
-
1335  "ror r10\n"
-
1336  "ror r9\n"
-
1337  "ror r8\n"
-
1338  "bld r15,7\n"
-
1339  "bst r8,0\n"
-
1340  "ror r15\n"
-
1341  "ror r14\n"
-
1342  "ror r13\n"
-
1343  "ror r12\n"
-
1344  "ror r11\n"
-
1345  "ror r10\n"
-
1346  "ror r9\n"
-
1347  "ror r8\n"
-
1348  "bld r15,7\n"
-
1349  "bst r8,0\n"
-
1350  "ror r15\n"
-
1351  "ror r14\n"
-
1352  "ror r13\n"
-
1353  "ror r12\n"
-
1354  "ror r11\n"
-
1355  "ror r10\n"
-
1356  "ror r9\n"
-
1357  "ror r8\n"
-
1358  "bld r15,7\n"
-
1359  "st X+,r10\n"
-
1360  "st X+,r11\n"
-
1361  "st X+,r12\n"
-
1362  "st X+,r13\n"
-
1363  "st X+,r14\n"
-
1364  "st X+,r15\n"
-
1365  "st X+,r8\n"
-
1366  "st X+,r9\n"
-
1367 
-
1368  // B[2][3] = leftRotate8_64(A[3][4])
-
1369  "adiw r26,32\n"
-
1370  "ldd r8,Z+32\n"
-
1371  "ldd r9,Z+33\n"
-
1372  "ldd r10,Z+34\n"
-
1373  "ldd r11,Z+35\n"
-
1374  "ldd r12,Z+36\n"
-
1375  "ldd r13,Z+37\n"
-
1376  "ldd r14,Z+38\n"
-
1377  "ldd r15,Z+39\n"
-
1378  "st X+,r15\n"
-
1379  "st X+,r8\n"
-
1380  "st X+,r9\n"
-
1381  "st X+,r10\n"
-
1382  "st X+,r11\n"
-
1383  "st X+,r12\n"
-
1384  "st X+,r13\n"
-
1385  "st X+,r14\n"
-
1386 
-
1387  // B[3][3] = leftRotate15_64(A[3][2])
-
1388  "adiw r26,32\n"
-
1389  "ldd r8,Z+16\n"
-
1390  "ldd r9,Z+17\n"
-
1391  "ldd r10,Z+18\n"
-
1392  "ldd r11,Z+19\n"
-
1393  "ldd r12,Z+20\n"
-
1394  "ldd r13,Z+21\n"
-
1395  "ldd r14,Z+22\n"
-
1396  "ldd r15,Z+23\n"
-
1397  "bst r8,0\n"
-
1398  "ror r15\n"
-
1399  "ror r14\n"
-
1400  "ror r13\n"
-
1401  "ror r12\n"
-
1402  "ror r11\n"
-
1403  "ror r10\n"
-
1404  "ror r9\n"
-
1405  "ror r8\n"
-
1406  "bld r15,7\n"
-
1407  "st X+,r14\n"
-
1408  "st X+,r15\n"
-
1409  "st X+,r8\n"
-
1410  "st X+,r9\n"
-
1411  "st X+,r10\n"
-
1412  "st X+,r11\n"
-
1413  "st X+,r12\n"
-
1414  "st X+,r13\n"
-
1415 
-
1416  // B[4][3] = leftRotate41_64(A[3][0])
-
1417  "adiw r26,32\n"
-
1418  "ld r8,Z\n"
-
1419  "ldd r9,Z+1\n"
-
1420  "ldd r10,Z+2\n"
-
1421  "ldd r11,Z+3\n"
-
1422  "ldd r12,Z+4\n"
-
1423  "ldd r13,Z+5\n"
-
1424  "ldd r14,Z+6\n"
-
1425  "ldd r15,Z+7\n"
-
1426  "lsl r8\n"
-
1427  "rol r9\n"
-
1428  "rol r10\n"
-
1429  "rol r11\n"
-
1430  "rol r12\n"
-
1431  "rol r13\n"
-
1432  "rol r14\n"
-
1433  "rol r15\n"
-
1434  "adc r8, __zero_reg__\n"
-
1435  "st X+,r11\n"
-
1436  "st X+,r12\n"
-
1437  "st X+,r13\n"
-
1438  "st X+,r14\n"
-
1439  "st X+,r15\n"
-
1440  "st X+,r8\n"
-
1441  "st X+,r9\n"
-
1442  "st X+,r10\n"
-
1443 
-
1444  // B[0][4] = leftRotate14_64(A[4][4])
-
1445  "subi r26,160\n"
-
1446  "sbc r27,__zero_reg__\n"
-
1447  "adiw r30,40\n"
-
1448  "ldd r8,Z+32\n"
-
1449  "ldd r9,Z+33\n"
-
1450  "ldd r10,Z+34\n"
-
1451  "ldd r11,Z+35\n"
-
1452  "ldd r12,Z+36\n"
-
1453  "ldd r13,Z+37\n"
-
1454  "ldd r14,Z+38\n"
-
1455  "ldd r15,Z+39\n"
-
1456  "bst r8,0\n"
-
1457  "ror r15\n"
-
1458  "ror r14\n"
-
1459  "ror r13\n"
-
1460  "ror r12\n"
-
1461  "ror r11\n"
-
1462  "ror r10\n"
-
1463  "ror r9\n"
-
1464  "ror r8\n"
-
1465  "bld r15,7\n"
-
1466  "bst r8,0\n"
-
1467  "ror r15\n"
-
1468  "ror r14\n"
-
1469  "ror r13\n"
-
1470  "ror r12\n"
-
1471  "ror r11\n"
-
1472  "ror r10\n"
-
1473  "ror r9\n"
-
1474  "ror r8\n"
-
1475  "bld r15,7\n"
-
1476  "st X+,r14\n"
-
1477  "st X+,r15\n"
-
1478  "st X+,r8\n"
-
1479  "st X+,r9\n"
-
1480  "st X+,r10\n"
-
1481  "st X+,r11\n"
-
1482  "st X+,r12\n"
-
1483  "st X+,r13\n"
-
1484 
-
1485  // B[1][4] = leftRotate61_64(A[4][2])
-
1486  "adiw r26,32\n"
-
1487  "ldd r8,Z+16\n"
-
1488  "ldd r9,Z+17\n"
-
1489  "ldd r10,Z+18\n"
-
1490  "ldd r11,Z+19\n"
-
1491  "ldd r12,Z+20\n"
-
1492  "ldd r13,Z+21\n"
-
1493  "ldd r14,Z+22\n"
-
1494  "ldd r15,Z+23\n"
-
1495  "bst r8,0\n"
-
1496  "ror r15\n"
-
1497  "ror r14\n"
-
1498  "ror r13\n"
-
1499  "ror r12\n"
-
1500  "ror r11\n"
-
1501  "ror r10\n"
-
1502  "ror r9\n"
-
1503  "ror r8\n"
-
1504  "bld r15,7\n"
-
1505  "bst r8,0\n"
-
1506  "ror r15\n"
-
1507  "ror r14\n"
-
1508  "ror r13\n"
-
1509  "ror r12\n"
-
1510  "ror r11\n"
-
1511  "ror r10\n"
-
1512  "ror r9\n"
-
1513  "ror r8\n"
-
1514  "bld r15,7\n"
-
1515  "bst r8,0\n"
-
1516  "ror r15\n"
-
1517  "ror r14\n"
-
1518  "ror r13\n"
-
1519  "ror r12\n"
-
1520  "ror r11\n"
-
1521  "ror r10\n"
-
1522  "ror r9\n"
-
1523  "ror r8\n"
-
1524  "bld r15,7\n"
-
1525  "st X+,r8\n"
-
1526  "st X+,r9\n"
-
1527  "st X+,r10\n"
-
1528  "st X+,r11\n"
-
1529  "st X+,r12\n"
-
1530  "st X+,r13\n"
-
1531  "st X+,r14\n"
-
1532  "st X+,r15\n"
-
1533 
-
1534  // B[2][4] = leftRotate18_64(A[4][0])
-
1535  "adiw r26,32\n"
-
1536  "ld r8,Z\n"
-
1537  "ldd r9,Z+1\n"
-
1538  "ldd r10,Z+2\n"
-
1539  "ldd r11,Z+3\n"
-
1540  "ldd r12,Z+4\n"
-
1541  "ldd r13,Z+5\n"
-
1542  "ldd r14,Z+6\n"
-
1543  "ldd r15,Z+7\n"
-
1544  "lsl r8\n"
-
1545  "rol r9\n"
-
1546  "rol r10\n"
-
1547  "rol r11\n"
-
1548  "rol r12\n"
-
1549  "rol r13\n"
-
1550  "rol r14\n"
-
1551  "rol r15\n"
-
1552  "adc r8, __zero_reg__\n"
-
1553  "lsl r8\n"
-
1554  "rol r9\n"
-
1555  "rol r10\n"
-
1556  "rol r11\n"
-
1557  "rol r12\n"
-
1558  "rol r13\n"
-
1559  "rol r14\n"
-
1560  "rol r15\n"
-
1561  "adc r8, __zero_reg__\n"
-
1562  "st X+,r14\n"
-
1563  "st X+,r15\n"
-
1564  "st X+,r8\n"
-
1565  "st X+,r9\n"
-
1566  "st X+,r10\n"
-
1567  "st X+,r11\n"
-
1568  "st X+,r12\n"
-
1569  "st X+,r13\n"
-
1570 
-
1571  // B[3][4] = leftRotate56_64(A[4][3])
-
1572  "adiw r26,32\n"
-
1573  "ldd r8,Z+24\n"
-
1574  "ldd r9,Z+25\n"
-
1575  "ldd r10,Z+26\n"
-
1576  "ldd r11,Z+27\n"
-
1577  "ldd r12,Z+28\n"
-
1578  "ldd r13,Z+29\n"
-
1579  "ldd r14,Z+30\n"
-
1580  "ldd r15,Z+31\n"
-
1581  "st X+,r9\n"
-
1582  "st X+,r10\n"
-
1583  "st X+,r11\n"
-
1584  "st X+,r12\n"
-
1585  "st X+,r13\n"
-
1586  "st X+,r14\n"
-
1587  "st X+,r15\n"
-
1588  "st X+,r8\n"
-
1589 
-
1590  // B[4][4] = leftRotate2_64(A[4][1])
-
1591  "adiw r26,32\n"
-
1592  "ldd r8,Z+8\n"
-
1593  "ldd r9,Z+9\n"
-
1594  "ldd r10,Z+10\n"
-
1595  "ldd r11,Z+11\n"
-
1596  "ldd r12,Z+12\n"
-
1597  "ldd r13,Z+13\n"
-
1598  "ldd r14,Z+14\n"
-
1599  "ldd r15,Z+15\n"
-
1600  "lsl r8\n"
-
1601  "rol r9\n"
-
1602  "rol r10\n"
-
1603  "rol r11\n"
-
1604  "rol r12\n"
-
1605  "rol r13\n"
-
1606  "rol r14\n"
-
1607  "rol r15\n"
-
1608  "adc r8, __zero_reg__\n"
-
1609  "lsl r8\n"
-
1610  "rol r9\n"
-
1611  "rol r10\n"
-
1612  "rol r11\n"
-
1613  "rol r12\n"
-
1614  "rol r13\n"
-
1615  "rol r14\n"
-
1616  "rol r15\n"
-
1617  "adc r8, __zero_reg__\n"
-
1618  "st X+,r8\n"
-
1619  "st X+,r9\n"
-
1620  "st X+,r10\n"
-
1621  "st X+,r11\n"
-
1622  "st X+,r12\n"
-
1623  "st X+,r13\n"
-
1624  "st X+,r14\n"
-
1625  "st X+,r15\n"
-
1626  "subi r26,200\n"
-
1627  "sbc r27,__zero_reg__\n"
-
1628  "subi r30,160\n"
-
1629  "sbc r31,__zero_reg__\n"
-
1630 
-
1631  // Step mapping chi.
-
1632  "ldi r20,5\n"
-
1633  "50:\n"
-
1634  "ld r8,Y\n"
-
1635  "ldd r9,Y+8\n"
-
1636  "ldd r10,Y+16\n"
-
1637  "ldd r11,Y+24\n"
-
1638  "ldd r12,Y+32\n"
-
1639  "mov r13,r9\n"
-
1640  "com r13\n"
-
1641  "and r13,r10\n"
-
1642  "eor r13,r8\n"
-
1643  "mov r14,r10\n"
-
1644  "com r14\n"
-
1645  "and r14,r11\n"
-
1646  "eor r14,r9\n"
-
1647  "mov r15,r11\n"
-
1648  "com r15\n"
-
1649  "and r15,r12\n"
-
1650  "eor r15,r10\n"
-
1651  "mov r17,r12\n"
-
1652  "com r17\n"
-
1653  "and r17,r8\n"
-
1654  "eor r17,r11\n"
-
1655  "mov r16,r8\n"
-
1656  "com r16\n"
-
1657  "and r16,r9\n"
-
1658  "eor r16,r12\n"
-
1659  "st Z,r13\n"
-
1660  "std Z+8,r14\n"
-
1661  "std Z+16,r15\n"
-
1662  "std Z+24,r17\n"
-
1663  "std Z+32,r16\n"
-
1664  "ldd r8,Y+1\n"
-
1665  "ldd r9,Y+9\n"
-
1666  "ldd r10,Y+17\n"
-
1667  "ldd r11,Y+25\n"
-
1668  "ldd r12,Y+33\n"
-
1669  "mov r13,r9\n"
-
1670  "com r13\n"
-
1671  "and r13,r10\n"
-
1672  "eor r13,r8\n"
-
1673  "mov r14,r10\n"
-
1674  "com r14\n"
-
1675  "and r14,r11\n"
-
1676  "eor r14,r9\n"
-
1677  "mov r15,r11\n"
-
1678  "com r15\n"
-
1679  "and r15,r12\n"
-
1680  "eor r15,r10\n"
-
1681  "mov r17,r12\n"
-
1682  "com r17\n"
-
1683  "and r17,r8\n"
-
1684  "eor r17,r11\n"
-
1685  "mov r16,r8\n"
-
1686  "com r16\n"
-
1687  "and r16,r9\n"
-
1688  "eor r16,r12\n"
-
1689  "std Z+1,r13\n"
-
1690  "std Z+9,r14\n"
-
1691  "std Z+17,r15\n"
-
1692  "std Z+25,r17\n"
-
1693  "std Z+33,r16\n"
-
1694  "ldd r8,Y+2\n"
-
1695  "ldd r9,Y+10\n"
-
1696  "ldd r10,Y+18\n"
-
1697  "ldd r11,Y+26\n"
-
1698  "ldd r12,Y+34\n"
-
1699  "mov r13,r9\n"
-
1700  "com r13\n"
-
1701  "and r13,r10\n"
-
1702  "eor r13,r8\n"
-
1703  "mov r14,r10\n"
-
1704  "com r14\n"
-
1705  "and r14,r11\n"
-
1706  "eor r14,r9\n"
-
1707  "mov r15,r11\n"
-
1708  "com r15\n"
-
1709  "and r15,r12\n"
-
1710  "eor r15,r10\n"
-
1711  "mov r17,r12\n"
-
1712  "com r17\n"
-
1713  "and r17,r8\n"
-
1714  "eor r17,r11\n"
-
1715  "mov r16,r8\n"
-
1716  "com r16\n"
-
1717  "and r16,r9\n"
-
1718  "eor r16,r12\n"
-
1719  "std Z+2,r13\n"
-
1720  "std Z+10,r14\n"
-
1721  "std Z+18,r15\n"
-
1722  "std Z+26,r17\n"
-
1723  "std Z+34,r16\n"
-
1724  "ldd r8,Y+3\n"
-
1725  "ldd r9,Y+11\n"
-
1726  "ldd r10,Y+19\n"
-
1727  "ldd r11,Y+27\n"
-
1728  "ldd r12,Y+35\n"
-
1729  "mov r13,r9\n"
-
1730  "com r13\n"
-
1731  "and r13,r10\n"
-
1732  "eor r13,r8\n"
-
1733  "mov r14,r10\n"
-
1734  "com r14\n"
-
1735  "and r14,r11\n"
-
1736  "eor r14,r9\n"
-
1737  "mov r15,r11\n"
-
1738  "com r15\n"
-
1739  "and r15,r12\n"
-
1740  "eor r15,r10\n"
-
1741  "mov r17,r12\n"
-
1742  "com r17\n"
-
1743  "and r17,r8\n"
-
1744  "eor r17,r11\n"
-
1745  "mov r16,r8\n"
-
1746  "com r16\n"
-
1747  "and r16,r9\n"
-
1748  "eor r16,r12\n"
-
1749  "std Z+3,r13\n"
-
1750  "std Z+11,r14\n"
-
1751  "std Z+19,r15\n"
-
1752  "std Z+27,r17\n"
-
1753  "std Z+35,r16\n"
-
1754  "ldd r8,Y+4\n"
-
1755  "ldd r9,Y+12\n"
-
1756  "ldd r10,Y+20\n"
-
1757  "ldd r11,Y+28\n"
-
1758  "ldd r12,Y+36\n"
-
1759  "mov r13,r9\n"
-
1760  "com r13\n"
-
1761  "and r13,r10\n"
-
1762  "eor r13,r8\n"
-
1763  "mov r14,r10\n"
-
1764  "com r14\n"
-
1765  "and r14,r11\n"
-
1766  "eor r14,r9\n"
-
1767  "mov r15,r11\n"
-
1768  "com r15\n"
-
1769  "and r15,r12\n"
-
1770  "eor r15,r10\n"
-
1771  "mov r17,r12\n"
-
1772  "com r17\n"
-
1773  "and r17,r8\n"
-
1774  "eor r17,r11\n"
-
1775  "mov r16,r8\n"
-
1776  "com r16\n"
-
1777  "and r16,r9\n"
-
1778  "eor r16,r12\n"
-
1779  "std Z+4,r13\n"
-
1780  "std Z+12,r14\n"
-
1781  "std Z+20,r15\n"
-
1782  "std Z+28,r17\n"
-
1783  "std Z+36,r16\n"
-
1784  "ldd r8,Y+5\n"
-
1785  "ldd r9,Y+13\n"
-
1786  "ldd r10,Y+21\n"
-
1787  "ldd r11,Y+29\n"
-
1788  "ldd r12,Y+37\n"
-
1789  "mov r13,r9\n"
-
1790  "com r13\n"
-
1791  "and r13,r10\n"
-
1792  "eor r13,r8\n"
-
1793  "mov r14,r10\n"
-
1794  "com r14\n"
-
1795  "and r14,r11\n"
-
1796  "eor r14,r9\n"
-
1797  "mov r15,r11\n"
-
1798  "com r15\n"
-
1799  "and r15,r12\n"
-
1800  "eor r15,r10\n"
-
1801  "mov r17,r12\n"
-
1802  "com r17\n"
-
1803  "and r17,r8\n"
-
1804  "eor r17,r11\n"
-
1805  "mov r16,r8\n"
-
1806  "com r16\n"
-
1807  "and r16,r9\n"
-
1808  "eor r16,r12\n"
-
1809  "std Z+5,r13\n"
-
1810  "std Z+13,r14\n"
-
1811  "std Z+21,r15\n"
-
1812  "std Z+29,r17\n"
-
1813  "std Z+37,r16\n"
-
1814  "ldd r8,Y+6\n"
-
1815  "ldd r9,Y+14\n"
-
1816  "ldd r10,Y+22\n"
-
1817  "ldd r11,Y+30\n"
-
1818  "ldd r12,Y+38\n"
-
1819  "mov r13,r9\n"
-
1820  "com r13\n"
-
1821  "and r13,r10\n"
-
1822  "eor r13,r8\n"
-
1823  "mov r14,r10\n"
-
1824  "com r14\n"
-
1825  "and r14,r11\n"
-
1826  "eor r14,r9\n"
-
1827  "mov r15,r11\n"
-
1828  "com r15\n"
-
1829  "and r15,r12\n"
-
1830  "eor r15,r10\n"
-
1831  "mov r17,r12\n"
-
1832  "com r17\n"
-
1833  "and r17,r8\n"
-
1834  "eor r17,r11\n"
-
1835  "mov r16,r8\n"
-
1836  "com r16\n"
-
1837  "and r16,r9\n"
-
1838  "eor r16,r12\n"
-
1839  "std Z+6,r13\n"
-
1840  "std Z+14,r14\n"
-
1841  "std Z+22,r15\n"
-
1842  "std Z+30,r17\n"
-
1843  "std Z+38,r16\n"
-
1844  "ldd r8,Y+7\n"
-
1845  "ldd r9,Y+15\n"
-
1846  "ldd r10,Y+23\n"
-
1847  "ldd r11,Y+31\n"
-
1848  "ldd r12,Y+39\n"
-
1849  "mov r13,r9\n"
-
1850  "com r13\n"
-
1851  "and r13,r10\n"
-
1852  "eor r13,r8\n"
-
1853  "mov r14,r10\n"
-
1854  "com r14\n"
-
1855  "and r14,r11\n"
-
1856  "eor r14,r9\n"
-
1857  "mov r15,r11\n"
-
1858  "com r15\n"
-
1859  "and r15,r12\n"
-
1860  "eor r15,r10\n"
-
1861  "mov r17,r12\n"
-
1862  "com r17\n"
-
1863  "and r17,r8\n"
-
1864  "eor r17,r11\n"
-
1865  "mov r16,r8\n"
-
1866  "com r16\n"
-
1867  "and r16,r9\n"
-
1868  "eor r16,r12\n"
-
1869  "std Z+7,r13\n"
-
1870  "std Z+15,r14\n"
-
1871  "std Z+23,r15\n"
-
1872  "std Z+31,r17\n"
-
1873  "std Z+39,r16\n"
-
1874  "adiw r30,40\n"
-
1875  "adiw r28,40\n"
-
1876  "dec r20\n"
-
1877  "breq 51f\n"
-
1878  "rjmp 50b\n"
-
1879  "51:\n"
-
1880  "pop r28\n"
-
1881  "pop r29\n"
-
1882 
-
1883  // Done
-
1884  : : "x"(B), "z"(state.A)
-
1885  : "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
-
1886  "r16", "r17", "r18", "r19", "r20", "r21", "memory"
-
1887  );
-
1888 #else
-
1889  static const uint8_t addMod5Table[9] PROGMEM = {
-
1890  0, 1, 2, 3, 4, 0, 1, 2, 3
-
1891  };
-
1892  #define addMod5(x, y) (pgm_read_byte(&(addMod5Table[(x) + (y)])))
-
1893  uint64_t D;
-
1894  uint8_t index, index2;
-
1895  for (uint8_t round = 0; round < 24; ++round) {
-
1896  // Step mapping theta. The specification mentions two temporary
-
1897  // arrays of size 5 called C and D. To save a bit of memory,
-
1898  // we use the first row of B to store C and compute D on the fly.
-
1899  for (index = 0; index < 5; ++index) {
-
1900  B[0][index] = state.A[0][index] ^ state.A[1][index] ^
-
1901  state.A[2][index] ^ state.A[3][index] ^
-
1902  state.A[4][index];
-
1903  }
-
1904  for (index = 0; index < 5; ++index) {
-
1905  D = B[0][addMod5(index, 4)] ^
-
1906  leftRotate1_64(B[0][addMod5(index, 1)]);
-
1907  for (index2 = 0; index2 < 5; ++index2)
-
1908  state.A[index2][index] ^= D;
-
1909  }
-
1910 
-
1911  // Step mapping rho and pi combined into a single step.
-
1912  // Rotate all lanes by a specific offset and rearrange.
-
1913  B[0][0] = state.A[0][0];
-
1914  B[1][0] = leftRotate28_64(state.A[0][3]);
-
1915  B[2][0] = leftRotate1_64 (state.A[0][1]);
-
1916  B[3][0] = leftRotate27_64(state.A[0][4]);
-
1917  B[4][0] = leftRotate62_64(state.A[0][2]);
-
1918  B[0][1] = leftRotate44_64(state.A[1][1]);
-
1919  B[1][1] = leftRotate20_64(state.A[1][4]);
-
1920  B[2][1] = leftRotate6_64 (state.A[1][2]);
-
1921  B[3][1] = leftRotate36_64(state.A[1][0]);
-
1922  B[4][1] = leftRotate55_64(state.A[1][3]);
-
1923  B[0][2] = leftRotate43_64(state.A[2][2]);
-
1924  B[1][2] = leftRotate3_64 (state.A[2][0]);
-
1925  B[2][2] = leftRotate25_64(state.A[2][3]);
-
1926  B[3][2] = leftRotate10_64(state.A[2][1]);
-
1927  B[4][2] = leftRotate39_64(state.A[2][4]);
-
1928  B[0][3] = leftRotate21_64(state.A[3][3]);
-
1929  B[1][3] = leftRotate45_64(state.A[3][1]);
-
1930  B[2][3] = leftRotate8_64 (state.A[3][4]);
-
1931  B[3][3] = leftRotate15_64(state.A[3][2]);
-
1932  B[4][3] = leftRotate41_64(state.A[3][0]);
-
1933  B[0][4] = leftRotate14_64(state.A[4][4]);
-
1934  B[1][4] = leftRotate61_64(state.A[4][2]);
-
1935  B[2][4] = leftRotate18_64(state.A[4][0]);
-
1936  B[3][4] = leftRotate56_64(state.A[4][3]);
-
1937  B[4][4] = leftRotate2_64 (state.A[4][1]);
-
1938 
-
1939  // Step mapping chi. Combine each lane with two other lanes in its row.
-
1940  for (index = 0; index < 5; ++index) {
-
1941  for (index2 = 0; index2 < 5; ++index2) {
-
1942  state.A[index2][index] =
-
1943  B[index2][index] ^
-
1944  ((~B[index2][addMod5(index, 1)]) &
-
1945  B[index2][addMod5(index, 2)]);
-
1946  }
-
1947  }
-
1948 #endif
-
1949 
-
1950  // Step mapping iota. XOR A[0][0] with the round constant.
-
1951  static uint64_t const RC[24] PROGMEM = {
-
1952  0x0000000000000001ULL, 0x0000000000008082ULL, 0x800000000000808AULL,
-
1953  0x8000000080008000ULL, 0x000000000000808BULL, 0x0000000080000001ULL,
-
1954  0x8000000080008081ULL, 0x8000000000008009ULL, 0x000000000000008AULL,
-
1955  0x0000000000000088ULL, 0x0000000080008009ULL, 0x000000008000000AULL,
-
1956  0x000000008000808BULL, 0x800000000000008BULL, 0x8000000000008089ULL,
-
1957  0x8000000000008003ULL, 0x8000000000008002ULL, 0x8000000000000080ULL,
-
1958  0x000000000000800AULL, 0x800000008000000AULL, 0x8000000080008081ULL,
-
1959  0x8000000000008080ULL, 0x0000000080000001ULL, 0x8000000080008008ULL
-
1960  };
-
1961  state.A[0][0] ^= pgm_read_qword(RC + round);
-
1962  }
-
1963 }
+
1045 
+
1046  // B[3][1] = leftRotate36_64(A[1][0])
+
1047  "adiw r26,32\n"
+
1048  "ld r8,Z\n"
+
1049  "ldd r9,Z+1\n"
+
1050  "ldd r10,Z+2\n"
+
1051  "ldd r11,Z+3\n"
+
1052  "ldd r12,Z+4\n"
+
1053  "ldd r13,Z+5\n"
+
1054  "ldd r14,Z+6\n"
+
1055  "ldd r15,Z+7\n"
+
1056  "lsl r8\n"
+
1057  "rol r9\n"
+
1058  "rol r10\n"
+
1059  "rol r11\n"
+
1060  "rol r12\n"
+
1061  "rol r13\n"
+
1062  "rol r14\n"
+
1063  "rol r15\n"
+
1064  "adc r8, __zero_reg__\n"
+
1065  "lsl r8\n"
+
1066  "rol r9\n"
+
1067  "rol r10\n"
+
1068  "rol r11\n"
+
1069  "rol r12\n"
+
1070  "rol r13\n"
+
1071  "rol r14\n"
+
1072  "rol r15\n"
+
1073  "adc r8, __zero_reg__\n"
+
1074  "lsl r8\n"
+
1075  "rol r9\n"
+
1076  "rol r10\n"
+
1077  "rol r11\n"
+
1078  "rol r12\n"
+
1079  "rol r13\n"
+
1080  "rol r14\n"
+
1081  "rol r15\n"
+
1082  "adc r8, __zero_reg__\n"
+
1083  "lsl r8\n"
+
1084  "rol r9\n"
+
1085  "rol r10\n"
+
1086  "rol r11\n"
+
1087  "rol r12\n"
+
1088  "rol r13\n"
+
1089  "rol r14\n"
+
1090  "rol r15\n"
+
1091  "adc r8, __zero_reg__\n"
+
1092  "st X+,r12\n"
+
1093  "st X+,r13\n"
+
1094  "st X+,r14\n"
+
1095  "st X+,r15\n"
+
1096  "st X+,r8\n"
+
1097  "st X+,r9\n"
+
1098  "st X+,r10\n"
+
1099  "st X+,r11\n"
+
1100 
+
1101  // B[4][1] = leftRotate55_64(A[1][3])
+
1102  "adiw r26,32\n"
+
1103  "ldd r8,Z+24\n"
+
1104  "ldd r9,Z+25\n"
+
1105  "ldd r10,Z+26\n"
+
1106  "ldd r11,Z+27\n"
+
1107  "ldd r12,Z+28\n"
+
1108  "ldd r13,Z+29\n"
+
1109  "ldd r14,Z+30\n"
+
1110  "ldd r15,Z+31\n"
+
1111  "bst r8,0\n"
+
1112  "ror r15\n"
+
1113  "ror r14\n"
+
1114  "ror r13\n"
+
1115  "ror r12\n"
+
1116  "ror r11\n"
+
1117  "ror r10\n"
+
1118  "ror r9\n"
+
1119  "ror r8\n"
+
1120  "bld r15,7\n"
+
1121  "st X+,r9\n"
+
1122  "st X+,r10\n"
+
1123  "st X+,r11\n"
+
1124  "st X+,r12\n"
+
1125  "st X+,r13\n"
+
1126  "st X+,r14\n"
+
1127  "st X+,r15\n"
+
1128  "st X+,r8\n"
+
1129 
+
1130  // B[0][2] = leftRotate43_64(A[2][2])
+
1131  "subi r26,160\n"
+
1132  "sbc r27,__zero_reg__\n"
+
1133  "adiw r30,40\n"
+
1134  "ldd r8,Z+16\n"
+
1135  "ldd r9,Z+17\n"
+
1136  "ldd r10,Z+18\n"
+
1137  "ldd r11,Z+19\n"
+
1138  "ldd r12,Z+20\n"
+
1139  "ldd r13,Z+21\n"
+
1140  "ldd r14,Z+22\n"
+
1141  "ldd r15,Z+23\n"
+
1142  "lsl r8\n"
+
1143  "rol r9\n"
+
1144  "rol r10\n"
+
1145  "rol r11\n"
+
1146  "rol r12\n"
+
1147  "rol r13\n"
+
1148  "rol r14\n"
+
1149  "rol r15\n"
+
1150  "adc r8, __zero_reg__\n"
+
1151  "lsl r8\n"
+
1152  "rol r9\n"
+
1153  "rol r10\n"
+
1154  "rol r11\n"
+
1155  "rol r12\n"
+
1156  "rol r13\n"
+
1157  "rol r14\n"
+
1158  "rol r15\n"
+
1159  "adc r8, __zero_reg__\n"
+
1160  "lsl r8\n"
+
1161  "rol r9\n"
+
1162  "rol r10\n"
+
1163  "rol r11\n"
+
1164  "rol r12\n"
+
1165  "rol r13\n"
+
1166  "rol r14\n"
+
1167  "rol r15\n"
+
1168  "adc r8, __zero_reg__\n"
+
1169  "st X+,r11\n"
+
1170  "st X+,r12\n"
+
1171  "st X+,r13\n"
+
1172  "st X+,r14\n"
+
1173  "st X+,r15\n"
+
1174  "st X+,r8\n"
+
1175  "st X+,r9\n"
+
1176  "st X+,r10\n"
+
1177 
+
1178  // B[1][2] = leftRotate3_64(A[2][0])
+
1179  "adiw r26,32\n"
+
1180  "ld r8,Z\n"
+
1181  "ldd r9,Z+1\n"
+
1182  "ldd r10,Z+2\n"
+
1183  "ldd r11,Z+3\n"
+
1184  "ldd r12,Z+4\n"
+
1185  "ldd r13,Z+5\n"
+
1186  "ldd r14,Z+6\n"
+
1187  "ldd r15,Z+7\n"
+
1188  "lsl r8\n"
+
1189  "rol r9\n"
+
1190  "rol r10\n"
+
1191  "rol r11\n"
+
1192  "rol r12\n"
+
1193  "rol r13\n"
+
1194  "rol r14\n"
+
1195  "rol r15\n"
+
1196  "adc r8, __zero_reg__\n"
+
1197  "lsl r8\n"
+
1198  "rol r9\n"
+
1199  "rol r10\n"
+
1200  "rol r11\n"
+
1201  "rol r12\n"
+
1202  "rol r13\n"
+
1203  "rol r14\n"
+
1204  "rol r15\n"
+
1205  "adc r8, __zero_reg__\n"
+
1206  "lsl r8\n"
+
1207  "rol r9\n"
+
1208  "rol r10\n"
+
1209  "rol r11\n"
+
1210  "rol r12\n"
+
1211  "rol r13\n"
+
1212  "rol r14\n"
+
1213  "rol r15\n"
+
1214  "adc r8, __zero_reg__\n"
+
1215  "st X+,r8\n"
+
1216  "st X+,r9\n"
+
1217  "st X+,r10\n"
+
1218  "st X+,r11\n"
+
1219  "st X+,r12\n"
+
1220  "st X+,r13\n"
+
1221  "st X+,r14\n"
+
1222  "st X+,r15\n"
+
1223 
+
1224  // B[2][2] = leftRotate25_64(A[2][3])
+
1225  "adiw r26,32\n"
+
1226  "ldd r8,Z+24\n"
+
1227  "ldd r9,Z+25\n"
+
1228  "ldd r10,Z+26\n"
+
1229  "ldd r11,Z+27\n"
+
1230  "ldd r12,Z+28\n"
+
1231  "ldd r13,Z+29\n"
+
1232  "ldd r14,Z+30\n"
+
1233  "ldd r15,Z+31\n"
+
1234  "lsl r8\n"
+
1235  "rol r9\n"
+
1236  "rol r10\n"
+
1237  "rol r11\n"
+
1238  "rol r12\n"
+
1239  "rol r13\n"
+
1240  "rol r14\n"
+
1241  "rol r15\n"
+
1242  "adc r8, __zero_reg__\n"
+
1243  "st X+,r13\n"
+
1244  "st X+,r14\n"
+
1245  "st X+,r15\n"
+
1246  "st X+,r8\n"
+
1247  "st X+,r9\n"
+
1248  "st X+,r10\n"
+
1249  "st X+,r11\n"
+
1250  "st X+,r12\n"
+
1251 
+
1252  // B[3][2] = leftRotate10_64(A[2][1])
+
1253  "adiw r26,32\n"
+
1254  "ldd r8,Z+8\n"
+
1255  "ldd r9,Z+9\n"
+
1256  "ldd r10,Z+10\n"
+
1257  "ldd r11,Z+11\n"
+
1258  "ldd r12,Z+12\n"
+
1259  "ldd r13,Z+13\n"
+
1260  "ldd r14,Z+14\n"
+
1261  "ldd r15,Z+15\n"
+
1262  "lsl r8\n"
+
1263  "rol r9\n"
+
1264  "rol r10\n"
+
1265  "rol r11\n"
+
1266  "rol r12\n"
+
1267  "rol r13\n"
+
1268  "rol r14\n"
+
1269  "rol r15\n"
+
1270  "adc r8, __zero_reg__\n"
+
1271  "lsl r8\n"
+
1272  "rol r9\n"
+
1273  "rol r10\n"
+
1274  "rol r11\n"
+
1275  "rol r12\n"
+
1276  "rol r13\n"
+
1277  "rol r14\n"
+
1278  "rol r15\n"
+
1279  "adc r8, __zero_reg__\n"
+
1280  "st X+,r15\n"
+
1281  "st X+,r8\n"
+
1282  "st X+,r9\n"
+
1283  "st X+,r10\n"
+
1284  "st X+,r11\n"
+
1285  "st X+,r12\n"
+
1286  "st X+,r13\n"
+
1287  "st X+,r14\n"
+
1288 
+
1289  // B[4][2] = leftRotate39_64(A[2][4])
+
1290  "adiw r26,32\n"
+
1291  "ldd r8,Z+32\n"
+
1292  "ldd r9,Z+33\n"
+
1293  "ldd r10,Z+34\n"
+
1294  "ldd r11,Z+35\n"
+
1295  "ldd r12,Z+36\n"
+
1296  "ldd r13,Z+37\n"
+
1297  "ldd r14,Z+38\n"
+
1298  "ldd r15,Z+39\n"
+
1299  "bst r8,0\n"
+
1300  "ror r15\n"
+
1301  "ror r14\n"
+
1302  "ror r13\n"
+
1303  "ror r12\n"
+
1304  "ror r11\n"
+
1305  "ror r10\n"
+
1306  "ror r9\n"
+
1307  "ror r8\n"
+
1308  "bld r15,7\n"
+
1309  "st X+,r11\n"
+
1310  "st X+,r12\n"
+
1311  "st X+,r13\n"
+
1312  "st X+,r14\n"
+
1313  "st X+,r15\n"
+
1314  "st X+,r8\n"
+
1315  "st X+,r9\n"
+
1316  "st X+,r10\n"
+
1317 
+
1318  // B[0][3] = leftRotate21_64(A[3][3])
+
1319  "subi r26,160\n"
+
1320  "sbc r27,__zero_reg__\n"
+
1321  "adiw r30,40\n"
+
1322  "ldd r8,Z+24\n"
+
1323  "ldd r9,Z+25\n"
+
1324  "ldd r10,Z+26\n"
+
1325  "ldd r11,Z+27\n"
+
1326  "ldd r12,Z+28\n"
+
1327  "ldd r13,Z+29\n"
+
1328  "ldd r14,Z+30\n"
+
1329  "ldd r15,Z+31\n"
+
1330  "bst r8,0\n"
+
1331  "ror r15\n"
+
1332  "ror r14\n"
+
1333  "ror r13\n"
+
1334  "ror r12\n"
+
1335  "ror r11\n"
+
1336  "ror r10\n"
+
1337  "ror r9\n"
+
1338  "ror r8\n"
+
1339  "bld r15,7\n"
+
1340  "bst r8,0\n"
+
1341  "ror r15\n"
+
1342  "ror r14\n"
+
1343  "ror r13\n"
+
1344  "ror r12\n"
+
1345  "ror r11\n"
+
1346  "ror r10\n"
+
1347  "ror r9\n"
+
1348  "ror r8\n"
+
1349  "bld r15,7\n"
+
1350  "bst r8,0\n"
+
1351  "ror r15\n"
+
1352  "ror r14\n"
+
1353  "ror r13\n"
+
1354  "ror r12\n"
+
1355  "ror r11\n"
+
1356  "ror r10\n"
+
1357  "ror r9\n"
+
1358  "ror r8\n"
+
1359  "bld r15,7\n"
+
1360  "st X+,r13\n"
+
1361  "st X+,r14\n"
+
1362  "st X+,r15\n"
+
1363  "st X+,r8\n"
+
1364  "st X+,r9\n"
+
1365  "st X+,r10\n"
+
1366  "st X+,r11\n"
+
1367  "st X+,r12\n"
+
1368 
+
1369  // B[1][3] = leftRotate45_64(A[3][1])
+
1370  "adiw r26,32\n"
+
1371  "ldd r8,Z+8\n"
+
1372  "ldd r9,Z+9\n"
+
1373  "ldd r10,Z+10\n"
+
1374  "ldd r11,Z+11\n"
+
1375  "ldd r12,Z+12\n"
+
1376  "ldd r13,Z+13\n"
+
1377  "ldd r14,Z+14\n"
+
1378  "ldd r15,Z+15\n"
+
1379  "bst r8,0\n"
+
1380  "ror r15\n"
+
1381  "ror r14\n"
+
1382  "ror r13\n"
+
1383  "ror r12\n"
+
1384  "ror r11\n"
+
1385  "ror r10\n"
+
1386  "ror r9\n"
+
1387  "ror r8\n"
+
1388  "bld r15,7\n"
+
1389  "bst r8,0\n"
+
1390  "ror r15\n"
+
1391  "ror r14\n"
+
1392  "ror r13\n"
+
1393  "ror r12\n"
+
1394  "ror r11\n"
+
1395  "ror r10\n"
+
1396  "ror r9\n"
+
1397  "ror r8\n"
+
1398  "bld r15,7\n"
+
1399  "bst r8,0\n"
+
1400  "ror r15\n"
+
1401  "ror r14\n"
+
1402  "ror r13\n"
+
1403  "ror r12\n"
+
1404  "ror r11\n"
+
1405  "ror r10\n"
+
1406  "ror r9\n"
+
1407  "ror r8\n"
+
1408  "bld r15,7\n"
+
1409  "st X+,r10\n"
+
1410  "st X+,r11\n"
+
1411  "st X+,r12\n"
+
1412  "st X+,r13\n"
+
1413  "st X+,r14\n"
+
1414  "st X+,r15\n"
+
1415  "st X+,r8\n"
+
1416  "st X+,r9\n"
+
1417 
+
1418  // B[2][3] = leftRotate8_64(A[3][4])
+
1419  "adiw r26,32\n"
+
1420  "ldd r8,Z+32\n"
+
1421  "ldd r9,Z+33\n"
+
1422  "ldd r10,Z+34\n"
+
1423  "ldd r11,Z+35\n"
+
1424  "ldd r12,Z+36\n"
+
1425  "ldd r13,Z+37\n"
+
1426  "ldd r14,Z+38\n"
+
1427  "ldd r15,Z+39\n"
+
1428  "st X+,r15\n"
+
1429  "st X+,r8\n"
+
1430  "st X+,r9\n"
+
1431  "st X+,r10\n"
+
1432  "st X+,r11\n"
+
1433  "st X+,r12\n"
+
1434  "st X+,r13\n"
+
1435  "st X+,r14\n"
+
1436 
+
1437  // B[3][3] = leftRotate15_64(A[3][2])
+
1438  "adiw r26,32\n"
+
1439  "ldd r8,Z+16\n"
+
1440  "ldd r9,Z+17\n"
+
1441  "ldd r10,Z+18\n"
+
1442  "ldd r11,Z+19\n"
+
1443  "ldd r12,Z+20\n"
+
1444  "ldd r13,Z+21\n"
+
1445  "ldd r14,Z+22\n"
+
1446  "ldd r15,Z+23\n"
+
1447  "bst r8,0\n"
+
1448  "ror r15\n"
+
1449  "ror r14\n"
+
1450  "ror r13\n"
+
1451  "ror r12\n"
+
1452  "ror r11\n"
+
1453  "ror r10\n"
+
1454  "ror r9\n"
+
1455  "ror r8\n"
+
1456  "bld r15,7\n"
+
1457  "st X+,r14\n"
+
1458  "st X+,r15\n"
+
1459  "st X+,r8\n"
+
1460  "st X+,r9\n"
+
1461  "st X+,r10\n"
+
1462  "st X+,r11\n"
+
1463  "st X+,r12\n"
+
1464  "st X+,r13\n"
+
1465 
+
1466  // B[4][3] = leftRotate41_64(A[3][0])
+
1467  "adiw r26,32\n"
+
1468  "ld r8,Z\n"
+
1469  "ldd r9,Z+1\n"
+
1470  "ldd r10,Z+2\n"
+
1471  "ldd r11,Z+3\n"
+
1472  "ldd r12,Z+4\n"
+
1473  "ldd r13,Z+5\n"
+
1474  "ldd r14,Z+6\n"
+
1475  "ldd r15,Z+7\n"
+
1476  "lsl r8\n"
+
1477  "rol r9\n"
+
1478  "rol r10\n"
+
1479  "rol r11\n"
+
1480  "rol r12\n"
+
1481  "rol r13\n"
+
1482  "rol r14\n"
+
1483  "rol r15\n"
+
1484  "adc r8, __zero_reg__\n"
+
1485  "st X+,r11\n"
+
1486  "st X+,r12\n"
+
1487  "st X+,r13\n"
+
1488  "st X+,r14\n"
+
1489  "st X+,r15\n"
+
1490  "st X+,r8\n"
+
1491  "st X+,r9\n"
+
1492  "st X+,r10\n"
+
1493 
+
1494  // B[0][4] = leftRotate14_64(A[4][4])
+
1495  "subi r26,160\n"
+
1496  "sbc r27,__zero_reg__\n"
+
1497  "adiw r30,40\n"
+
1498  "ldd r8,Z+32\n"
+
1499  "ldd r9,Z+33\n"
+
1500  "ldd r10,Z+34\n"
+
1501  "ldd r11,Z+35\n"
+
1502  "ldd r12,Z+36\n"
+
1503  "ldd r13,Z+37\n"
+
1504  "ldd r14,Z+38\n"
+
1505  "ldd r15,Z+39\n"
+
1506  "bst r8,0\n"
+
1507  "ror r15\n"
+
1508  "ror r14\n"
+
1509  "ror r13\n"
+
1510  "ror r12\n"
+
1511  "ror r11\n"
+
1512  "ror r10\n"
+
1513  "ror r9\n"
+
1514  "ror r8\n"
+
1515  "bld r15,7\n"
+
1516  "bst r8,0\n"
+
1517  "ror r15\n"
+
1518  "ror r14\n"
+
1519  "ror r13\n"
+
1520  "ror r12\n"
+
1521  "ror r11\n"
+
1522  "ror r10\n"
+
1523  "ror r9\n"
+
1524  "ror r8\n"
+
1525  "bld r15,7\n"
+
1526  "st X+,r14\n"
+
1527  "st X+,r15\n"
+
1528  "st X+,r8\n"
+
1529  "st X+,r9\n"
+
1530  "st X+,r10\n"
+
1531  "st X+,r11\n"
+
1532  "st X+,r12\n"
+
1533  "st X+,r13\n"
+
1534 
+
1535  // B[1][4] = leftRotate61_64(A[4][2])
+
1536  "adiw r26,32\n"
+
1537  "ldd r8,Z+16\n"
+
1538  "ldd r9,Z+17\n"
+
1539  "ldd r10,Z+18\n"
+
1540  "ldd r11,Z+19\n"
+
1541  "ldd r12,Z+20\n"
+
1542  "ldd r13,Z+21\n"
+
1543  "ldd r14,Z+22\n"
+
1544  "ldd r15,Z+23\n"
+
1545  "bst r8,0\n"
+
1546  "ror r15\n"
+
1547  "ror r14\n"
+
1548  "ror r13\n"
+
1549  "ror r12\n"
+
1550  "ror r11\n"
+
1551  "ror r10\n"
+
1552  "ror r9\n"
+
1553  "ror r8\n"
+
1554  "bld r15,7\n"
+
1555  "bst r8,0\n"
+
1556  "ror r15\n"
+
1557  "ror r14\n"
+
1558  "ror r13\n"
+
1559  "ror r12\n"
+
1560  "ror r11\n"
+
1561  "ror r10\n"
+
1562  "ror r9\n"
+
1563  "ror r8\n"
+
1564  "bld r15,7\n"
+
1565  "bst r8,0\n"
+
1566  "ror r15\n"
+
1567  "ror r14\n"
+
1568  "ror r13\n"
+
1569  "ror r12\n"
+
1570  "ror r11\n"
+
1571  "ror r10\n"
+
1572  "ror r9\n"
+
1573  "ror r8\n"
+
1574  "bld r15,7\n"
+
1575  "st X+,r8\n"
+
1576  "st X+,r9\n"
+
1577  "st X+,r10\n"
+
1578  "st X+,r11\n"
+
1579  "st X+,r12\n"
+
1580  "st X+,r13\n"
+
1581  "st X+,r14\n"
+
1582  "st X+,r15\n"
+
1583 
+
1584  // B[2][4] = leftRotate18_64(A[4][0])
+
1585  "adiw r26,32\n"
+
1586  "ld r8,Z\n"
+
1587  "ldd r9,Z+1\n"
+
1588  "ldd r10,Z+2\n"
+
1589  "ldd r11,Z+3\n"
+
1590  "ldd r12,Z+4\n"
+
1591  "ldd r13,Z+5\n"
+
1592  "ldd r14,Z+6\n"
+
1593  "ldd r15,Z+7\n"
+
1594  "lsl r8\n"
+
1595  "rol r9\n"
+
1596  "rol r10\n"
+
1597  "rol r11\n"
+
1598  "rol r12\n"
+
1599  "rol r13\n"
+
1600  "rol r14\n"
+
1601  "rol r15\n"
+
1602  "adc r8, __zero_reg__\n"
+
1603  "lsl r8\n"
+
1604  "rol r9\n"
+
1605  "rol r10\n"
+
1606  "rol r11\n"
+
1607  "rol r12\n"
+
1608  "rol r13\n"
+
1609  "rol r14\n"
+
1610  "rol r15\n"
+
1611  "adc r8, __zero_reg__\n"
+
1612  "st X+,r14\n"
+
1613  "st X+,r15\n"
+
1614  "st X+,r8\n"
+
1615  "st X+,r9\n"
+
1616  "st X+,r10\n"
+
1617  "st X+,r11\n"
+
1618  "st X+,r12\n"
+
1619  "st X+,r13\n"
+
1620 
+
1621  // B[3][4] = leftRotate56_64(A[4][3])
+
1622  "adiw r26,32\n"
+
1623  "ldd r8,Z+24\n"
+
1624  "ldd r9,Z+25\n"
+
1625  "ldd r10,Z+26\n"
+
1626  "ldd r11,Z+27\n"
+
1627  "ldd r12,Z+28\n"
+
1628  "ldd r13,Z+29\n"
+
1629  "ldd r14,Z+30\n"
+
1630  "ldd r15,Z+31\n"
+
1631  "st X+,r9\n"
+
1632  "st X+,r10\n"
+
1633  "st X+,r11\n"
+
1634  "st X+,r12\n"
+
1635  "st X+,r13\n"
+
1636  "st X+,r14\n"
+
1637  "st X+,r15\n"
+
1638  "st X+,r8\n"
+
1639 
+
1640  // B[4][4] = leftRotate2_64(A[4][1])
+
1641  "adiw r26,32\n"
+
1642  "ldd r8,Z+8\n"
+
1643  "ldd r9,Z+9\n"
+
1644  "ldd r10,Z+10\n"
+
1645  "ldd r11,Z+11\n"
+
1646  "ldd r12,Z+12\n"
+
1647  "ldd r13,Z+13\n"
+
1648  "ldd r14,Z+14\n"
+
1649  "ldd r15,Z+15\n"
+
1650  "lsl r8\n"
+
1651  "rol r9\n"
+
1652  "rol r10\n"
+
1653  "rol r11\n"
+
1654  "rol r12\n"
+
1655  "rol r13\n"
+
1656  "rol r14\n"
+
1657  "rol r15\n"
+
1658  "adc r8, __zero_reg__\n"
+
1659  "lsl r8\n"
+
1660  "rol r9\n"
+
1661  "rol r10\n"
+
1662  "rol r11\n"
+
1663  "rol r12\n"
+
1664  "rol r13\n"
+
1665  "rol r14\n"
+
1666  "rol r15\n"
+
1667  "adc r8, __zero_reg__\n"
+
1668  "st X+,r8\n"
+
1669  "st X+,r9\n"
+
1670  "st X+,r10\n"
+
1671  "st X+,r11\n"
+
1672  "st X+,r12\n"
+
1673  "st X+,r13\n"
+
1674  "st X+,r14\n"
+
1675  "st X+,r15\n"
+
1676  "subi r26,200\n"
+
1677  "sbc r27,__zero_reg__\n"
+
1678  "subi r30,160\n"
+
1679  "sbc r31,__zero_reg__\n"
+
1680 
+
1681  // Step mapping chi.
+
1682  "ldi r20,5\n"
+
1683  "50:\n"
+
1684  "ld r8,Y\n"
+
1685  "ldd r9,Y+8\n"
+
1686  "ldd r10,Y+16\n"
+
1687  "ldd r11,Y+24\n"
+
1688  "ldd r12,Y+32\n"
+
1689  "mov r13,r9\n"
+
1690  "com r13\n"
+
1691  "and r13,r10\n"
+
1692  "eor r13,r8\n"
+
1693  "mov r14,r10\n"
+
1694  "com r14\n"
+
1695  "and r14,r11\n"
+
1696  "eor r14,r9\n"
+
1697  "mov r15,r11\n"
+
1698  "com r15\n"
+
1699  "and r15,r12\n"
+
1700  "eor r15,r10\n"
+
1701  "mov r17,r12\n"
+
1702  "com r17\n"
+
1703  "and r17,r8\n"
+
1704  "eor r17,r11\n"
+
1705  "mov r16,r8\n"
+
1706  "com r16\n"
+
1707  "and r16,r9\n"
+
1708  "eor r16,r12\n"
+
1709  "st Z,r13\n"
+
1710  "std Z+8,r14\n"
+
1711  "std Z+16,r15\n"
+
1712  "std Z+24,r17\n"
+
1713  "std Z+32,r16\n"
+
1714  "ldd r8,Y+1\n"
+
1715  "ldd r9,Y+9\n"
+
1716  "ldd r10,Y+17\n"
+
1717  "ldd r11,Y+25\n"
+
1718  "ldd r12,Y+33\n"
+
1719  "mov r13,r9\n"
+
1720  "com r13\n"
+
1721  "and r13,r10\n"
+
1722  "eor r13,r8\n"
+
1723  "mov r14,r10\n"
+
1724  "com r14\n"
+
1725  "and r14,r11\n"
+
1726  "eor r14,r9\n"
+
1727  "mov r15,r11\n"
+
1728  "com r15\n"
+
1729  "and r15,r12\n"
+
1730  "eor r15,r10\n"
+
1731  "mov r17,r12\n"
+
1732  "com r17\n"
+
1733  "and r17,r8\n"
+
1734  "eor r17,r11\n"
+
1735  "mov r16,r8\n"
+
1736  "com r16\n"
+
1737  "and r16,r9\n"
+
1738  "eor r16,r12\n"
+
1739  "std Z+1,r13\n"
+
1740  "std Z+9,r14\n"
+
1741  "std Z+17,r15\n"
+
1742  "std Z+25,r17\n"
+
1743  "std Z+33,r16\n"
+
1744  "ldd r8,Y+2\n"
+
1745  "ldd r9,Y+10\n"
+
1746  "ldd r10,Y+18\n"
+
1747  "ldd r11,Y+26\n"
+
1748  "ldd r12,Y+34\n"
+
1749  "mov r13,r9\n"
+
1750  "com r13\n"
+
1751  "and r13,r10\n"
+
1752  "eor r13,r8\n"
+
1753  "mov r14,r10\n"
+
1754  "com r14\n"
+
1755  "and r14,r11\n"
+
1756  "eor r14,r9\n"
+
1757  "mov r15,r11\n"
+
1758  "com r15\n"
+
1759  "and r15,r12\n"
+
1760  "eor r15,r10\n"
+
1761  "mov r17,r12\n"
+
1762  "com r17\n"
+
1763  "and r17,r8\n"
+
1764  "eor r17,r11\n"
+
1765  "mov r16,r8\n"
+
1766  "com r16\n"
+
1767  "and r16,r9\n"
+
1768  "eor r16,r12\n"
+
1769  "std Z+2,r13\n"
+
1770  "std Z+10,r14\n"
+
1771  "std Z+18,r15\n"
+
1772  "std Z+26,r17\n"
+
1773  "std Z+34,r16\n"
+
1774  "ldd r8,Y+3\n"
+
1775  "ldd r9,Y+11\n"
+
1776  "ldd r10,Y+19\n"
+
1777  "ldd r11,Y+27\n"
+
1778  "ldd r12,Y+35\n"
+
1779  "mov r13,r9\n"
+
1780  "com r13\n"
+
1781  "and r13,r10\n"
+
1782  "eor r13,r8\n"
+
1783  "mov r14,r10\n"
+
1784  "com r14\n"
+
1785  "and r14,r11\n"
+
1786  "eor r14,r9\n"
+
1787  "mov r15,r11\n"
+
1788  "com r15\n"
+
1789  "and r15,r12\n"
+
1790  "eor r15,r10\n"
+
1791  "mov r17,r12\n"
+
1792  "com r17\n"
+
1793  "and r17,r8\n"
+
1794  "eor r17,r11\n"
+
1795  "mov r16,r8\n"
+
1796  "com r16\n"
+
1797  "and r16,r9\n"
+
1798  "eor r16,r12\n"
+
1799  "std Z+3,r13\n"
+
1800  "std Z+11,r14\n"
+
1801  "std Z+19,r15\n"
+
1802  "std Z+27,r17\n"
+
1803  "std Z+35,r16\n"
+
1804  "ldd r8,Y+4\n"
+
1805  "ldd r9,Y+12\n"
+
1806  "ldd r10,Y+20\n"
+
1807  "ldd r11,Y+28\n"
+
1808  "ldd r12,Y+36\n"
+
1809  "mov r13,r9\n"
+
1810  "com r13\n"
+
1811  "and r13,r10\n"
+
1812  "eor r13,r8\n"
+
1813  "mov r14,r10\n"
+
1814  "com r14\n"
+
1815  "and r14,r11\n"
+
1816  "eor r14,r9\n"
+
1817  "mov r15,r11\n"
+
1818  "com r15\n"
+
1819  "and r15,r12\n"
+
1820  "eor r15,r10\n"
+
1821  "mov r17,r12\n"
+
1822  "com r17\n"
+
1823  "and r17,r8\n"
+
1824  "eor r17,r11\n"
+
1825  "mov r16,r8\n"
+
1826  "com r16\n"
+
1827  "and r16,r9\n"
+
1828  "eor r16,r12\n"
+
1829  "std Z+4,r13\n"
+
1830  "std Z+12,r14\n"
+
1831  "std Z+20,r15\n"
+
1832  "std Z+28,r17\n"
+
1833  "std Z+36,r16\n"
+
1834  "ldd r8,Y+5\n"
+
1835  "ldd r9,Y+13\n"
+
1836  "ldd r10,Y+21\n"
+
1837  "ldd r11,Y+29\n"
+
1838  "ldd r12,Y+37\n"
+
1839  "mov r13,r9\n"
+
1840  "com r13\n"
+
1841  "and r13,r10\n"
+
1842  "eor r13,r8\n"
+
1843  "mov r14,r10\n"
+
1844  "com r14\n"
+
1845  "and r14,r11\n"
+
1846  "eor r14,r9\n"
+
1847  "mov r15,r11\n"
+
1848  "com r15\n"
+
1849  "and r15,r12\n"
+
1850  "eor r15,r10\n"
+
1851  "mov r17,r12\n"
+
1852  "com r17\n"
+
1853  "and r17,r8\n"
+
1854  "eor r17,r11\n"
+
1855  "mov r16,r8\n"
+
1856  "com r16\n"
+
1857  "and r16,r9\n"
+
1858  "eor r16,r12\n"
+
1859  "std Z+5,r13\n"
+
1860  "std Z+13,r14\n"
+
1861  "std Z+21,r15\n"
+
1862  "std Z+29,r17\n"
+
1863  "std Z+37,r16\n"
+
1864  "ldd r8,Y+6\n"
+
1865  "ldd r9,Y+14\n"
+
1866  "ldd r10,Y+22\n"
+
1867  "ldd r11,Y+30\n"
+
1868  "ldd r12,Y+38\n"
+
1869  "mov r13,r9\n"
+
1870  "com r13\n"
+
1871  "and r13,r10\n"
+
1872  "eor r13,r8\n"
+
1873  "mov r14,r10\n"
+
1874  "com r14\n"
+
1875  "and r14,r11\n"
+
1876  "eor r14,r9\n"
+
1877  "mov r15,r11\n"
+
1878  "com r15\n"
+
1879  "and r15,r12\n"
+
1880  "eor r15,r10\n"
+
1881  "mov r17,r12\n"
+
1882  "com r17\n"
+
1883  "and r17,r8\n"
+
1884  "eor r17,r11\n"
+
1885  "mov r16,r8\n"
+
1886  "com r16\n"
+
1887  "and r16,r9\n"
+
1888  "eor r16,r12\n"
+
1889  "std Z+6,r13\n"
+
1890  "std Z+14,r14\n"
+
1891  "std Z+22,r15\n"
+
1892  "std Z+30,r17\n"
+
1893  "std Z+38,r16\n"
+
1894  "ldd r8,Y+7\n"
+
1895  "ldd r9,Y+15\n"
+
1896  "ldd r10,Y+23\n"
+
1897  "ldd r11,Y+31\n"
+
1898  "ldd r12,Y+39\n"
+
1899  "mov r13,r9\n"
+
1900  "com r13\n"
+
1901  "and r13,r10\n"
+
1902  "eor r13,r8\n"
+
1903  "mov r14,r10\n"
+
1904  "com r14\n"
+
1905  "and r14,r11\n"
+
1906  "eor r14,r9\n"
+
1907  "mov r15,r11\n"
+
1908  "com r15\n"
+
1909  "and r15,r12\n"
+
1910  "eor r15,r10\n"
+
1911  "mov r17,r12\n"
+
1912  "com r17\n"
+
1913  "and r17,r8\n"
+
1914  "eor r17,r11\n"
+
1915  "mov r16,r8\n"
+
1916  "com r16\n"
+
1917  "and r16,r9\n"
+
1918  "eor r16,r12\n"
+
1919  "std Z+7,r13\n"
+
1920  "std Z+15,r14\n"
+
1921  "std Z+23,r15\n"
+
1922  "std Z+31,r17\n"
+
1923  "std Z+39,r16\n"
+
1924  "adiw r30,40\n"
+
1925  "adiw r28,40\n"
+
1926  "dec r20\n"
+
1927  "breq 51f\n"
+
1928  "rjmp 50b\n"
+
1929  "51:\n"
+
1930  "pop r28\n"
+
1931  "pop r29\n"
+
1932 
+
1933  // Done
+
1934  : : "x"(B), "z"(state.A)
+
1935  : "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+
1936  "r16", "r17", "r18", "r19", "r20", "r21", "memory"
+
1937  );
+
1938 #else
+
1939  static const uint8_t addMod5Table[9] PROGMEM = {
+
1940  0, 1, 2, 3, 4, 0, 1, 2, 3
+
1941  };
+
1942  #define addMod5(x, y) (pgm_read_byte(&(addMod5Table[(x) + (y)])))
+
1943  uint64_t D;
+
1944  uint8_t index, index2;
+
1945  for (uint8_t round = 0; round < 24; ++round) {
+
1946  // Step mapping theta. The specification mentions two temporary
+
1947  // arrays of size 5 called C and D. To save a bit of memory,
+
1948  // we use the first row of B to store C and compute D on the fly.
+
1949  for (index = 0; index < 5; ++index) {
+
1950  B[0][index] = state.A[0][index] ^ state.A[1][index] ^
+
1951  state.A[2][index] ^ state.A[3][index] ^
+
1952  state.A[4][index];
+
1953  }
+
1954  for (index = 0; index < 5; ++index) {
+
1955  D = B[0][addMod5(index, 4)] ^
+
1956  leftRotate1_64(B[0][addMod5(index, 1)]);
+
1957  for (index2 = 0; index2 < 5; ++index2)
+
1958  state.A[index2][index] ^= D;
+
1959  }
+
1960 
+
1961  // Step mapping rho and pi combined into a single step.
+
1962  // Rotate all lanes by a specific offset and rearrange.
+
1963  B[0][0] = state.A[0][0];
+
1964  B[1][0] = leftRotate28_64(state.A[0][3]);
+
1965  B[2][0] = leftRotate1_64 (state.A[0][1]);
+
1966  B[3][0] = leftRotate27_64(state.A[0][4]);
+
1967  B[4][0] = leftRotate62_64(state.A[0][2]);
+
1968  B[0][1] = leftRotate44_64(state.A[1][1]);
+
1969  B[1][1] = leftRotate20_64(state.A[1][4]);
+
1970  B[2][1] = leftRotate6_64 (state.A[1][2]);
+
1971  B[3][1] = leftRotate36_64(state.A[1][0]);
+
1972  B[4][1] = leftRotate55_64(state.A[1][3]);
+
1973  B[0][2] = leftRotate43_64(state.A[2][2]);
+
1974  B[1][2] = leftRotate3_64 (state.A[2][0]);
+
1975  B[2][2] = leftRotate25_64(state.A[2][3]);
+
1976  B[3][2] = leftRotate10_64(state.A[2][1]);
+
1977  B[4][2] = leftRotate39_64(state.A[2][4]);
+
1978  B[0][3] = leftRotate21_64(state.A[3][3]);
+
1979  B[1][3] = leftRotate45_64(state.A[3][1]);
+
1980  B[2][3] = leftRotate8_64 (state.A[3][4]);
+
1981  B[3][3] = leftRotate15_64(state.A[3][2]);
+
1982  B[4][3] = leftRotate41_64(state.A[3][0]);
+
1983  B[0][4] = leftRotate14_64(state.A[4][4]);
+
1984  B[1][4] = leftRotate61_64(state.A[4][2]);
+
1985  B[2][4] = leftRotate18_64(state.A[4][0]);
+
1986  B[3][4] = leftRotate56_64(state.A[4][3]);
+
1987  B[4][4] = leftRotate2_64 (state.A[4][1]);
+
1988 
+
1989  // Step mapping chi. Combine each lane with two other lanes in its row.
+
1990  for (index = 0; index < 5; ++index) {
+
1991  for (index2 = 0; index2 < 5; ++index2) {
+
1992  state.A[index2][index] =
+
1993  B[index2][index] ^
+
1994  ((~B[index2][addMod5(index, 1)]) &
+
1995  B[index2][addMod5(index, 2)]);
+
1996  }
+
1997  }
+
1998 #endif
+
1999 
+
2000  // Step mapping iota. XOR A[0][0] with the round constant.
+
2001  static uint64_t const RC[24] PROGMEM = {
+
2002  0x0000000000000001ULL, 0x0000000000008082ULL, 0x800000000000808AULL,
+
2003  0x8000000080008000ULL, 0x000000000000808BULL, 0x0000000080000001ULL,
+
2004  0x8000000080008081ULL, 0x8000000000008009ULL, 0x000000000000008AULL,
+
2005  0x0000000000000088ULL, 0x0000000080008009ULL, 0x000000008000000AULL,
+
2006  0x000000008000808BULL, 0x800000000000008BULL, 0x8000000000008089ULL,
+
2007  0x8000000000008003ULL, 0x8000000000008002ULL, 0x8000000000000080ULL,
+
2008  0x000000000000800AULL, 0x800000008000000AULL, 0x8000000080008081ULL,
+
2009  0x8000000000008080ULL, 0x0000000080000001ULL, 0x8000000080008008ULL
+
2010  };
+
2011  state.A[0][0] ^= pgm_read_qword(RC + round);
+
2012  }
+
2013 }
KeccakCore::blockSize
size_t blockSize() const
Returns the input block size for the sponge function in bytes.
Definition: KeccakCore.h:38
-
KeccakCore::setHMACKey
void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
Sets a HMAC key for a Keccak-based hash algorithm.
Definition: KeccakCore.cpp:243
+
KeccakCore::setHMACKey
void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
Sets a HMAC key for a Keccak-based hash algorithm.
Definition: KeccakCore.cpp:293
+
KeccakCore::encrypt
void encrypt(void *output, const void *input, size_t size)
Extracts data from the Keccak sponge function and uses it to encrypt a buffer.
Definition: KeccakCore.cpp:240
KeccakCore::setCapacity
void setCapacity(size_t capacity)
Sets the capacity of the Keccak sponge function in bits.
Definition: KeccakCore.cpp:94
KeccakCore::~KeccakCore
~KeccakCore()
Destroys this Keccak sponge function after clearing all sensitive information.
Definition: KeccakCore.cpp:66
KeccakCore::extract
void extract(void *data, size_t size)
Extracts data from the Keccak sponge function.
Definition: KeccakCore.cpp:194
@@ -1953,12 +1986,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
KeccakCore::capacity
size_t capacity() const
Returns the capacity of the sponge function in bits.
Definition: KeccakCore.cpp:76
KeccakCore::KeccakCore
KeccakCore()
Constructs a new Keccak sponge function.
Definition: KeccakCore.cpp:54
KeccakCore::update
void update(const void *data, size_t size)
Updates the Keccak sponge function with more input data.
Definition: KeccakCore.cpp:133
-
KeccakCore::clear
void clear()
Clears all sensitive data from this object.
Definition: KeccakCore.cpp:225
+
KeccakCore::clear
void clear()
Clears all sensitive data from this object.
Definition: KeccakCore.cpp:275
KeccakCore::reset
void reset()
Resets the Keccak sponge function ready for a new session.
Definition: KeccakCore.cpp:114
diff --git a/KeccakCore_8h_source.html b/KeccakCore_8h_source.html index 60c3d0dd..d9f77ae2 100644 --- a/KeccakCore_8h_source.html +++ b/KeccakCore_8h_source.html @@ -133,25 +133,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
43  void pad(uint8_t tag);
44 
45  void extract(void *data, size_t size);
-
46 
-
47  void clear();
-
48 
-
49  void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize);
-
50 
-
51 private:
-
52  struct {
-
53  uint64_t A[5][5];
-
54  uint8_t inputSize;
-
55  uint8_t outputSize;
-
56  } state;
-
57  uint8_t _blockSize;
-
58 
-
59  void keccakp();
-
60 };
-
61 
-
62 #endif
+
46  void encrypt(void *output, const void *input, size_t size);
+
47 
+
48  void clear();
+
49 
+
50  void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize);
+
51 
+
52 private:
+
53  struct {
+
54  uint64_t A[5][5];
+
55  uint8_t inputSize;
+
56  uint8_t outputSize;
+
57  } state;
+
58  uint8_t _blockSize;
+
59 
+
60  void keccakp();
+
61 };
+
62 
+
63 #endif
KeccakCore::blockSize
size_t blockSize() const
Returns the input block size for the sponge function in bytes.
Definition: KeccakCore.h:38
-
KeccakCore::setHMACKey
void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
Sets a HMAC key for a Keccak-based hash algorithm.
Definition: KeccakCore.cpp:243
+
KeccakCore::setHMACKey
void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
Sets a HMAC key for a Keccak-based hash algorithm.
Definition: KeccakCore.cpp:293
+
KeccakCore::encrypt
void encrypt(void *output, const void *input, size_t size)
Extracts data from the Keccak sponge function and uses it to encrypt a buffer.
Definition: KeccakCore.cpp:240
KeccakCore::setCapacity
void setCapacity(size_t capacity)
Sets the capacity of the Keccak sponge function in bits.
Definition: KeccakCore.cpp:94
KeccakCore::~KeccakCore
~KeccakCore()
Destroys this Keccak sponge function after clearing all sensitive information.
Definition: KeccakCore.cpp:66
KeccakCore::extract
void extract(void *data, size_t size)
Extracts data from the Keccak sponge function.
Definition: KeccakCore.cpp:194
@@ -159,13 +161,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
KeccakCore::capacity
size_t capacity() const
Returns the capacity of the sponge function in bits.
Definition: KeccakCore.cpp:76
KeccakCore::KeccakCore
KeccakCore()
Constructs a new Keccak sponge function.
Definition: KeccakCore.cpp:54
KeccakCore::update
void update(const void *data, size_t size)
Updates the Keccak sponge function with more input data.
Definition: KeccakCore.cpp:133
-
KeccakCore::clear
void clear()
Clears all sensitive data from this object.
Definition: KeccakCore.cpp:225
+
KeccakCore::clear
void clear()
Clears all sensitive data from this object.
Definition: KeccakCore.cpp:275
KeccakCore::reset
void reset()
Resets the Keccak sponge function ready for a new session.
Definition: KeccakCore.cpp:114
KeccakCore
Keccak core sponge function.
Definition: KeccakCore.h:29
diff --git a/LCD_8cpp_source.html b/LCD_8cpp_source.html index 826773f9..16921905 100644 --- a/LCD_8cpp_source.html +++ b/LCD_8cpp_source.html @@ -290,7 +290,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/LCD_8h_source.html b/LCD_8h_source.html index 8b1b24bf..32c89e0b 100644 --- a/LCD_8h_source.html +++ b/LCD_8h_source.html @@ -202,7 +202,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ListField_8cpp_source.html b/ListField_8cpp_source.html index ce64067e..86997d1e 100644 --- a/ListField_8cpp_source.html +++ b/ListField_8cpp_source.html @@ -221,7 +221,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/ListField_8h_source.html b/ListField_8h_source.html index 2797df4b..c65739f6 100644 --- a/ListField_8h_source.html +++ b/ListField_8h_source.html @@ -159,7 +159,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Melody_8cpp_source.html b/Melody_8cpp_source.html index 50562774..cfcee343 100644 --- a/Melody_8cpp_source.html +++ b/Melody_8cpp_source.html @@ -215,7 +215,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Melody_8h_source.html b/Melody_8h_source.html index b3e84a58..c21863ed 100644 --- a/Melody_8h_source.html +++ b/Melody_8h_source.html @@ -258,7 +258,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Mono5x7_8h_source.html b/Mono5x7_8h_source.html index d6f55480..78a81ec5 100644 --- a/Mono5x7_8h_source.html +++ b/Mono5x7_8h_source.html @@ -246,7 +246,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/NoiseSource_8cpp_source.html b/NoiseSource_8cpp_source.html index 1ae0e2a5..d6912ee9 100644 --- a/NoiseSource_8cpp_source.html +++ b/NoiseSource_8cpp_source.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/NoiseSource_8h_source.html b/NoiseSource_8h_source.html index be2e3bfd..8598aa68 100644 --- a/NoiseSource_8h_source.html +++ b/NoiseSource_8h_source.html @@ -142,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/OFB_8cpp_source.html b/OFB_8cpp_source.html index a869fc8e..63b2b728 100644 --- a/OFB_8cpp_source.html +++ b/OFB_8cpp_source.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/OFB_8h_source.html b/OFB_8h_source.html index 615b8a5e..f891af92 100644 --- a/OFB_8h_source.html +++ b/OFB_8h_source.html @@ -171,7 +171,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/OMAC_8cpp_source.html b/OMAC_8cpp_source.html index 038e77ce..587a56bf 100644 --- a/OMAC_8cpp_source.html +++ b/OMAC_8cpp_source.html @@ -208,7 +208,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/OMAC_8h_source.html b/OMAC_8h_source.html index 968f9767..cccad7c1 100644 --- a/OMAC_8h_source.html +++ b/OMAC_8h_source.html @@ -152,7 +152,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Poly1305_8cpp_source.html b/Poly1305_8cpp_source.html index 15f146f9..5d633a57 100644 --- a/Poly1305_8cpp_source.html +++ b/Poly1305_8cpp_source.html @@ -355,7 +355,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Poly1305_8h_source.html b/Poly1305_8h_source.html index 2860a8c2..e538e1e1 100644 --- a/Poly1305_8h_source.html +++ b/Poly1305_8h_source.html @@ -153,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/PowerSave_8cpp_source.html b/PowerSave_8cpp_source.html index f322a19b..681eeec7 100644 --- a/PowerSave_8cpp_source.html +++ b/PowerSave_8cpp_source.html @@ -155,7 +155,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/PowerSave_8h_source.html b/PowerSave_8h_source.html index 958b1c2f..9de53c72 100644 --- a/PowerSave_8h_source.html +++ b/PowerSave_8h_source.html @@ -158,7 +158,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RC5_8h_source.html b/RC5_8h_source.html index e78f0241..1839ca31 100644 --- a/RC5_8h_source.html +++ b/RC5_8h_source.html @@ -435,7 +435,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RNG_8cpp_source.html b/RNG_8cpp_source.html index b304d121..9c050ef1 100644 --- a/RNG_8cpp_source.html +++ b/RNG_8cpp_source.html @@ -651,7 +651,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RNG_8h_source.html b/RNG_8h_source.html index b5540a07..0a5f73c9 100644 --- a/RNG_8h_source.html +++ b/RNG_8h_source.html @@ -177,7 +177,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RTC_8cpp_source.html b/RTC_8cpp_source.html index bed913fe..488ae909 100644 --- a/RTC_8cpp_source.html +++ b/RTC_8cpp_source.html @@ -380,7 +380,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RTC_8h_source.html b/RTC_8h_source.html index bb02d16a..bd34056f 100644 --- a/RTC_8h_source.html +++ b/RTC_8h_source.html @@ -237,7 +237,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RingOscillatorNoiseSource_8cpp_source.html b/RingOscillatorNoiseSource_8cpp_source.html index 8f9cefe4..9e2ee7b1 100644 --- a/RingOscillatorNoiseSource_8cpp_source.html +++ b/RingOscillatorNoiseSource_8cpp_source.html @@ -285,7 +285,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/RingOscillatorNoiseSource_8h_source.html b/RingOscillatorNoiseSource_8h_source.html index 86bdf8b4..e8c3e2fa 100644 --- a/RingOscillatorNoiseSource_8h_source.html +++ b/RingOscillatorNoiseSource_8h_source.html @@ -145,7 +145,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SHA256_8cpp_source.html b/SHA256_8cpp_source.html index 540dc530..0f9f62e8 100644 --- a/SHA256_8cpp_source.html +++ b/SHA256_8cpp_source.html @@ -339,7 +339,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SHA256_8h_source.html b/SHA256_8h_source.html index e0e6173b..a32e5e17 100644 --- a/SHA256_8h_source.html +++ b/SHA256_8h_source.html @@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SHA3_8cpp_source.html b/SHA3_8cpp_source.html index d9c37142..a73e6408 100644 --- a/SHA3_8cpp_source.html +++ b/SHA3_8cpp_source.html @@ -232,7 +232,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
SHA3_256::~SHA3_256
virtual ~SHA3_256()
Destroys this hash object after clearing sensitive information.
Definition: SHA3.cpp:46
SHA3_256::resetHMAC
void resetHMAC(const void *key, size_t keyLen)
Resets the hash ready for a new HMAC hashing process.
Definition: SHA3.cpp:83
SHA3_512::hashSize
size_t hashSize() const
Size of the hash result from finalize().
Definition: SHA3.cpp:123
-
KeccakCore::setHMACKey
void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
Sets a HMAC key for a Keccak-based hash algorithm.
Definition: KeccakCore.cpp:243
+
KeccakCore::setHMACKey
void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
Sets a HMAC key for a Keccak-based hash algorithm.
Definition: KeccakCore.cpp:293
SHA3_256::SHA3_256
SHA3_256()
Constructs a new SHA3-256 hash object.
Definition: SHA3.cpp:38
SHA3_256::finalizeHMAC
void finalizeHMAC(const void *key, size_t keyLen, void *hash, size_t hashLen)
Finalizes the HMAC hashing process and returns the hash.
Definition: SHA3.cpp:88
SHA3_512::~SHA3_512
virtual ~SHA3_512()
Destroys this hash object after clearing sensitive information.
Definition: SHA3.cpp:118
@@ -249,7 +249,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
SHA3_512::blockSize
size_t blockSize() const
Size of the internal block used by the hash algorithm.
Definition: SHA3.cpp:128
SHA3_512::update
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: SHA3.cpp:138
KeccakCore::update
void update(const void *data, size_t size)
Updates the Keccak sponge function with more input data.
Definition: KeccakCore.cpp:133
-
KeccakCore::clear
void clear()
Clears all sensitive data from this object.
Definition: KeccakCore.cpp:225
+
KeccakCore::clear
void clear()
Clears all sensitive data from this object.
Definition: KeccakCore.cpp:275
SHA3_256::finalize
void finalize(void *hash, size_t len)
Finalizes the hashing process and returns the hash.
Definition: SHA3.cpp:71
KeccakCore::reset
void reset()
Resets the Keccak sponge function ready for a new session.
Definition: KeccakCore.cpp:114
SHA3_256::update
void update(const void *data, size_t len)
Updates the hash with more data.
Definition: SHA3.cpp:66
@@ -257,7 +257,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SHA3_8h_source.html b/SHA3_8h_source.html index 18170c57..a53d7132 100644 --- a/SHA3_8h_source.html +++ b/SHA3_8h_source.html @@ -188,7 +188,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SHA512_8cpp_source.html b/SHA512_8cpp_source.html index a3b42005..5e2e066d 100644 --- a/SHA512_8cpp_source.html +++ b/SHA512_8cpp_source.html @@ -355,7 +355,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SHA512_8h_source.html b/SHA512_8h_source.html index 7be41e06..da81e43e 100644 --- a/SHA512_8h_source.html +++ b/SHA512_8h_source.html @@ -166,7 +166,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SHAKE_8cpp_source.html b/SHAKE_8cpp_source.html new file mode 100644 index 00000000..211af597 --- /dev/null +++ b/SHAKE_8cpp_source.html @@ -0,0 +1,200 @@ + + + + + + +ArduinoLibs: SHAKE.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
SHAKE.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2016 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "SHAKE.h"
+
24 
+
40 SHAKE::SHAKE(size_t capacity)
+
41  : finalized(false)
+
42 {
+
43  core.setCapacity(capacity);
+
44 }
+
45 
+ +
50 {
+
51 }
+
52 
+
53 size_t SHAKE::blockSize() const
+
54 {
+
55  return core.blockSize();
+
56 }
+
57 
+ +
59 {
+
60  core.reset();
+
61  finalized = false;
+
62 }
+
63 
+
64 void SHAKE::update(const void *data, size_t len)
+
65 {
+
66  if (finalized)
+
67  reset();
+
68  core.update(data, len);
+
69 }
+
70 
+
71 void SHAKE::extend(uint8_t *data, size_t len)
+
72 {
+
73  if (!finalized) {
+
74  core.pad(0x1F);
+
75  finalized = true;
+
76  }
+
77  core.extract(data, len);
+
78 }
+
79 
+
80 void SHAKE::encrypt(uint8_t *output, const uint8_t *input, size_t len)
+
81 {
+
82  if (!finalized) {
+
83  core.pad(0x1F);
+
84  finalized = true;
+
85  }
+
86  core.encrypt(output, input, len);
+
87 }
+
88 
+ +
90 {
+
91  core.clear();
+
92  finalized = false;
+
93 }
+
94 
+ +
114 {
+
115 }
+
116 
+ +
136 {
+
137 }
+
virtual ~SHAKE256()
Destroys this SHAKE256 object after clearing all sensitive information.
Definition: SHAKE.cpp:135
+
size_t blockSize() const
Returns the input block size for the sponge function in bytes.
Definition: KeccakCore.h:38
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer with extendable output from this XOF.
Definition: SHAKE.cpp:80
+
void encrypt(void *output, const void *input, size_t size)
Extracts data from the Keccak sponge function and uses it to encrypt a buffer.
Definition: KeccakCore.cpp:240
+
SHAKE(size_t capacity)
Constructs a SHAKE object.
Definition: SHAKE.cpp:40
+
size_t blockSize() const
Size of the internal block used by the XOF algorithm, in bytes.
Definition: SHAKE.cpp:53
+
void setCapacity(size_t capacity)
Sets the capacity of the Keccak sponge function in bits.
Definition: KeccakCore.cpp:94
+
virtual ~SHAKE()
Destroys this SHAKE object after clearing all sensitive information.
Definition: SHAKE.cpp:49
+
void extract(void *data, size_t size)
Extracts data from the Keccak sponge function.
Definition: KeccakCore.cpp:194
+
void pad(uint8_t tag)
Pads the last block of input data to blockSize().
Definition: KeccakCore.cpp:167
+
virtual ~SHAKE128()
Destroys this SHAKE128 object after clearing all sensitive information.
Definition: SHAKE.cpp:113
+
void reset()
Resets the XOF ready for a new session.
Definition: SHAKE.cpp:58
+
void update(const void *data, size_t size)
Updates the Keccak sponge function with more input data.
Definition: KeccakCore.cpp:133
+
void clear()
Clears all sensitive data from this object.
Definition: KeccakCore.cpp:275
+
void update(const void *data, size_t len)
Updates the XOF with more data.
Definition: SHAKE.cpp:64
+
void reset()
Resets the Keccak sponge function ready for a new session.
Definition: KeccakCore.cpp:114
+
void extend(uint8_t *data, size_t len)
Generates extendable output from this XOF.
Definition: SHAKE.cpp:71
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session...
Definition: SHAKE.cpp:89
+
+ + + + diff --git a/SHAKE_8h_source.html b/SHAKE_8h_source.html new file mode 100644 index 00000000..a2ce91b8 --- /dev/null +++ b/SHAKE_8h_source.html @@ -0,0 +1,182 @@ + + + + + + +ArduinoLibs: SHAKE.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
SHAKE.h
+
+
+
1 /*
+
2  * Copyright (C) 2016 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_SHAKE_h
+
24 #define CRYPTO_SHAKE_h
+
25 
+
26 #include "XOF.h"
+
27 #include "KeccakCore.h"
+
28 
+
29 class SHAKE : public XOF
+
30 {
+
31 public:
+
32  virtual ~SHAKE();
+
33 
+
34  size_t blockSize() const;
+
35 
+
36  void reset();
+
37  void update(const void *data, size_t len);
+
38 
+
39  void extend(uint8_t *data, size_t len);
+
40  void encrypt(uint8_t *output, const uint8_t *input, size_t len);
+
41 
+
42  void clear();
+
43 
+
44 protected:
+
45  SHAKE(size_t capacity);
+
46 
+
47 private:
+
48  KeccakCore core;
+
49  bool finalized;
+
50 };
+
51 
+
52 class SHAKE128 : public SHAKE
+
53 {
+
54 public:
+
55  SHAKE128() : SHAKE(256) {}
+
56  virtual ~SHAKE128();
+
57 };
+
58 
+
59 class SHAKE256 : public SHAKE
+
60 {
+
61 public:
+
62  SHAKE256() : SHAKE(512) {}
+
63  virtual ~SHAKE256();
+
64 };
+
65 
+
66 #endif
+
virtual ~SHAKE256()
Destroys this SHAKE256 object after clearing all sensitive information.
Definition: SHAKE.cpp:135
+
Abstract base class for Extendable-Output Functions (XOFs).
Definition: XOF.h:29
+
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer with extendable output from this XOF.
Definition: SHAKE.cpp:80
+
SHAKE256()
Constructs a SHAKE object with 256-bit security.
Definition: SHAKE.h:62
+
SHAKE Extendable-Output Function (XOF) with 128-bit security.
Definition: SHAKE.h:52
+
SHAKE(size_t capacity)
Constructs a SHAKE object.
Definition: SHAKE.cpp:40
+
size_t blockSize() const
Size of the internal block used by the XOF algorithm, in bytes.
Definition: SHAKE.cpp:53
+
SHAKE128()
Constructs a SHAKE object with 128-bit security.
Definition: SHAKE.h:55
+
virtual ~SHAKE()
Destroys this SHAKE object after clearing all sensitive information.
Definition: SHAKE.cpp:49
+
SHAKE Extendable-Output Function (XOF) with 256-bit security.
Definition: SHAKE.h:59
+
virtual ~SHAKE128()
Destroys this SHAKE128 object after clearing all sensitive information.
Definition: SHAKE.cpp:113
+
void reset()
Resets the XOF ready for a new session.
Definition: SHAKE.cpp:58
+
Abstract base class for the SHAKE Extendable-Output Functions (XOFs).
Definition: SHAKE.h:29
+
void update(const void *data, size_t len)
Updates the XOF with more data.
Definition: SHAKE.cpp:64
+
Keccak core sponge function.
Definition: KeccakCore.h:29
+
void extend(uint8_t *data, size_t len)
Generates extendable output from this XOF.
Definition: SHAKE.cpp:71
+
void clear()
Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session...
Definition: SHAKE.cpp:89
+
+ + + + diff --git a/SoftI2C_8cpp_source.html b/SoftI2C_8cpp_source.html index 3d4035ab..b32996b9 100644 --- a/SoftI2C_8cpp_source.html +++ b/SoftI2C_8cpp_source.html @@ -283,7 +283,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SoftI2C_8h_source.html b/SoftI2C_8h_source.html index 4f74eeb2..c9400a6a 100644 --- a/SoftI2C_8h_source.html +++ b/SoftI2C_8h_source.html @@ -157,7 +157,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SpeckSmall_8cpp_source.html b/SpeckSmall_8cpp_source.html index 56a1e019..415c2700 100644 --- a/SpeckSmall_8cpp_source.html +++ b/SpeckSmall_8cpp_source.html @@ -715,7 +715,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SpeckSmall_8h_source.html b/SpeckSmall_8h_source.html index 79e60a7f..f446d2fb 100644 --- a/SpeckSmall_8h_source.html +++ b/SpeckSmall_8h_source.html @@ -141,7 +141,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SpeckTiny_8cpp_source.html b/SpeckTiny_8cpp_source.html index 01dd2d74..076a7bb9 100644 --- a/SpeckTiny_8cpp_source.html +++ b/SpeckTiny_8cpp_source.html @@ -596,7 +596,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/SpeckTiny_8h_source.html b/SpeckTiny_8h_source.html index b1fb4234..863a8d30 100644 --- a/SpeckTiny_8h_source.html +++ b/SpeckTiny_8h_source.html @@ -154,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Speck_8cpp_source.html b/Speck_8cpp_source.html index d2cd8f75..a42c6f37 100644 --- a/Speck_8cpp_source.html +++ b/Speck_8cpp_source.html @@ -679,7 +679,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/Speck_8h_source.html b/Speck_8h_source.html index aa9965f4..6670eed1 100644 --- a/Speck_8h_source.html +++ b/Speck_8h_source.html @@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/TextField_8cpp_source.html b/TextField_8cpp_source.html index 62dddd57..08f4bfd4 100644 --- a/TextField_8cpp_source.html +++ b/TextField_8cpp_source.html @@ -156,7 +156,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/TextField_8h_source.html b/TextField_8h_source.html index 72bd5200..9e73aa37 100644 --- a/TextField_8h_source.html +++ b/TextField_8h_source.html @@ -142,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/TimeField_8cpp_source.html b/TimeField_8cpp_source.html index 4d460835..f9c16e52 100644 --- a/TimeField_8cpp_source.html +++ b/TimeField_8cpp_source.html @@ -325,7 +325,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/TimeField_8h_source.html b/TimeField_8h_source.html index 147c312e..d67871c3 100644 --- a/TimeField_8h_source.html +++ b/TimeField_8h_source.html @@ -167,7 +167,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/TransistorNoiseSource_8cpp_source.html b/TransistorNoiseSource_8cpp_source.html index eff79077..521adee1 100644 --- a/TransistorNoiseSource_8cpp_source.html +++ b/TransistorNoiseSource_8cpp_source.html @@ -295,7 +295,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/TransistorNoiseSource_8h_source.html b/TransistorNoiseSource_8h_source.html index e11728fe..92bafb99 100644 --- a/TransistorNoiseSource_8h_source.html +++ b/TransistorNoiseSource_8h_source.html @@ -151,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/XOF_8cpp_source.html b/XOF_8cpp_source.html new file mode 100644 index 00000000..ddc496ee --- /dev/null +++ b/XOF_8cpp_source.html @@ -0,0 +1,133 @@ + + + + + + +ArduinoLibs: XOF.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
XOF.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2016 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #include "XOF.h"
+
24 
+ +
123 {
+
124 }
+
125 
+ +
135 {
+
136 }
+
137 
+
virtual ~XOF()
Destroys this XOF object.
Definition: XOF.cpp:134
+
XOF()
Constructs a new XOF object.
Definition: XOF.cpp:122
+
+ + + + diff --git a/XOF_8h_source.html b/XOF_8h_source.html new file mode 100644 index 00000000..9f663a5a --- /dev/null +++ b/XOF_8h_source.html @@ -0,0 +1,160 @@ + + + + + + +ArduinoLibs: XOF.h Source File + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
+ + +
+ +
+ + +
+
+
+
XOF.h
+
+
+
1 /*
+
2  * Copyright (C) 2016 Southern Storm Software, Pty Ltd.
+
3  *
+
4  * Permission is hereby granted, free of charge, to any person obtaining a
+
5  * copy of this software and associated documentation files (the "Software"),
+
6  * to deal in the Software without restriction, including without limitation
+
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+
8  * and/or sell copies of the Software, and to permit persons to whom the
+
9  * Software is furnished to do so, subject to the following conditions:
+
10  *
+
11  * The above copyright notice and this permission notice shall be included
+
12  * in all copies or substantial portions of the Software.
+
13  *
+
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+
20  * DEALINGS IN THE SOFTWARE.
+
21  */
+
22 
+
23 #ifndef CRYPTO_XOF_h
+
24 #define CRYPTO_XOF_h
+
25 
+
26 #include <inttypes.h>
+
27 #include <stddef.h>
+
28 
+
29 class XOF
+
30 {
+
31 public:
+
32  XOF();
+
33  virtual ~XOF();
+
34 
+
35  virtual size_t blockSize() const = 0;
+
36 
+
37  virtual void reset() = 0;
+
38  virtual void update(const void *data, size_t len) = 0;
+
39 
+
40  virtual void extend(uint8_t *data, size_t len) = 0;
+
41  virtual void encrypt(uint8_t *output, const uint8_t *input, size_t len) = 0;
+
42 
+
43  inline void decrypt(uint8_t *output, const uint8_t *input, size_t len)
+
44  {
+
45  encrypt(output, input, len);
+
46  }
+
47 
+
48  virtual void clear() = 0;
+
49 };
+
50 
+
51 #endif
+
virtual void encrypt(uint8_t *output, const uint8_t *input, size_t len)=0
Encrypts an input buffer with extendable output from this XOF.
+
Abstract base class for Extendable-Output Functions (XOFs).
Definition: XOF.h:29
+
virtual void extend(uint8_t *data, size_t len)=0
Generates extendable output from this XOF.
+
virtual void clear()=0
Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session...
+
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer with extendable output from this XOF.
Definition: XOF.h:43
+
virtual ~XOF()
Destroys this XOF object.
Definition: XOF.cpp:134
+
virtual size_t blockSize() const =0
Size of the internal block used by the XOF algorithm, in bytes.
+
virtual void reset()=0
Resets the XOF ready for a new session.
+
XOF()
Constructs a new XOF object.
Definition: XOF.cpp:122
+
virtual void update(const void *data, size_t len)=0
Updates the XOF with more data.
+
+ + + + diff --git a/alarm-clock_8dox.html b/alarm-clock_8dox.html index 43c4f330..7153edb2 100644 --- a/alarm-clock_8dox.html +++ b/alarm-clock_8dox.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/alarm_clock.html b/alarm_clock.html index 3478c8d0..2d20618b 100644 --- a/alarm_clock.html +++ b/alarm_clock.html @@ -140,7 +140,7 @@ Completed Clock diff --git a/annotated.html b/annotated.html index c0eba14c..3e51796e 100644 --- a/annotated.html +++ b/annotated.html @@ -150,19 +150,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); oCSHA3_256SHA3-256 hash algorithm oCSHA3_512SHA3-512 hash algorithm oCSHA512SHA-512 hash algorithm -oCSoftI2CBit-banged implementation of an I2C master -oCSpeckSpeck block cipher with a 128-bit block size -oCSpeckSmallSpeck block cipher with a 128-bit block size (small-memory version) -oCSpeckTinySpeck block cipher with a 128-bit block size (tiny-memory version) -oCTextFieldField that displays a read-only text value -oCTimeFieldField that manages the display and editing of a time value -\CTransistorNoiseSourceProcesses the signal from a transistor-based noise source +oCSHAKEAbstract base class for the SHAKE Extendable-Output Functions (XOFs) +oCSHAKE128SHAKE Extendable-Output Function (XOF) with 128-bit security +oCSHAKE256SHAKE Extendable-Output Function (XOF) with 256-bit security +oCSoftI2CBit-banged implementation of an I2C master +oCSpeckSpeck block cipher with a 128-bit block size +oCSpeckSmallSpeck block cipher with a 128-bit block size (small-memory version) +oCSpeckTinySpeck block cipher with a 128-bit block size (tiny-memory version) +oCTextFieldField that displays a read-only text value +oCTimeFieldField that manages the display and editing of a time value +oCTransistorNoiseSourceProcesses the signal from a transistor-based noise source +\CXOFAbstract base class for Extendable-Output Functions (XOFs) diff --git a/blink-blink_8dox.html b/blink-blink_8dox.html index 53408895..5064b112 100644 --- a/blink-blink_8dox.html +++ b/blink-blink_8dox.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/blink-charlieplex_8dox.html b/blink-charlieplex_8dox.html index 8f6b972b..301f26f4 100644 --- a/blink-charlieplex_8dox.html +++ b/blink-charlieplex_8dox.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/blink-cylon_8dox.html b/blink-cylon_8dox.html index 848c3eeb..539f09fc 100644 --- a/blink-cylon_8dox.html +++ b/blink-cylon_8dox.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/blink-startrek_8dox.html b/blink-startrek_8dox.html index 535fb047..ac24f4a0 100644 --- a/blink-startrek_8dox.html +++ b/blink-startrek_8dox.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/blink_blink.html b/blink_blink.html index 215aec08..4ad447d6 100644 --- a/blink_blink.html +++ b/blink_blink.html @@ -120,7 +120,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/blink_charlieplex.html b/blink_charlieplex.html index 466fadd3..520bfb26 100644 --- a/blink_charlieplex.html +++ b/blink_charlieplex.html @@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/blink_cylon.html b/blink_cylon.html index e54cc09c..e27d42db 100644 --- a/blink_cylon.html +++ b/blink_cylon.html @@ -171,7 +171,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/blink_startrek.html b/blink_startrek.html index d4f46124..30917198 100644 --- a/blink_startrek.html +++ b/blink_startrek.html @@ -237,7 +237,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classAES128-members.html b/classAES128-members.html index 0ca1fa7b..ecbde67a 100644 --- a/classAES128-members.html +++ b/classAES128-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classAES128.html b/classAES128.html index d37d2f72..2930386e 100644 --- a/classAES128.html +++ b/classAES128.html @@ -265,7 +265,7 @@ Additional Inherited Members diff --git a/classAES192-members.html b/classAES192-members.html index d7d7ec13..81066c83 100644 --- a/classAES192-members.html +++ b/classAES192-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classAES192.html b/classAES192.html index 1bca45bd..a57791cb 100644 --- a/classAES192.html +++ b/classAES192.html @@ -265,7 +265,7 @@ Additional Inherited Members diff --git a/classAES256-members.html b/classAES256-members.html index 377ab5c9..cdfabf9d 100644 --- a/classAES256-members.html +++ b/classAES256-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classAES256.html b/classAES256.html index 10e08ae5..40315c90 100644 --- a/classAES256.html +++ b/classAES256.html @@ -265,7 +265,7 @@ Additional Inherited Members diff --git a/classAESCommon-members.html b/classAESCommon-members.html index 9caa52ee..64627d10 100644 --- a/classAESCommon-members.html +++ b/classAESCommon-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classAESCommon.html b/classAESCommon.html index 1fde19ee..ddfc8ef3 100644 --- a/classAESCommon.html +++ b/classAESCommon.html @@ -322,7 +322,7 @@ Protected Member Functions diff --git a/classAuthenticatedCipher-members.html b/classAuthenticatedCipher-members.html index 9bfb9467..7671c541 100644 --- a/classAuthenticatedCipher-members.html +++ b/classAuthenticatedCipher-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classAuthenticatedCipher.html b/classAuthenticatedCipher.html index b52cd756..02aa9d10 100644 --- a/classAuthenticatedCipher.html +++ b/classAuthenticatedCipher.html @@ -351,7 +351,7 @@ virtual  diff --git a/classBLAKE2b-members.html b/classBLAKE2b-members.html index 3f6be4e3..8d526c9b 100644 --- a/classBLAKE2b-members.html +++ b/classBLAKE2b-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBLAKE2b.html b/classBLAKE2b.html index 3cbd0da8..fed962ea 100644 --- a/classBLAKE2b.html +++ b/classBLAKE2b.html @@ -536,7 +536,7 @@ Additional Inherited Members diff --git a/classBLAKE2s-members.html b/classBLAKE2s-members.html index 274443f0..7e3c18bc 100644 --- a/classBLAKE2s-members.html +++ b/classBLAKE2s-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBLAKE2s.html b/classBLAKE2s.html index 7e84f7f0..290299ee 100644 --- a/classBLAKE2s.html +++ b/classBLAKE2s.html @@ -536,7 +536,7 @@ Additional Inherited Members diff --git a/classBigNumberUtil-members.html b/classBigNumberUtil-members.html index 2765ffa1..1b36e6a0 100644 --- a/classBigNumberUtil-members.html +++ b/classBigNumberUtil-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBigNumberUtil.html b/classBigNumberUtil.html index 5b04eef6..6d74cfe5 100644 --- a/classBigNumberUtil.html +++ b/classBigNumberUtil.html @@ -893,7 +893,7 @@ Static Public Member Functions diff --git a/classBitmap-members.html b/classBitmap-members.html index 8eaf9ab0..d2d70a8a 100644 --- a/classBitmap-members.html +++ b/classBitmap-members.html @@ -138,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBitmap.html b/classBitmap.html index a1e7a2b6..0218e4b9 100644 --- a/classBitmap.html +++ b/classBitmap.html @@ -1745,7 +1745,7 @@ class DMD diff --git a/classBlinkLED-members.html b/classBlinkLED-members.html index 1524e861..73c45ada 100644 --- a/classBlinkLED-members.html +++ b/classBlinkLED-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBlinkLED.html b/classBlinkLED.html index 96ea8da6..d7890daa 100644 --- a/classBlinkLED.html +++ b/classBlinkLED.html @@ -428,7 +428,7 @@ Public Member Functions diff --git a/classBlockCipher-members.html b/classBlockCipher-members.html index 6fca229b..c94f2f8d 100644 --- a/classBlockCipher-members.html +++ b/classBlockCipher-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBlockCipher.html b/classBlockCipher.html index 27628c5f..28400230 100644 --- a/classBlockCipher.html +++ b/classBlockCipher.html @@ -410,7 +410,7 @@ Public Member Functions diff --git a/classBoolField-members.html b/classBoolField-members.html index c8b5b0cc..c5f1943e 100644 --- a/classBoolField-members.html +++ b/classBoolField-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classBoolField.html b/classBoolField.html index 3213fa3e..c748a93e 100644 --- a/classBoolField.html +++ b/classBoolField.html @@ -506,7 +506,7 @@ LiquidCrystal *  diff --git a/classCBC-members.html b/classCBC-members.html index a450fb3d..b3e182dd 100644 --- a/classCBC-members.html +++ b/classCBC-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCBC.html b/classCBC.html index 402d9879..8b4c3c34 100644 --- a/classCBC.html +++ b/classCBC.html @@ -185,7 +185,7 @@ class CBC< T > diff --git a/classCBCCommon-members.html b/classCBCCommon-members.html index c086ca11..4d223d6a 100644 --- a/classCBCCommon-members.html +++ b/classCBCCommon-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCBCCommon.html b/classCBCCommon.html index 00dfc5c4..31aa8517 100644 --- a/classCBCCommon.html +++ b/classCBCCommon.html @@ -534,7 +534,7 @@ Protected Member Functions diff --git a/classCFB-members.html b/classCFB-members.html index 5fc9fc04..cded73a3 100644 --- a/classCFB-members.html +++ b/classCFB-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCFB.html b/classCFB.html index b44a4f87..70095d96 100644 --- a/classCFB.html +++ b/classCFB.html @@ -185,7 +185,7 @@ class CFB< T > diff --git a/classCFBCommon-members.html b/classCFBCommon-members.html index 6791ad17..921f63b0 100644 --- a/classCFBCommon-members.html +++ b/classCFBCommon-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCFBCommon.html b/classCFBCommon.html index f113b1be..6da56d9f 100644 --- a/classCFBCommon.html +++ b/classCFBCommon.html @@ -534,7 +534,7 @@ Protected Member Functions diff --git a/classCTR-members.html b/classCTR-members.html index 38786795..964730ef 100644 --- a/classCTR-members.html +++ b/classCTR-members.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCTR.html b/classCTR.html index 3cf53fdd..9f8c6c44 100644 --- a/classCTR.html +++ b/classCTR.html @@ -181,7 +181,7 @@ class CTR< T > diff --git a/classCTRCommon-members.html b/classCTRCommon-members.html index f3aad020..54b24c78 100644 --- a/classCTRCommon-members.html +++ b/classCTRCommon-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCTRCommon.html b/classCTRCommon.html index 52a6a84b..f916ad98 100644 --- a/classCTRCommon.html +++ b/classCTRCommon.html @@ -563,7 +563,7 @@ Protected Member Functions diff --git a/classChaCha-members.html b/classChaCha-members.html index 3d1a2bf7..31cf89ab 100644 --- a/classChaCha-members.html +++ b/classChaCha-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classChaCha.html b/classChaCha.html index 3d696e58..f229112c 100644 --- a/classChaCha.html +++ b/classChaCha.html @@ -673,7 +673,7 @@ class ChaChaPoly< diff --git a/classChaChaPoly-members.html b/classChaChaPoly-members.html index ce6eac98..17dd4a17 100644 --- a/classChaChaPoly-members.html +++ b/classChaChaPoly-members.html @@ -115,7 +115,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classChaChaPoly.html b/classChaChaPoly.html index b4248daf..8959eb9c 100644 --- a/classChaChaPoly.html +++ b/classChaChaPoly.html @@ -665,7 +665,7 @@ virtual  diff --git a/classCharlieplex-members.html b/classCharlieplex-members.html index 56e74985..85146d57 100644 --- a/classCharlieplex-members.html +++ b/classCharlieplex-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCharlieplex.html b/classCharlieplex.html index e3520419..132fbd7e 100644 --- a/classCharlieplex.html +++ b/classCharlieplex.html @@ -538,7 +538,7 @@ Public Member Functions diff --git a/classChaseLEDs-members.html b/classChaseLEDs-members.html index 6491dc8a..c7576a28 100644 --- a/classChaseLEDs-members.html +++ b/classChaseLEDs-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classChaseLEDs.html b/classChaseLEDs.html index 0824fb6e..f042feb1 100644 --- a/classChaseLEDs.html +++ b/classChaseLEDs.html @@ -347,7 +347,7 @@ Protected Member Functions diff --git a/classCipher-members.html b/classCipher-members.html index b3622585..39216f4c 100644 --- a/classCipher-members.html +++ b/classCipher-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCipher.html b/classCipher.html index c2a392cc..a0d8ff0b 100644 --- a/classCipher.html +++ b/classCipher.html @@ -485,7 +485,7 @@ Public Member Functions diff --git a/classCurve25519-members.html b/classCurve25519-members.html index 2e935a92..dc8537fd 100644 --- a/classCurve25519-members.html +++ b/classCurve25519-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classCurve25519.html b/classCurve25519.html index 0ffaf0dc..f9f60cec 100644 --- a/classCurve25519.html +++ b/classCurve25519.html @@ -303,7 +303,7 @@ class Ed25519 diff --git a/classDMD-members.html b/classDMD-members.html index ee65f53d..388483e2 100644 --- a/classDMD-members.html +++ b/classDMD-members.html @@ -150,7 +150,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classDMD.html b/classDMD.html index 0c379658..861e8dd9 100644 --- a/classDMD.html +++ b/classDMD.html @@ -755,7 +755,7 @@ Multiple panels diff --git a/classDS1307RTC-members.html b/classDS1307RTC-members.html index e891b96b..0a486b9c 100644 --- a/classDS1307RTC-members.html +++ b/classDS1307RTC-members.html @@ -125,7 +125,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classDS1307RTC.html b/classDS1307RTC.html index cc3f7885..0d140318 100644 --- a/classDS1307RTC.html +++ b/classDS1307RTC.html @@ -598,7 +598,7 @@ static const uint8_t  diff --git a/classDS3231RTC-members.html b/classDS3231RTC-members.html index 817940e4..a75bc028 100644 --- a/classDS3231RTC-members.html +++ b/classDS3231RTC-members.html @@ -133,7 +133,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classDS3231RTC.html b/classDS3231RTC.html index b24e5177..bb29e05a 100644 --- a/classDS3231RTC.html +++ b/classDS3231RTC.html @@ -713,7 +713,7 @@ static const uint8_t  diff --git a/classDS3232RTC-members.html b/classDS3232RTC-members.html index d8e10001..e8b61480 100644 --- a/classDS3232RTC-members.html +++ b/classDS3232RTC-members.html @@ -130,7 +130,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classDS3232RTC.html b/classDS3232RTC.html index f833450b..39fbb0bb 100644 --- a/classDS3232RTC.html +++ b/classDS3232RTC.html @@ -750,7 +750,7 @@ static const uint8_t  diff --git a/classEAX-members.html b/classEAX-members.html index c00ff04d..f4733323 100644 --- a/classEAX-members.html +++ b/classEAX-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classEAX.html b/classEAX.html index d03178f0..c238e555 100644 --- a/classEAX.html +++ b/classEAX.html @@ -219,7 +219,7 @@ class EAX< T > diff --git a/classEAXCommon-members.html b/classEAXCommon-members.html index 1bbc02bb..df199839 100644 --- a/classEAXCommon-members.html +++ b/classEAXCommon-members.html @@ -117,7 +117,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classEAXCommon.html b/classEAXCommon.html index f2040263..e42bc250 100644 --- a/classEAXCommon.html +++ b/classEAXCommon.html @@ -732,7 +732,7 @@ Protected Member Functions diff --git a/classEEPROM24-members.html b/classEEPROM24-members.html index 3c6c4c78..6bf6f1cf 100644 --- a/classEEPROM24-members.html +++ b/classEEPROM24-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classEEPROM24.html b/classEEPROM24.html index ca86dd13..a7037f5f 100644 --- a/classEEPROM24.html +++ b/classEEPROM24.html @@ -431,7 +431,7 @@ Public Member Functions diff --git a/classEd25519-members.html b/classEd25519-members.html index 30b796d4..42b97c09 100644 --- a/classEd25519-members.html +++ b/classEd25519-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classEd25519.html b/classEd25519.html index f62d9b9f..b8883fd3 100644 --- a/classEd25519.html +++ b/classEd25519.html @@ -354,7 +354,7 @@ Static Public Member Functions diff --git a/classField-members.html b/classField-members.html index 4a83a3d9..dbad2b99 100644 --- a/classField-members.html +++ b/classField-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classField.html b/classField.html index f73046ca..86f28f64 100644 --- a/classField.html +++ b/classField.html @@ -424,7 +424,7 @@ class Form diff --git a/classForm-members.html b/classForm-members.html index eceed3f3..754348bc 100644 --- a/classForm-members.html +++ b/classForm-members.html @@ -108,7 +108,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classForm.html b/classForm.html index 6ec3a2c0..90abf05c 100644 --- a/classForm.html +++ b/classForm.html @@ -485,7 +485,7 @@ class Field diff --git a/classGCM-members.html b/classGCM-members.html index 35b8dcac..63f633bd 100644 --- a/classGCM-members.html +++ b/classGCM-members.html @@ -119,7 +119,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classGCM.html b/classGCM.html index db9b29c7..a2486999 100644 --- a/classGCM.html +++ b/classGCM.html @@ -223,7 +223,7 @@ class GCM< T > diff --git a/classGCMCommon-members.html b/classGCMCommon-members.html index 1e2a7f12..83267bce 100644 --- a/classGCMCommon-members.html +++ b/classGCMCommon-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classGCMCommon.html b/classGCMCommon.html index f1b7e52f..2f013848 100644 --- a/classGCMCommon.html +++ b/classGCMCommon.html @@ -736,7 +736,7 @@ Protected Member Functions diff --git a/classGF128-members.html b/classGF128-members.html index 7cb50fa6..a448bc82 100644 --- a/classGF128-members.html +++ b/classGF128-members.html @@ -97,7 +97,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classGF128.html b/classGF128.html index 29546349..ff5e4173 100644 --- a/classGF128.html +++ b/classGF128.html @@ -294,7 +294,7 @@ Static Public Member Functions diff --git a/classGHASH-members.html b/classGHASH-members.html index f640f4eb..8db2fd3c 100644 --- a/classGHASH-members.html +++ b/classGHASH-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classGHASH.html b/classGHASH.html index e794dc76..31092f95 100644 --- a/classGHASH.html +++ b/classGHASH.html @@ -265,7 +265,7 @@ void  diff --git a/classHash-members.html b/classHash-members.html index 86861ba9..be4e3c38 100644 --- a/classHash-members.html +++ b/classHash-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classHash.html b/classHash.html index 1ef7af6b..3686e4bd 100644 --- a/classHash.html +++ b/classHash.html @@ -575,7 +575,7 @@ Protected Member Functions diff --git a/classI2CMaster-members.html b/classI2CMaster-members.html index c9cb007c..cbcabfc4 100644 --- a/classI2CMaster-members.html +++ b/classI2CMaster-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classI2CMaster.html b/classI2CMaster.html index be8bd12b..3c062fd5 100644 --- a/classI2CMaster.html +++ b/classI2CMaster.html @@ -328,7 +328,7 @@ virtual unsigned int  diff --git a/classIRreceiver-members.html b/classIRreceiver-members.html index c460f746..f06f9e50 100644 --- a/classIRreceiver-members.html +++ b/classIRreceiver-members.html @@ -100,7 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classIRreceiver.html b/classIRreceiver.html index 043a3c33..5686d8bd 100644 --- a/classIRreceiver.html +++ b/classIRreceiver.html @@ -328,7 +328,7 @@ void _IR_receive_interrupt diff --git a/classIntField-members.html b/classIntField-members.html index 3eb63123..785c1cc6 100644 --- a/classIntField-members.html +++ b/classIntField-members.html @@ -118,7 +118,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classIntField.html b/classIntField.html index 866e6396..355bcf63 100644 --- a/classIntField.html +++ b/classIntField.html @@ -647,7 +647,7 @@ LiquidCrystal *  diff --git a/classKeccakCore-members.html b/classKeccakCore-members.html index af4fa075..2e4f664e 100644 --- a/classKeccakCore-members.html +++ b/classKeccakCore-members.html @@ -94,20 +94,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); blockSize() const KeccakCoreinline capacity() const KeccakCore clear()KeccakCore - extract(void *data, size_t size)KeccakCore - inputSize (defined in KeccakCore)KeccakCore - KeccakCore()KeccakCore - outputSize (defined in KeccakCore)KeccakCore - pad(uint8_t tag)KeccakCore - reset()KeccakCore - setCapacity(size_t capacity)KeccakCore - setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)KeccakCore - update(const void *data, size_t size)KeccakCore - ~KeccakCore()KeccakCore + encrypt(void *output, const void *input, size_t size)KeccakCore + extract(void *data, size_t size)KeccakCore + inputSize (defined in KeccakCore)KeccakCore + KeccakCore()KeccakCore + outputSize (defined in KeccakCore)KeccakCore + pad(uint8_t tag)KeccakCore + reset()KeccakCore + setCapacity(size_t capacity)KeccakCore + setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)KeccakCore + update(const void *data, size_t size)KeccakCore + ~KeccakCore()KeccakCore diff --git a/classKeccakCore.html b/classKeccakCore.html index db1ce0ff..4f963e96 100644 --- a/classKeccakCore.html +++ b/classKeccakCore.html @@ -126,6 +126,9 @@ Public Member Functions void extract (void *data, size_t size)  Extracts data from the Keccak sponge function. More...
  +void encrypt (void *output, const void *input, size_t size) + Extracts data from the Keccak sponge function and uses it to encrypt a buffer. More...
void clear ()  Clears all sensitive data from this object.
@@ -136,9 +139,9 @@ void 

Detailed Description

Keccak core sponge function.

-

KeccakCore provides the core sponge function for different capacities. It is used to implement Hash algorithms such as SHA3.

+

KeccakCore provides the core sponge function for different capacities. It is used to implement algorithms such as SHA3 and SHAKE.

References: http://en.wikipedia.org/wiki/SHA-3

-
See Also
SHA3
+
See Also
SHA3_256, SHAKE256

Definition at line 29 of file KeccakCore.h.

Constructor & Destructor Documentation

@@ -210,6 +213,53 @@ void 76 of file KeccakCore.cpp.

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void KeccakCore::encrypt (void * output,
const void * input,
size_t size 
)
+
+ +

Extracts data from the Keccak sponge function and uses it to encrypt a buffer.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
sizeThe number of bytes to encrypt.
+
+
+

This function extracts data from the sponge function and then XOR's it with input to generate the output.

+

If more than blockSize() bytes are required, the sponge function will be invoked to generate additional data.

+
See Also
update(), reset(), extract()
+ +

Definition at line 240 of file KeccakCore.cpp.

+
@@ -245,7 +295,7 @@ void blockSize() bytes are required, the sponge function will be invoked to generate additional data.

-
See Also
update(), reset(), extractHash()
+
See Also
update(), reset(), encrypt()

Definition at line 194 of file KeccakCore.cpp.

@@ -268,7 +318,7 @@ void blockSize().

Parameters
- +
tagThe tag byte to add to the padding to identify SHA3 (0x06), SHAKE (0x1F), or the plain pre-standardized version of Keccak (0x01).
tagThe tag byte to add to the padding to identify SHA3 (0x06), SHAKE (0x1F), or the plain pre-standardized version of Keccak (0x01).
@@ -375,7 +425,7 @@ void Hash::resetHMAC() and Hash::finalizeHMAC() by directly formatting the HMAC key into the internal block buffer and resetting the hash.

-

Definition at line 243 of file KeccakCore.cpp.

+

Definition at line 293 of file KeccakCore.cpp.

@@ -425,7 +475,7 @@ void  diff --git a/classLCD-members.html b/classLCD-members.html index 0d3d1abe..bae32cad 100644 --- a/classLCD-members.html +++ b/classLCD-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classLCD.html b/classLCD.html index c3d24d50..5b14b0d1 100644 --- a/classLCD.html +++ b/classLCD.html @@ -592,7 +592,7 @@ Support for DFRobot LCD Shield diff --git a/classListField-members.html b/classListField-members.html index a9fb0110..fd5ffbe4 100644 --- a/classListField-members.html +++ b/classListField-members.html @@ -111,7 +111,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classListField.html b/classListField.html index 57c418d2..412b3db7 100644 --- a/classListField.html +++ b/classListField.html @@ -411,7 +411,7 @@ LiquidCrystal *  diff --git a/classMelody-members.html b/classMelody-members.html index 43024971..6051a8ae 100644 --- a/classMelody-members.html +++ b/classMelody-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classMelody.html b/classMelody.html index b60c2c85..d2306d86 100644 --- a/classMelody.html +++ b/classMelody.html @@ -371,7 +371,7 @@ bool  diff --git a/classNoiseSource-members.html b/classNoiseSource-members.html index 9bbefa21..224a8cac 100644 --- a/classNoiseSource-members.html +++ b/classNoiseSource-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classNoiseSource.html b/classNoiseSource.html index 4c7a3b71..a9d47187 100644 --- a/classNoiseSource.html +++ b/classNoiseSource.html @@ -289,7 +289,7 @@ Protected Member Functions diff --git a/classOFB-members.html b/classOFB-members.html index 15a84b4a..57cbb6e8 100644 --- a/classOFB-members.html +++ b/classOFB-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classOFB.html b/classOFB.html index ff24272b..310310c8 100644 --- a/classOFB.html +++ b/classOFB.html @@ -181,7 +181,7 @@ class OFB< T > diff --git a/classOFBCommon-members.html b/classOFBCommon-members.html index ef349868..82c09443 100644 --- a/classOFBCommon-members.html +++ b/classOFBCommon-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classOFBCommon.html b/classOFBCommon.html index 96250eba..3cfde373 100644 --- a/classOFBCommon.html +++ b/classOFBCommon.html @@ -534,7 +534,7 @@ Protected Member Functions diff --git a/classOMAC-members.html b/classOMAC-members.html index 5746ee59..f1c03598 100644 --- a/classOMAC-members.html +++ b/classOMAC-members.html @@ -102,7 +102,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classOMAC.html b/classOMAC.html index eccbff05..6ce18944 100644 --- a/classOMAC.html +++ b/classOMAC.html @@ -387,7 +387,7 @@ void  diff --git a/classPoly1305-members.html b/classPoly1305-members.html index 57742282..383e8ec1 100644 --- a/classPoly1305-members.html +++ b/classPoly1305-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classPoly1305.html b/classPoly1305.html index 9ff7db36..ff3064c0 100644 --- a/classPoly1305.html +++ b/classPoly1305.html @@ -280,7 +280,7 @@ void  diff --git a/classRNGClass-members.html b/classRNGClass-members.html index 25aac167..be8c23bd 100644 --- a/classRNGClass-members.html +++ b/classRNGClass-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classRNGClass.html b/classRNGClass.html index 9463bbc5..cb51a1b8 100644 --- a/classRNGClass.html +++ b/classRNGClass.html @@ -519,7 +519,7 @@ static const int  diff --git a/classRTC-members.html b/classRTC-members.html index 9bea3903..728c18d4 100644 --- a/classRTC-members.html +++ b/classRTC-members.html @@ -123,7 +123,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classRTC.html b/classRTC.html index 11e8e717..6742ccbd 100644 --- a/classRTC.html +++ b/classRTC.html @@ -779,7 +779,7 @@ static const uint8_t  diff --git a/classRTCAlarm-members.html b/classRTCAlarm-members.html index f53d2202..0b17e03b 100644 --- a/classRTCAlarm-members.html +++ b/classRTCAlarm-members.html @@ -99,7 +99,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classRTCDate-members.html b/classRTCDate-members.html index c701321f..37edb5b8 100644 --- a/classRTCDate-members.html +++ b/classRTCDate-members.html @@ -96,7 +96,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classRTCTime-members.html b/classRTCTime-members.html index 0176ec06..8189d95e 100644 --- a/classRTCTime-members.html +++ b/classRTCTime-members.html @@ -96,7 +96,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classRingOscillatorNoiseSource-members.html b/classRingOscillatorNoiseSource-members.html index e76e887b..f365ccaa 100644 --- a/classRingOscillatorNoiseSource-members.html +++ b/classRingOscillatorNoiseSource-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classRingOscillatorNoiseSource.html b/classRingOscillatorNoiseSource.html index 636a9184..22863561 100644 --- a/classRingOscillatorNoiseSource.html +++ b/classRingOscillatorNoiseSource.html @@ -253,7 +253,7 @@ Additional Inherited Members diff --git a/classSHA256-members.html b/classSHA256-members.html index 15c73199..96f1b2f3 100644 --- a/classSHA256-members.html +++ b/classSHA256-members.html @@ -110,7 +110,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSHA256.html b/classSHA256.html index 5c6bc48f..7a5b3277 100644 --- a/classSHA256.html +++ b/classSHA256.html @@ -506,7 +506,7 @@ Additional Inherited Members diff --git a/classSHA3__256-members.html b/classSHA3__256-members.html index 34accb26..f6d84d7e 100644 --- a/classSHA3__256-members.html +++ b/classSHA3__256-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSHA3__256.html b/classSHA3__256.html index ec1c86e8..83bf299d 100644 --- a/classSHA3__256.html +++ b/classSHA3__256.html @@ -506,7 +506,7 @@ Additional Inherited Members diff --git a/classSHA3__512-members.html b/classSHA3__512-members.html index 54ebb20f..93fe539f 100644 --- a/classSHA3__512-members.html +++ b/classSHA3__512-members.html @@ -106,7 +106,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSHA3__512.html b/classSHA3__512.html index af593639..9d91fd99 100644 --- a/classSHA3__512.html +++ b/classSHA3__512.html @@ -506,7 +506,7 @@ Additional Inherited Members diff --git a/classSHA512-members.html b/classSHA512-members.html index 27a3dce0..15b0228c 100644 --- a/classSHA512-members.html +++ b/classSHA512-members.html @@ -112,7 +112,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSHA512.html b/classSHA512.html index 87bde03d..8fd035be 100644 --- a/classSHA512.html +++ b/classSHA512.html @@ -513,7 +513,7 @@ Additional Inherited Members diff --git a/classSHAKE-members.html b/classSHAKE-members.html new file mode 100644 index 00000000..1d808873 --- /dev/null +++ b/classSHAKE-members.html @@ -0,0 +1,112 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
SHAKE Member List
+
+
+ +

This is the complete list of members for SHAKE, including all inherited members.

+ + + + + + + + + + + + +
blockSize() const SHAKEvirtual
clear()SHAKEvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)XOFinline
encrypt(uint8_t *output, const uint8_t *input, size_t len)SHAKEvirtual
extend(uint8_t *data, size_t len)SHAKEvirtual
reset()SHAKEvirtual
SHAKE(size_t capacity)SHAKEprotected
update(const void *data, size_t len)SHAKEvirtual
XOF()XOF
~SHAKE()SHAKEvirtual
~XOF()XOFvirtual
+ + + + diff --git a/classSHAKE.html b/classSHAKE.html new file mode 100644 index 00000000..7e486b19 --- /dev/null +++ b/classSHAKE.html @@ -0,0 +1,451 @@ + + + + + + +ArduinoLibs: SHAKE Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
SHAKE Class Reference
+
+
+ +

Abstract base class for the SHAKE Extendable-Output Functions (XOFs). + More...

+ +

#include <SHAKE.h>

+
+Inheritance diagram for SHAKE:
+
+
+ + +XOF +SHAKE128 +SHAKE256 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual ~SHAKE ()
 Destroys this SHAKE object after clearing all sensitive information.
 
size_t blockSize () const
 Size of the internal block used by the XOF algorithm, in bytes. More...
 
void reset ()
 Resets the XOF ready for a new session. More...
 
void update (const void *data, size_t len)
 Updates the XOF with more data. More...
 
void extend (uint8_t *data, size_t len)
 Generates extendable output from this XOF. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer with extendable output from this XOF. More...
 
void clear ()
 Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session. More...
 
- Public Member Functions inherited from XOF
XOF ()
 Constructs a new XOF object.
 
virtual ~XOF ()
 Destroys this XOF object. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer with extendable output from this XOF. More...
 
+ + + + +

+Protected Member Functions

 SHAKE (size_t capacity)
 Constructs a SHAKE object. More...
 
+

Detailed Description

+

Abstract base class for the SHAKE Extendable-Output Functions (XOFs).

+

Reference: http://en.wikipedia.org/wiki/SHA-3

+
See Also
SHAKE256, SHAKE128, SHA3_256
+ +

Definition at line 29 of file SHAKE.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
SHAKE::SHAKE (size_t capacity)
+
+protected
+
+ +

Constructs a SHAKE object.

+
Parameters
+ + +
capacityThe capacity of the Keccak sponge function in bits which should be a multiple of 64 and between 64 and 1536.
+
+
+ +

Definition at line 40 of file SHAKE.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t SHAKE::blockSize () const
+
+virtual
+
+ +

Size of the internal block used by the XOF algorithm, in bytes.

+
See Also
update()
+ +

Implements XOF.

+ +

Definition at line 53 of file SHAKE.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SHAKE::clear ()
+
+virtual
+
+ +

Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session.

+
See Also
reset()
+ +

Implements XOF.

+ +

Definition at line 89 of file SHAKE.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void SHAKE::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+virtual
+
+ +

Encrypts an input buffer with extendable output from this XOF.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

This function is a convenience that generates data with extend() and then XOR's it with the contents of input to generate the output. This function can also be used to decrypt.

+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
reset(), update(), extend(), decrypt()
+ +

Implements XOF.

+ +

Definition at line 80 of file SHAKE.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SHAKE::extend (uint8_t * data,
size_t len 
)
+
+virtual
+
+ +

Generates extendable output from this XOF.

+
Parameters
+ + + +
dataThe data buffer to be filled.
lenThe number of bytes to write to data.
+
+
+
See Also
reset(), update(), encrypt()
+ +

Implements XOF.

+ +

Definition at line 71 of file SHAKE.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void SHAKE::reset ()
+
+virtual
+
+ +

Resets the XOF ready for a new session.

+
See Also
update(), extend(), encrypt()
+ +

Implements XOF.

+ +

Definition at line 58 of file SHAKE.cpp.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void SHAKE::update (const void * data,
size_t len 
)
+
+virtual
+
+ +

Updates the XOF with more data.

+
Parameters
+ + + +
dataData to be hashed.
lenNumber of bytes of data to be added to the XOF.
+
+
+

If extend() or encrypt() has already been called, then the behavior of update() will be undefined. Call reset() first to start a new session.

+
See Also
reset(), extend(), encrypt()
+ +

Implements XOF.

+ +

Definition at line 64 of file SHAKE.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classSHAKE.png b/classSHAKE.png new file mode 100644 index 00000000..33b0a0aa Binary files /dev/null and b/classSHAKE.png differ diff --git a/classSHAKE128-members.html b/classSHAKE128-members.html new file mode 100644 index 00000000..6c775fac --- /dev/null +++ b/classSHAKE128-members.html @@ -0,0 +1,114 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
SHAKE128 Member List
+
+
+ +

This is the complete list of members for SHAKE128, including all inherited members.

+ + + + + + + + + + + + + + +
blockSize() const SHAKEvirtual
clear()SHAKEvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)XOFinline
encrypt(uint8_t *output, const uint8_t *input, size_t len)SHAKEvirtual
extend(uint8_t *data, size_t len)SHAKEvirtual
reset()SHAKEvirtual
SHAKE(size_t capacity)SHAKEprotected
SHAKE128()SHAKE128inline
update(const void *data, size_t len)SHAKEvirtual
XOF()XOF
~SHAKE()SHAKEvirtual
~SHAKE128()SHAKE128virtual
~XOF()XOFvirtual
+ + + + diff --git a/classSHAKE128.html b/classSHAKE128.html new file mode 100644 index 00000000..7a24f3ee --- /dev/null +++ b/classSHAKE128.html @@ -0,0 +1,179 @@ + + + + + + +ArduinoLibs: SHAKE128 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
SHAKE128 Class Reference
+
+
+ +

SHAKE Extendable-Output Function (XOF) with 128-bit security. + More...

+ +

#include <SHAKE.h>

+
+Inheritance diagram for SHAKE128:
+
+
+ + +SHAKE +XOF + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

SHAKE128 ()
 Constructs a SHAKE object with 128-bit security.
 
+virtual ~SHAKE128 ()
 Destroys this SHAKE128 object after clearing all sensitive information.
 
- Public Member Functions inherited from SHAKE
+virtual ~SHAKE ()
 Destroys this SHAKE object after clearing all sensitive information.
 
size_t blockSize () const
 Size of the internal block used by the XOF algorithm, in bytes. More...
 
void reset ()
 Resets the XOF ready for a new session. More...
 
void update (const void *data, size_t len)
 Updates the XOF with more data. More...
 
void extend (uint8_t *data, size_t len)
 Generates extendable output from this XOF. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer with extendable output from this XOF. More...
 
void clear ()
 Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session. More...
 
- Public Member Functions inherited from XOF
XOF ()
 Constructs a new XOF object.
 
virtual ~XOF ()
 Destroys this XOF object. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer with extendable output from this XOF. More...
 
+ + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from SHAKE
 SHAKE (size_t capacity)
 Constructs a SHAKE object. More...
 
+

Detailed Description

+

SHAKE Extendable-Output Function (XOF) with 128-bit security.

+

Reference: http://en.wikipedia.org/wiki/SHA-3

+
See Also
SHAKE256, SHAKE, SHA3_256
+ +

Definition at line 52 of file SHAKE.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/classSHAKE128.png b/classSHAKE128.png new file mode 100644 index 00000000..2cab697f Binary files /dev/null and b/classSHAKE128.png differ diff --git a/classSHAKE256-members.html b/classSHAKE256-members.html new file mode 100644 index 00000000..1b6c62a9 --- /dev/null +++ b/classSHAKE256-members.html @@ -0,0 +1,114 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
SHAKE256 Member List
+
+
+ +

This is the complete list of members for SHAKE256, including all inherited members.

+ + + + + + + + + + + + + + +
blockSize() const SHAKEvirtual
clear()SHAKEvirtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)XOFinline
encrypt(uint8_t *output, const uint8_t *input, size_t len)SHAKEvirtual
extend(uint8_t *data, size_t len)SHAKEvirtual
reset()SHAKEvirtual
SHAKE(size_t capacity)SHAKEprotected
SHAKE256()SHAKE256inline
update(const void *data, size_t len)SHAKEvirtual
XOF()XOF
~SHAKE()SHAKEvirtual
~SHAKE256()SHAKE256virtual
~XOF()XOFvirtual
+ + + + diff --git a/classSHAKE256.html b/classSHAKE256.html new file mode 100644 index 00000000..7e046eed --- /dev/null +++ b/classSHAKE256.html @@ -0,0 +1,179 @@ + + + + + + +ArduinoLibs: SHAKE256 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
SHAKE256 Class Reference
+
+
+ +

SHAKE Extendable-Output Function (XOF) with 256-bit security. + More...

+ +

#include <SHAKE.h>

+
+Inheritance diagram for SHAKE256:
+
+
+ + +SHAKE +XOF + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

SHAKE256 ()
 Constructs a SHAKE object with 256-bit security.
 
+virtual ~SHAKE256 ()
 Destroys this SHAKE256 object after clearing all sensitive information.
 
- Public Member Functions inherited from SHAKE
+virtual ~SHAKE ()
 Destroys this SHAKE object after clearing all sensitive information.
 
size_t blockSize () const
 Size of the internal block used by the XOF algorithm, in bytes. More...
 
void reset ()
 Resets the XOF ready for a new session. More...
 
void update (const void *data, size_t len)
 Updates the XOF with more data. More...
 
void extend (uint8_t *data, size_t len)
 Generates extendable output from this XOF. More...
 
void encrypt (uint8_t *output, const uint8_t *input, size_t len)
 Encrypts an input buffer with extendable output from this XOF. More...
 
void clear ()
 Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session. More...
 
- Public Member Functions inherited from XOF
XOF ()
 Constructs a new XOF object.
 
virtual ~XOF ()
 Destroys this XOF object. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer with extendable output from this XOF. More...
 
+ + + + + +

+Additional Inherited Members

- Protected Member Functions inherited from SHAKE
 SHAKE (size_t capacity)
 Constructs a SHAKE object. More...
 
+

Detailed Description

+

SHAKE Extendable-Output Function (XOF) with 256-bit security.

+

Reference: http://en.wikipedia.org/wiki/SHA-3

+
See Also
SHAKE128, SHAKE, SHA3_256
+ +

Definition at line 59 of file SHAKE.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/classSHAKE256.png b/classSHAKE256.png new file mode 100644 index 00000000..0ce7e643 Binary files /dev/null and b/classSHAKE256.png differ diff --git a/classSoftI2C-members.html b/classSoftI2C-members.html index 3d934a9d..9d8ab6d3 100644 --- a/classSoftI2C-members.html +++ b/classSoftI2C-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSoftI2C.html b/classSoftI2C.html index a92b1954..108af007 100644 --- a/classSoftI2C.html +++ b/classSoftI2C.html @@ -346,7 +346,7 @@ unsigned int  diff --git a/classSpeck-members.html b/classSpeck-members.html index 857d5e78..b8dd6900 100644 --- a/classSpeck-members.html +++ b/classSpeck-members.html @@ -103,7 +103,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSpeck.html b/classSpeck.html index 911b42e2..badc2d0a 100644 --- a/classSpeck.html +++ b/classSpeck.html @@ -415,7 +415,7 @@ Public Member Functions diff --git a/classSpeckSmall-members.html b/classSpeckSmall-members.html index 6d4bb4ab..6d9c2d53 100644 --- a/classSpeckSmall-members.html +++ b/classSpeckSmall-members.html @@ -105,7 +105,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSpeckSmall.html b/classSpeckSmall.html index 7b3db349..360a6b66 100644 --- a/classSpeckSmall.html +++ b/classSpeckSmall.html @@ -319,7 +319,7 @@ Public Member Functions diff --git a/classSpeckTiny-members.html b/classSpeckTiny-members.html index 1fb51048..8371d3bb 100644 --- a/classSpeckTiny-members.html +++ b/classSpeckTiny-members.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classSpeckTiny.html b/classSpeckTiny.html index 41a1967e..d080ccf6 100644 --- a/classSpeckTiny.html +++ b/classSpeckTiny.html @@ -428,7 +428,7 @@ class SpeckSmall< diff --git a/classTextField-members.html b/classTextField-members.html index aed0bc40..e325f4f6 100644 --- a/classTextField-members.html +++ b/classTextField-members.html @@ -109,7 +109,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classTextField.html b/classTextField.html index 1111e34e..d923e730 100644 --- a/classTextField.html +++ b/classTextField.html @@ -343,7 +343,7 @@ LiquidCrystal *  diff --git a/classTimeField-members.html b/classTimeField-members.html index b34d5ad4..2f3630c8 100644 --- a/classTimeField-members.html +++ b/classTimeField-members.html @@ -113,7 +113,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classTimeField.html b/classTimeField.html index d738c9d1..8b2bb247 100644 --- a/classTimeField.html +++ b/classTimeField.html @@ -541,7 +541,7 @@ LiquidCrystal *  diff --git a/classTransistorNoiseSource-members.html b/classTransistorNoiseSource-members.html index ab2ae22d..98f9e17c 100644 --- a/classTransistorNoiseSource-members.html +++ b/classTransistorNoiseSource-members.html @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/classTransistorNoiseSource.html b/classTransistorNoiseSource.html index 9fc876c4..8ef24f39 100644 --- a/classTransistorNoiseSource.html +++ b/classTransistorNoiseSource.html @@ -280,7 +280,7 @@ Additional Inherited Members diff --git a/classXOF-members.html b/classXOF-members.html new file mode 100644 index 00000000..36f7f8bc --- /dev/null +++ b/classXOF-members.html @@ -0,0 +1,110 @@ + + + + + + +ArduinoLibs: Member List + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
XOF Member List
+
+
+ +

This is the complete list of members for XOF, including all inherited members.

+ + + + + + + + + + +
blockSize() const =0XOFpure virtual
clear()=0XOFpure virtual
decrypt(uint8_t *output, const uint8_t *input, size_t len)XOFinline
encrypt(uint8_t *output, const uint8_t *input, size_t len)=0XOFpure virtual
extend(uint8_t *data, size_t len)=0XOFpure virtual
reset()=0XOFpure virtual
update(const void *data, size_t len)=0XOFpure virtual
XOF()XOF
~XOF()XOFvirtual
+ + + + diff --git a/classXOF.html b/classXOF.html new file mode 100644 index 00000000..779543f4 --- /dev/null +++ b/classXOF.html @@ -0,0 +1,516 @@ + + + + + + +ArduinoLibs: XOF Class Reference + + + + + + + + + +
+
+ + + + + + +
+
ArduinoLibs +
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
XOF Class Referenceabstract
+
+
+ +

Abstract base class for Extendable-Output Functions (XOFs). + More...

+ +

#include <XOF.h>

+
+Inheritance diagram for XOF:
+
+
+ + +SHAKE +SHAKE128 +SHAKE256 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

XOF ()
 Constructs a new XOF object.
 
virtual ~XOF ()
 Destroys this XOF object. More...
 
virtual size_t blockSize () const =0
 Size of the internal block used by the XOF algorithm, in bytes. More...
 
virtual void reset ()=0
 Resets the XOF ready for a new session. More...
 
virtual void update (const void *data, size_t len)=0
 Updates the XOF with more data. More...
 
virtual void extend (uint8_t *data, size_t len)=0
 Generates extendable output from this XOF. More...
 
virtual void encrypt (uint8_t *output, const uint8_t *input, size_t len)=0
 Encrypts an input buffer with extendable output from this XOF. More...
 
void decrypt (uint8_t *output, const uint8_t *input, size_t len)
 Decrypts an input buffer with extendable output from this XOF. More...
 
virtual void clear ()=0
 Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session. More...
 
+

Detailed Description

+

Abstract base class for Extendable-Output Functions (XOFs).

+

Extendable-Output Functions, or XOFs, are a new class of cryptographic primitive that was defined by NIST during the SHA-3 standardization process. Essentially an XOF is a hash algorithm that has an arbitrary-length output instead of a fixed-length digest.

+

XOFs can be used for a variety of cryptographic tasks:

+
    +
  • Mask generation functions for RSA OAEP style padding.
  • +
  • Key derivation functions for expanding key seed material into arbitrary amounts of keying material for a secure session.
  • +
  • Stream ciphers based on a key and IV.
  • +
+

To use an XOF, it is first reset() and then data is added via multiple calls to update():

+
+
xof.reset();
+
xof.update(data1, sizeof(data1));
+
xof.update(data2, sizeof(data2));
+
...
+

Once all input data has been added, the XOF switches into extend mode to generate the arbitrary-length output data:

+
xof.extend(output1, sizeof(output1));
+
xof.extend(output2, sizeof(output2));
+
...
+

Mask generation and key derivation is achieved as follows, where the key is unique for each invocation:

+
+
xof.reset();
+
xof.update(key, sizeof(key));
+
xof.extend(output, sizeof(output));
+

Stream ciphers can be constructed as follows, using the special encrypt() function that XOR's the output of extend() with the input plaintext to generate the output ciphertext (or alternatively XOR's the output of extend() with the ciphertext to recover the plaintext):

+
+
xof.reset();
+
xof.update(key, sizeof(key));
+
xof.update(iv, sizeof(iv));
+
xof.encrypt(output1, input1, sizeof(input1));
+
xof.encrypt(output2, input2, sizeof(input2));
+
...
+

If the key is reused, then the IV must be different for each session or the encryption scheme can be easily broken. It is better to generate a new key and IV combination for every session.

+

It may also be a good idea to include some tag information with the input data to distinguish different uses of the XOF. For example:

+
+
xof.reset();
+
xof.update(key, sizeof(key));
+
xof.update(iv, sizeof(iv));
+
xof.update("MyCrypt", 7);
+
xof.encrypt(output, input, sizeof(input));
+

If the same key and IV was used with a different package, then it would not generate the same output as "MyCrypt".

+

NIST warns that XOFs should not be used in place of hash functions. This is because of related outputs: if the same input is provided to an XOF with different output lengths, then the shorter output will be a prefix of the larger. This breaks the expected collision-resistance of regular hash functions. There is typically no need to use an XOF for hashing because NIST has already defined SHA3_256 and SHA3_512 for that purpose.

+

Reference: http://en.wikipedia.org/wiki/SHA-3

+
See Also
SHAKE256, SHAKE128, SHA3_256
+ +

Definition at line 29 of file XOF.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
XOF::~XOF ()
+
+virtual
+
+ +

Destroys this XOF object.

+
Note
Subclasses are responsible for clearing any sensitive data that remains in the XOF object when it is destroyed.
+
See Also
clear()
+ +

Definition at line 134 of file XOF.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
size_t XOF::blockSize () const
+
+pure virtual
+
+ +

Size of the internal block used by the XOF algorithm, in bytes.

+
See Also
update()
+ +

Implemented in SHAKE.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void XOF::clear ()
+
+pure virtual
+
+ +

Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session.

+
See Also
reset()
+ +

Implemented in SHAKE.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XOF::decrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+inline
+
+ +

Decrypts an input buffer with extendable output from this XOF.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

This is a convenience function that merely calls encrypt().

+
See Also
reset(), update(), extend(), encrypt()
+ +

Definition at line 43 of file XOF.h.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XOF::encrypt (uint8_t * output,
const uint8_t * input,
size_t len 
)
+
+pure virtual
+
+ +

Encrypts an input buffer with extendable output from this XOF.

+
Parameters
+ + + + +
outputThe output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer.
inputThe input buffer to read from.
lenThe number of bytes to encrypt.
+
+
+

This function is a convenience that generates data with extend() and then XOR's it with the contents of input to generate the output. This function can also be used to decrypt.

+

The encrypt() function can be called multiple times with different regions of the plaintext data.

+
See Also
reset(), update(), extend(), decrypt()
+ +

Implemented in SHAKE.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void XOF::extend (uint8_t * data,
size_t len 
)
+
+pure virtual
+
+ +

Generates extendable output from this XOF.

+
Parameters
+ + + +
dataThe data buffer to be filled.
lenThe number of bytes to write to data.
+
+
+
See Also
reset(), update(), encrypt()
+ +

Implemented in SHAKE.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void XOF::reset ()
+
+pure virtual
+
+ +

Resets the XOF ready for a new session.

+
See Also
update(), extend(), encrypt()
+ +

Implemented in SHAKE.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void XOF::update (const void * data,
size_t len 
)
+
+pure virtual
+
+ +

Updates the XOF with more data.

+
Parameters
+ + + +
dataData to be hashed.
lenNumber of bytes of data to be added to the XOF.
+
+
+

If extend() or encrypt() has already been called, then the behavior of update() will be undefined. Call reset() first to start a new session.

+
See Also
reset(), extend(), encrypt()
+ +

Implemented in SHAKE.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/classXOF.png b/classXOF.png new file mode 100644 index 00000000..8f340613 Binary files /dev/null and b/classXOF.png differ diff --git a/classes.html b/classes.html index 3c7c72ad..68408445 100644 --- a/classes.html +++ b/classes.html @@ -87,54 +87,57 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Class Index
-
A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | R | S | T
+
A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | R | S | T | X
- - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + + + +
  A  
-
CFBCommon   
  F  
-
  L  
-
RNGClass   
ChaCha   RTC   
AES128   ChaChaPoly   Field   LCD   RTCAlarm   
AES192   Charlieplex   Form   ListField   RTCDate   
AES256   ChaseLEDs   
  G  
-
  M  
-
RTCTime   
AESCommon   Cipher   
  S  
+
ChaCha   Form   
  M  
+
  S  
AuthenticatedCipher   CTR   GCM   Melody   
ChaChaPoly   
  G  
+
AES128   Charlieplex   Melody   SHA256   
AES192   ChaseLEDs   GCM   
  N  
+
SHA3_256   
AES256   Cipher   GCMCommon   SHA3_512   
AESCommon   CTR   GF128   NoiseSource   SHA512   
AuthenticatedCipher   CTRCommon   GHASH   
  O  
+
SHAKE   
  B  
-
CTRCommon   GCMCommon   
  N  
-
SHA256   
Curve25519   GF128   SHA3_256   
BigNumberUtil   
  D  
-
GHASH   NoiseSource   SHA3_512   
Bitmap   
  H  
-
  O  
-
SHA512   
BLAKE2b   DMD   SoftI2C   
BLAKE2s   DS1307RTC   Hash   OFB   Speck   
BlinkLED   DS3231RTC   
  I  
-
OFBCommon   SpeckSmall   
BlockCipher   DS3232RTC   OMAC   SpeckTiny   
BoolField   
  E  
-
I2CMaster   
  P  
-
  T  
+
Curve25519   
  H  
+
SHAKE128   
  D  
+
OFB   SHAKE256   
BigNumberUtil   Hash   OFBCommon   SoftI2C   
Bitmap   DMD   
  I  
+
OMAC   Speck   
BLAKE2b   DS1307RTC   
  P  
+
SpeckSmall   
BLAKE2s   DS3231RTC   I2CMaster   SpeckTiny   
BlinkLED   DS3232RTC   IntField   Poly1305   
  T  
BlockCipher   
  E  
+
IRreceiver   
  R  
+
BoolField   
  K  
+
TextField   
  C  
-
IntField   
EAX   IRreceiver   Poly1305   TextField   
CBC   EAXCommon   
  K  
-
  R  
-
TimeField   
CBCCommon   Ed25519   TransistorNoiseSource   
CFB   EEPROM24   KeccakCore   RingOscillatorNoiseSource   
EAX   RingOscillatorNoiseSource   TimeField   
EAXCommon   KeccakCore   RNGClass   TransistorNoiseSource   
CBC   Ed25519   
  L  
+
RTC   
  X  
+
CBCCommon   EEPROM24   RTCAlarm   
CFB   
  F  
+
LCD   RTCDate   XOF   
CFBCommon   ListField   RTCTime   
Field   
-
A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | R | S | T
+
A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | R | S | T | X
diff --git a/crypto-rng-ring_8dox.html b/crypto-rng-ring_8dox.html index 54a2fb0d..5ee81f0f 100644 --- a/crypto-rng-ring_8dox.html +++ b/crypto-rng-ring_8dox.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/crypto-rng_8dox.html b/crypto-rng_8dox.html index 6dfd043e..0c2a433e 100644 --- a/crypto-rng_8dox.html +++ b/crypto-rng_8dox.html @@ -87,7 +87,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/crypto.html b/crypto.html index baf3e171..d637fab2 100644 --- a/crypto.html +++ b/crypto.html @@ -83,10 +83,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Supported Algorithms @@ -190,7 +191,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_b.html b/functions_b.html index 40320a71..65d9583e 100644 --- a/functions_b.html +++ b/functions_b.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -170,11 +171,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE , Speck , SpeckTiny +, XOF
  • BoolField() -: BoolField +: BoolField
  • byteCount() : DS1307RTC @@ -185,7 +188,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_c.html b/functions_c.html index a4c21a97..2cf986cb 100644 --- a/functions_c.html +++ b/functions_c.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -191,9 +192,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE , Speck , SpeckSmall , SpeckTiny +, XOF
  • Color : Bitmap @@ -226,7 +229,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_d.html b/functions_d.html index 580ba795..f7b01d59 100644 --- a/functions_d.html +++ b/functions_d.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -155,6 +156,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , EAXCommon , GCMCommon , OFBCommon +, XOF
  • decryptBlock() : AESCommon @@ -237,7 +239,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : Bitmap
  • drawInvertedBitmap() -: Bitmap +: Bitmap
  • drawLine() : Bitmap @@ -261,7 +263,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_e.html b/functions_e.html index ec7a91fa..c4b78967 100644 --- a/functions_e.html +++ b/functions_e.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -161,7 +162,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , CTRCommon , EAXCommon , GCMCommon +, KeccakCore , OFBCommon +, SHAKE +, XOF
  • encryptBlock() : AESCommon @@ -188,6 +192,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : Field , TimeField
  • +
  • extend() +: SHAKE +, XOF +
  • extract() : KeccakCore
  • @@ -195,7 +203,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_enum.html b/functions_enum.html index e944a2ec..7f9aaa3e 100644 --- a/functions_enum.html +++ b/functions_enum.html @@ -104,7 +104,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_eval.html b/functions_eval.html index b252c885..f873374f 100644 --- a/functions_eval.html +++ b/functions_eval.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_f.html b/functions_f.html index caa522a3..b3165974 100644 --- a/functions_f.html +++ b/functions_f.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -182,7 +183,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func.html b/functions_func.html index 0301e6ec..49922a3b 100644 --- a/functions_func.html +++ b/functions_func.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -183,7 +184,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_b.html b/functions_func_b.html index ff7f588f..69cd6cbb 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -160,11 +161,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE , Speck , SpeckTiny +, XOF
  • BoolField() -: BoolField +: BoolField
  • byteCount() : DS1307RTC @@ -175,7 +178,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_c.html b/functions_func_c.html index 7c6976b1..d0f977a8 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -190,9 +191,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE , Speck , SpeckSmall , SpeckTiny +, XOF
  • command() : IRreceiver @@ -222,7 +225,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_d.html b/functions_func_d.html index 1a734904..d21520d0 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -144,6 +145,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , EAXCommon , GCMCommon , OFBCommon +, XOF
  • decryptBlock() : AESCommon @@ -229,7 +231,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : Bitmap
  • drawText() -: Bitmap +: Bitmap
  • DS1307RTC() : DS1307RTC @@ -244,7 +246,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_e.html b/functions_func_e.html index ed7fdc3a..8d0300a8 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -160,7 +161,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , CTRCommon , EAXCommon , GCMCommon +, KeccakCore , OFBCommon +, SHAKE +, XOF
  • encryptBlock() : AESCommon @@ -187,6 +191,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : Field , TimeField
  • +
  • extend() +: SHAKE +, XOF +
  • extract() : KeccakCore
  • @@ -194,7 +202,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_f.html b/functions_func_f.html index b0452fe2..29f2454d 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -175,7 +176,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_g.html b/functions_func_g.html index 96c69a8b..baf51de4 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -141,7 +142,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_h.html b/functions_func_h.html index fac530d7..febad318 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -156,7 +157,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_i.html b/functions_func_i.html index 4ef15572..e7b98a35 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -179,7 +180,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_k.html b/functions_func_k.html index 090d606b..1fe71beb 100644 --- a/functions_func_k.html +++ b/functions_func_k.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -146,7 +147,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_l.html b/functions_func_l.html index c0219568..cac6a04b 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -129,7 +130,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : Field
  • LCD() -: LCD +: LCD
  • led() : Charlieplex @@ -151,7 +152,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_m.html b/functions_func_m.html index 7c52f558..70d4ff2e 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -152,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_n.html b/functions_func_n.html index 203a8a45..2d48c8be 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -138,7 +139,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_o.html b/functions_func_o.html index 9b50557d..7613790f 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -144,7 +145,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_p.html b/functions_func_p.html index c9e6babd..ce5ec513 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -164,7 +165,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_r.html b/functions_func_r.html index 9c0feecb..82d59623 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -185,6 +186,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE +, XOF
  • resetHMAC() : BLAKE2b @@ -211,7 +214,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_s.html b/functions_func_s.html index 1cccc8a2..54d32d7d 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -290,6 +291,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • SHA512() : SHA512
  • +
  • SHAKE() +: SHAKE +
  • +
  • SHAKE128() +: SHAKE128 +
  • +
  • SHAKE256() +: SHAKE256 +
  • show() : Form
  • @@ -362,7 +372,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_t.html b/functions_func_t.html index 1ebe8e34..42f8b94f 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -153,7 +154,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_u.html b/functions_func_u.html index bc4ec50c..81367727 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -140,6 +141,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE +, XOF
  • updateCursor() : Field @@ -148,7 +151,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_v.html b/functions_func_v.html index 32dae1c9..eac35963 100644 --- a/functions_func_v.html +++ b/functions_func_v.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -136,7 +137,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_w.html b/functions_func_w.html index 65961519..20c9f801 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -157,7 +158,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_func_x.html b/functions_func_x.html new file mode 100644 index 00000000..10fac9af --- /dev/null +++ b/functions_func_x.html @@ -0,0 +1,138 @@ + + + + + + +ArduinoLibs: Class Members - Functions + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + +
    + All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
    + + +
    + +
    + +
    +  + +

    - x -

    +
    + + + + diff --git a/functions_func_~.html b/functions_func_~.html index f05a76f1..33aa5992 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • ~
  • @@ -203,11 +204,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • ~SHA512() : SHA512
  • +
  • ~SHAKE() +: SHAKE +
  • +
  • ~SHAKE128() +: SHAKE128 +
  • +
  • ~SHAKE256() +: SHAKE256 +
  • +
  • ~XOF() +: XOF +
  • diff --git a/functions_g.html b/functions_g.html index 96a1015e..2a1becaf 100644 --- a/functions_g.html +++ b/functions_g.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -142,7 +143,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_h.html b/functions_h.html index b5190067..94c462cb 100644 --- a/functions_h.html +++ b/functions_h.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -161,7 +162,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_i.html b/functions_i.html index be5a9f77..3c53755e 100644 --- a/functions_i.html +++ b/functions_i.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -183,7 +184,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_k.html b/functions_k.html index a7fa99f7..3d0c7798 100644 --- a/functions_k.html +++ b/functions_k.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -147,7 +148,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_l.html b/functions_l.html index ee23d8fc..19388040 100644 --- a/functions_l.html +++ b/functions_l.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -130,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : Field
  • LCD() -: LCD +: LCD
  • led() : Charlieplex @@ -152,7 +153,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_m.html b/functions_m.html index bd25fc03..1d824d5f 100644 --- a/functions_m.html +++ b/functions_m.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -160,7 +161,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_n.html b/functions_n.html index 8b363df5..e46d07d2 100644 --- a/functions_n.html +++ b/functions_n.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -145,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_o.html b/functions_o.html index a84540f0..dd5ef5d2 100644 --- a/functions_o.html +++ b/functions_o.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -145,7 +146,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_p.html b/functions_p.html index 3c47effa..da44619c 100644 --- a/functions_p.html +++ b/functions_p.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -168,7 +169,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_r.html b/functions_r.html index c206132f..d9c74668 100644 --- a/functions_r.html +++ b/functions_r.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -186,6 +187,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE +, XOF
  • resetHMAC() : BLAKE2b @@ -212,7 +215,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_s.html b/functions_s.html index aa93e2b2..c45421bc 100644 --- a/functions_s.html +++ b/functions_s.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -301,6 +302,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • SHA512() : SHA512
  • +
  • SHAKE() +: SHAKE +
  • +
  • SHAKE128() +: SHAKE128 +
  • +
  • SHAKE256() +: SHAKE256 +
  • show() : Form
  • @@ -373,7 +383,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_t.html b/functions_t.html index 7dc51025..0dc63665 100644 --- a/functions_t.html +++ b/functions_t.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -154,7 +155,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_type.html b/functions_type.html index 265c4733..3833f15e 100644 --- a/functions_type.html +++ b/functions_type.html @@ -107,7 +107,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_u.html b/functions_u.html index 807a2aed..b36a31d8 100644 --- a/functions_u.html +++ b/functions_u.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -141,6 +142,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , SHA3_256 , SHA3_512 , SHA512 +, SHAKE +, XOF
  • updateCursor() : Field @@ -149,7 +152,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_v.html b/functions_v.html index a8e05dfa..b1d93459 100644 --- a/functions_v.html +++ b/functions_v.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -137,7 +138,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_vars.html b/functions_vars.html index bc18f852..607b8f50 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -156,7 +156,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_w.html b/functions_w.html index 9cd28d1e..039a8e2e 100644 --- a/functions_w.html +++ b/functions_w.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -164,7 +165,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_x.html b/functions_x.html new file mode 100644 index 00000000..5d852bd5 --- /dev/null +++ b/functions_x.html @@ -0,0 +1,139 @@ + + + + + + +ArduinoLibs: Class Members + + + + + + + + + +
    +
    + + + + + + +
    +
    ArduinoLibs +
    +
    +
    + + + + + + + +
    + +
    + All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
    + + +
    + +
    + +
    +
    Here is a list of all documented class members with links to the class documentation for each member:
    + +

    - x -

    +
    + + + + diff --git a/functions_y.html b/functions_y.html index e59cef11..d24c6c81 100644 --- a/functions_y.html +++ b/functions_y.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -130,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); diff --git a/functions_~.html b/functions_~.html index 30f75115..07daa11e 100644 --- a/functions_~.html +++ b/functions_~.html @@ -100,6 +100,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • u
  • v
  • w
  • +
  • x
  • y
  • ~
  • @@ -204,11 +205,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • ~SHA512() : SHA512
  • +
  • ~SHAKE() +: SHAKE +
  • +
  • ~SHAKE128() +: SHAKE128 +
  • +
  • ~SHAKE256() +: SHAKE256 +
  • +
  • ~XOF() +: XOF +
  • diff --git a/group__power__save.html b/group__power__save.html index 25f6a091..7f76ab86 100644 --- a/group__power__save.html +++ b/group__power__save.html @@ -201,7 +201,7 @@ void  diff --git a/hierarchy.html b/hierarchy.html index 8f47bc03..d33d4c90 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -157,13 +157,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); |\CDS3232RTCCommunicates with a DS3232 realtime clock chip via I2C oCRTCAlarmStores alarm information from a realtime clock chip oCRTCDateStores date information from a realtime clock chip -\CRTCTimeStores time information from a realtime clock chip +oCRTCTimeStores time information from a realtime clock chip +\CXOFAbstract base class for Extendable-Output Functions (XOFs) + \CSHAKEAbstract base class for the SHAKE Extendable-Output Functions (XOFs) +  oCSHAKE128SHAKE Extendable-Output Function (XOF) with 128-bit security +  \CSHAKE256SHAKE Extendable-Output Function (XOF) with 256-bit security diff --git a/index.html b/index.html index 87a21309..aad46a4b 100644 --- a/index.html +++ b/index.html @@ -129,10 +129,11 @@ Realtime Clock Library Cryptographic Library