summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2019-02-05 09:00:43 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2019-02-05 09:00:43 +0100
commitbfafd1b3323ac543cae2d34f43e02b8b4373c36f (patch)
tree374ffca288420c5188a3344e382545600737b0a3
parent35935f0a2ac2df9d71aa767cadbf5ae23396ad2d (diff)
downloadlilliput-ae-implem-bfafd1b3323ac543cae2d34f43e02b8b4373c36f.tar.xz
Renommage de ae-common.h en lilliput-ae-utils.h
-rw-r--r--README.md2
-rwxr-xr-xnist/make-package.sh3
l---------src/add_tweakeyloop/ae-common.h1
l---------src/add_tweakeyloop/lilliput-ae-utils.h1
l---------src/add_tweakeysequences/ae-common.h1
l---------src/add_tweakeysequences/lilliput-ae-utils.h1
-rw-r--r--src/ref/lilliput-ae-i.c2
-rw-r--r--src/ref/lilliput-ae-ii.c2
-rw-r--r--src/ref/lilliput-ae-utils.h (renamed from src/ref/ae-common.h)6
-rwxr-xr-xtest/check-implementation.sh3
-rw-r--r--traces/traces-ae.patch10
11 files changed, 15 insertions, 17 deletions
diff --git a/README.md b/README.md
index 864b8ba..92e90ef 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Each implementation folder contains:
- `lilliput-ae.h`: main API
- `lilliput-ae-i.c`: implementation of Lilliput-Ⅰ (ΘCB3-based)
- `lilliput-ae-ii.c`: implementation of Lilliput-Ⅱ (SCT-2-based)
-- `ae-common.h`: internal helper functions used by both AE schemes
+- `lilliput-ae-utils.h`: helper functions used by both AE schemes
- `tweakey.*`: implementation of Lilliput-TBC's tweakey schedule
- `cipher.*`: implementation of the tweakable block-cipher
Lilliput-TBC
diff --git a/nist/make-package.sh b/nist/make-package.sh
index 33abeac..3a90dce 100755
--- a/nist/make-package.sh
+++ b/nist/make-package.sh
@@ -44,10 +44,9 @@ add-variant ()
mkdir -p ${dest}
source_files=(
- ae-common.h
cipher.{c,h}
constants.h
- lilliput-ae{.h,-${mode}.c}
+ lilliput-ae{.h,-utils.h,-${mode}.c}
tweakey.{c,h}
)
diff --git a/src/add_tweakeyloop/ae-common.h b/src/add_tweakeyloop/ae-common.h
deleted file mode 120000
index 73641f5..0000000
--- a/src/add_tweakeyloop/ae-common.h
+++ /dev/null
@@ -1 +0,0 @@
-../ref/ae-common.h \ No newline at end of file
diff --git a/src/add_tweakeyloop/lilliput-ae-utils.h b/src/add_tweakeyloop/lilliput-ae-utils.h
new file mode 120000
index 0000000..b46625b
--- /dev/null
+++ b/src/add_tweakeyloop/lilliput-ae-utils.h
@@ -0,0 +1 @@
+../ref/lilliput-ae-utils.h \ No newline at end of file
diff --git a/src/add_tweakeysequences/ae-common.h b/src/add_tweakeysequences/ae-common.h
deleted file mode 120000
index 73641f5..0000000
--- a/src/add_tweakeysequences/ae-common.h
+++ /dev/null
@@ -1 +0,0 @@
-../ref/ae-common.h \ No newline at end of file
diff --git a/src/add_tweakeysequences/lilliput-ae-utils.h b/src/add_tweakeysequences/lilliput-ae-utils.h
new file mode 120000
index 0000000..b46625b
--- /dev/null
+++ b/src/add_tweakeysequences/lilliput-ae-utils.h
@@ -0,0 +1 @@
+../ref/lilliput-ae-utils.h \ No newline at end of file
diff --git a/src/ref/lilliput-ae-i.c b/src/ref/lilliput-ae-i.c
index b1758c9..7770c24 100644
--- a/src/ref/lilliput-ae-i.c
+++ b/src/ref/lilliput-ae-i.c
@@ -2,7 +2,7 @@
#include <stdint.h>
#include <string.h>
-#include "ae-common.h"
+#include "lilliput-ae-utils.h"
#include "cipher.h"
#include "lilliput-ae.h"
diff --git a/src/ref/lilliput-ae-ii.c b/src/ref/lilliput-ae-ii.c
index 26885e5..6da73ac 100644
--- a/src/ref/lilliput-ae-ii.c
+++ b/src/ref/lilliput-ae-ii.c
@@ -2,7 +2,7 @@
#include <stdint.h>
#include <string.h>
-#include "ae-common.h"
+#include "lilliput-ae-utils.h"
#include "cipher.h"
#include "lilliput-ae.h"
diff --git a/src/ref/ae-common.h b/src/ref/lilliput-ae-utils.h
index 6648280..617954b 100644
--- a/src/ref/ae-common.h
+++ b/src/ref/lilliput-ae-utils.h
@@ -1,5 +1,5 @@
-#ifndef AE_COMMON_H
-#define AE_COMMON_H
+#ifndef LILLIPUT_AE_UTILS_H
+#define LILLIPUT_AE_UTILS_H
#include <stddef.h>
#include <stdint.h>
@@ -124,4 +124,4 @@ static void process_associated_data(
-#endif /* AE_COMMON_H */
+#endif /* LILLIPUT_AE_UTILS_H */
diff --git a/test/check-implementation.sh b/test/check-implementation.sh
index 951c6af..f2c32ed 100755
--- a/test/check-implementation.sh
+++ b/test/check-implementation.sh
@@ -25,10 +25,9 @@ run-genkat ()
local genkat=${genkat_dir}/genkat
local source_files=(
- ae-common.h
cipher.{c,h}
constants.h
- lilliput-ae{.h,-${mode}.c}
+ lilliput-ae{.h,-utils.h,-${mode}.c}
tweakey.{c,h}
)
diff --git a/traces/traces-ae.patch b/traces/traces-ae.patch
index 476c457..35dc0c9 100644
--- a/traces/traces-ae.patch
+++ b/traces/traces-ae.patch
@@ -1,12 +1,12 @@
-diff --git a/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/ae-common.h b/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/ae-common.h
+diff --git a/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/lilliput-ae-utils.h b/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/lilliput-ae-utils.h
index 561854e..397dac0 100644
---- a/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/ae-common.h
-+++ b/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/ae-common.h
+--- a/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/lilliput-ae-utils.h
++++ b/SOUMISSION_NIST/REFERENCE_IMPLEMENTATION/src/ref/lilliput-ae-utils.h
@@ -1,3 +1,5 @@
+#include "debug.h"
+
- #ifndef AE_COMMON_H
- #define AE_COMMON_H
+ #ifndef LILLIPUT_AE_UTILS_H
+ #define LILLIPUT_AE_UTILS_H
@@ -105,20 +107,45 @@ static void process_associated_data(
size_t l_a = A_len / BLOCK_BYTES;