commit 5c2e3db3b4be30bee0f2cd87361da19a9febf854
parent 03dbcc215140ae1d465242cc22e97c3df504d7d1
Author: Kévin Le Gouguec <kevin.legouguec@airbus.com>
Date: Mon, 3 Dec 2018 08:00:53 +0100
Documentation de l'implémentation de référence (src/)
Diffstat:
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
@@ -8,18 +8,25 @@ It is organized as follows:
`src`
-----
-Contains parameter-independent code.
+Contains parameter-independent code for the reference implementation:
- `lilliput-ae.h`: main API
-- `tweakey.*`: implementation of Lilliput-TBC's tweakey schedule;
+- `lilliput-ae-i.c`: implementation of Lilliput-Ⅰ (ΘCB3-based)
+- `lilliput-ae-i.c`: implementation of Lilliput-Ⅱ (SCT-2-based)
+- `ae-common.h`: internal helper functions used by both AE schemes
+- `tweakey.*`: implementation of Lilliput-TBC's tweakey schedule
- `cipher.*`: implementation of the tweakable block-cipher
- Lilliput-TBC;
+ Lilliput-TBC
- `constants.*`: tabulated data for
- the tweakey schedule's permutation h
- the tweakey schedule's multiplication sequences P~0~ to P~5~
- Lilliput-TBC's S-box
- `parameters.h`: byte sizes for inputs and outputs (depends on
parameter-dependent `_parameters.h` files)
-- `lilliput-ae-i.c`: implementation of Lilliput-Ⅰ (ΘCB3-based)
-- `lilliput-ae-i.c`: implementation of Lilliput-Ⅱ (SCT-2-based)
-- `ae-common.h`: helper functions for AE schemes
+
+Also contains some support files:
+
+- `common.mk`: Makefile recipes to compile and test the implementation
+- `debug.h`: helper functions to ease debugging and dump intermediate
+ values
+
diff --git a/src/debug.h b/src/debug.h
@@ -41,9 +41,6 @@ static inline void debug_dump_buffer(const char *header, size_t len, const uint8
fprintf(DUMP, "\n");
}
- if (len/8 == 0)
- return;
-
for (size_t line=0; line<len/8; line++)
{
fprintf(DUMP, "%*s", indent, "");
@@ -56,8 +53,6 @@ static inline void debug_dump_buffer(const char *header, size_t len, const uint8
}
fprintf(DUMP, "\n");
}
-
- fprintf(DUMP, "\n");
}
static inline void debug_open_dump(const char *suite, const char *vector_name)