lilliput-ae.h (1394B)
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 both Lilliput-I and Lilliput-II, 18 implemented by lilliput-i.c and lilliput-ii.c respectively. 19 */ 20 21 #ifndef LILLIPUT_AE_H 22 #define LILLIPUT_AE_H 23 24 #include <stddef.h> 25 #include <stdbool.h> 26 #include <stdint.h> 27 28 #include "constants.h" 29 30 31 void lilliput_ae_encrypt( 32 size_t message_len, 33 const uint8_t message[message_len], 34 size_t auth_data_len, 35 const uint8_t auth_data[auth_data_len], 36 const uint8_t key[KEY_BYTES], 37 const uint8_t nonce[NONCE_BYTES], 38 uint8_t ciphertext[message_len], 39 uint8_t tag[TAG_BYTES] 40 ); 41 42 bool lilliput_ae_decrypt( 43 size_t ciphertext_len, 44 const uint8_t ciphertext[ciphertext_len], 45 size_t auth_data_len, 46 const uint8_t auth_data[auth_data_len], 47 const uint8_t key[KEY_BYTES], 48 const uint8_t nonce[NONCE_BYTES], 49 const uint8_t tag[TAG_BYTES], 50 uint8_t message[ciphertext_len] 51 ); 52 53 54 #endif /* LILLIPUT_AE_H */