tweakey.h (1188B)
1 /* 2 Implementation of the Lilliput-AE tweakable block cipher. 3 4 Authors, hereby denoted as "the implementer": 5 Alexandre Adomnicai, 6 Kévin Le Gouguec, 7 Léo Reynaud, 8 2019. 9 10 For more information, feedback or questions, refer to our website: 11 https://paclido.fr/lilliput-ae 12 13 To the extent possible under law, the implementer has waived all copyright 14 and related or neighboring rights to the source code in this file. 15 http://creativecommons.org/publicdomain/zero/1.0/ 16 17 --- 18 19 This file provides the interface for the first-order threshold implementation 20 of Lilliput-TBC's tweakey schedule. 21 */ 22 23 #ifndef TWEAKEY_H 24 #define TWEAKEY_H 25 26 #include <stdint.h> 27 28 #include "constants.h" 29 30 31 void tweakey_state_init( 32 uint8_t TK_X[TWEAKEY_BYTES], 33 uint8_t TK_Y[TWEAKEY_BYTES], 34 const uint8_t key[KEY_BYTES], 35 const uint8_t tweak[TWEAK_BYTES] 36 ); 37 38 void tweakey_state_extract( 39 const uint8_t TK_X[TWEAKEY_BYTES], 40 const uint8_t TK_Y[KEY_BYTES], 41 uint8_t round_constant, 42 uint8_t round_tweakey_X[ROUND_TWEAKEY_BYTES], 43 uint8_t round_tweakey_Y[ROUND_TWEAKEY_BYTES] 44 ); 45 46 void tweakey_state_update(uint8_t TK_X[TWEAKEY_BYTES], uint8_t TK_Y[KEY_BYTES]); 47 48 49 #endif /* TWEAKEY_H */