summaryrefslogtreecommitdiff
path: root/src/ref
diff options
context:
space:
mode:
Diffstat (limited to 'src/ref')
-rw-r--r--src/ref/cipher.c17
-rw-r--r--src/ref/cipher.h17
-rw-r--r--src/ref/constants.h17
-rw-r--r--src/ref/lilliput-ae-i.c17
-rw-r--r--src/ref/lilliput-ae-ii.c17
-rw-r--r--src/ref/lilliput-ae-utils.h17
-rw-r--r--src/ref/lilliput-ae.h18
-rw-r--r--src/ref/tweakey.c19
-rw-r--r--src/ref/tweakey.h17
9 files changed, 156 insertions, 0 deletions
diff --git a/src/ref/cipher.c b/src/ref/cipher.c
index 48fc35c..48144d4 100644
--- 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
index 0746189..8e4bd16 100644
--- 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
index 063c8af..6f17b40 100644
--- 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
index 7770c24..2754fbb 100644
--- 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
index 6da73ac..862892c 100644
--- 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
index b9ef1dd..6b60adc 100644
--- 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
index 24bd7de..f2d7c82 100644
--- 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
index e5faf2a..39e5980 100644
--- 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
index d2612cd..e461b43 100644
--- 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