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

commit ff3c6e7f52c8eae698d11a55b8153dd4c61fad87
parent d2df2fbd5e21d1d12dda02e6553d3129d16498a3
Author: Kévin Le Gouguec <kevin.legouguec@airbus.com>
Date:   Tue, 12 Feb 2019 10:29:31 +0100

Ajout d'une déclaration de (renonciation aux) droits d'auteur

Avec une phrase de documentation en prime pour chaque fichier.

Cf. issue #2.

Diffstat:
Msrc/add_tweakeyloop/tweakey.c | 19+++++++++++++++++++
Msrc/add_tweakeysequences/tweakey.c | 20++++++++++++++++++++
Msrc/i-128/parameters.h | 17+++++++++++++++++
Msrc/i-192/parameters.h | 17+++++++++++++++++
Msrc/i-256/parameters.h | 17+++++++++++++++++
Msrc/ii-128/parameters.h | 17+++++++++++++++++
Msrc/ii-192/parameters.h | 17+++++++++++++++++
Msrc/ii-256/parameters.h | 17+++++++++++++++++
Msrc/ref/cipher.c | 17+++++++++++++++++
Msrc/ref/cipher.h | 17+++++++++++++++++
Msrc/ref/constants.h | 17+++++++++++++++++
Msrc/ref/lilliput-ae-i.c | 17+++++++++++++++++
Msrc/ref/lilliput-ae-ii.c | 17+++++++++++++++++
Msrc/ref/lilliput-ae-utils.h | 17+++++++++++++++++
Msrc/ref/lilliput-ae.h | 18++++++++++++++++++
Msrc/ref/tweakey.c | 19+++++++++++++++++++
Msrc/ref/tweakey.h | 17+++++++++++++++++
17 files changed, 297 insertions(+), 0 deletions(-)

diff --git a/src/add_tweakeyloop/tweakey.c b/src/add_tweakeyloop/tweakey.c @@ -1,3 +1,22 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides an implementation of Lilliput-TBC's tweakey schedule, +where multiplications by matrices M and M_R to the power n is performed by +applying functions for M and M_R n times. +*/ + #include <stdint.h> #include <string.h> diff --git a/src/add_tweakeysequences/tweakey.c b/src/add_tweakeysequences/tweakey.c @@ -1,3 +1,23 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides an implementation of Lilliput-TBC's tweakey schedule, +where multiplications by matrices M and M_R to the power n is performed by +functions expressing the exponentiated matrices with shifts and XORs, with +8×8 matrices M_1, M_2, M_3 and M_4 pre-computed as lookup tables. +*/ + #include <stdint.h> #include <string.h> diff --git a/src/i-128/parameters.h b/src/i-128/parameters.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file defines constants specific to Lilliput-I-128. +*/ + #ifndef PARAMETERS_H #define PARAMETERS_H diff --git a/src/i-192/parameters.h b/src/i-192/parameters.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file defines constants specific to Lilliput-I-192. +*/ + #ifndef PARAMETERS_H #define PARAMETERS_H diff --git a/src/i-256/parameters.h b/src/i-256/parameters.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file defines constants specific to Lilliput-I-256. +*/ + #ifndef PARAMETERS_H #define PARAMETERS_H diff --git a/src/ii-128/parameters.h b/src/ii-128/parameters.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file defines constants specific to Lilliput-II-128. +*/ + #ifndef PARAMETERS_H #define PARAMETERS_H diff --git a/src/ii-192/parameters.h b/src/ii-192/parameters.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file defines constants specific to Lilliput-II-192. +*/ + #ifndef PARAMETERS_H #define PARAMETERS_H diff --git a/src/ii-256/parameters.h b/src/ii-256/parameters.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file defines constants specific to Lilliput-II-256. +*/ + #ifndef PARAMETERS_H #define PARAMETERS_H diff --git a/src/ref/cipher.c b/src/ref/cipher.c @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides the implementation for Lilliput-TBC. +*/ + #include <stdint.h> #include <string.h> diff --git a/src/ref/cipher.h b/src/ref/cipher.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides the interface for Lilliput-TBC. +*/ + #ifndef CIPHER_H #define CIPHER_H diff --git a/src/ref/constants.h b/src/ref/constants.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides bit and byte lengths for input and output parameters. +*/ + #ifndef CONSTANTS_H #define CONSTANTS_H diff --git a/src/ref/lilliput-ae-i.c b/src/ref/lilliput-ae-i.c @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file implements Lilliput-AE's nonce-respecting mode based on ΘCB3. +*/ + #include <stdbool.h> #include <stdint.h> #include <string.h> diff --git a/src/ref/lilliput-ae-ii.c b/src/ref/lilliput-ae-ii.c @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file implements Lilliput-AE's nonce-misuse-resistant mode based on SCT-2. +*/ + #include <stdbool.h> #include <stdint.h> #include <string.h> diff --git a/src/ref/lilliput-ae-utils.h b/src/ref/lilliput-ae-utils.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides functions used by both authenticated encryption modes. +*/ + #ifndef LILLIPUT_AE_UTILS_H #define LILLIPUT_AE_UTILS_H diff --git a/src/ref/lilliput-ae.h b/src/ref/lilliput-ae.h @@ -1,3 +1,21 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides the interface for both Lilliput-I and Lilliput-II, +implemented by lilliput-ae-i.c and lilliput-ae-ii.c respectively. +*/ + #ifndef LILLIPUT_AE_H #define LILLIPUT_AE_H diff --git a/src/ref/tweakey.c b/src/ref/tweakey.c @@ -1,3 +1,22 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides an implementation of Lilliput-TBC's tweakey schedule, +where multiplications by matrices M and M_R to the power n is performed by +functions expressing the exponentiated matrices with shifts and XORs. +*/ + #include <stdint.h> #include <string.h> diff --git a/src/ref/tweakey.h b/src/ref/tweakey.h @@ -1,3 +1,20 @@ +/* +Implementation of the Lilliput-AE tweakable block cipher. + +Author: Kévin Le Gouguec, 2019. + +For more information, feedback or questions, refer to our website: +https://paclido.fr/lilliput-ae + +To the extent possible under law, the implementer has waived all copyright +and related or neighboring rights to the source code in this file. +http://creativecommons.org/publicdomain/zero/1.0/ + +--- + +This file provides the interface for Lilliput-TBC's tweakey schedule. +*/ + #ifndef TWEAKEY_H #define TWEAKEY_H