lilliput-ae-reference-implementation

Implementations of Lilliput-AE submitted to the NIST LWC standardization process
git clone https://git.kevinlegouguec.net/lilliput-ae-reference-implementation
Log | Files | Refs | README

tweakey.h (963B)


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