Reference implementation ======================== This folder contains the reference implementation for Lilliput-AE. It is organized as follows: `src` ----- Contains two kinds of subfolders: - implementations: parameter-independent code - `ref`: the reference implementation - `add_*`: additional implementations - parameters: one folder for each variant of the Lilliput-AE family, named `${mode}-${keybits}`: - mode is either i (for ΘCB3) or ii (for SCT-2) - keybits is either 128, 192 or 256 Each implementation folder contains: - `lilliput-ae.h`: main API - `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 - `parameters.h`: byte sizes for inputs and outputs (depends on parameter-dependent `_parameters.h` files) `test` ------ Contains test vectors. There is one subfolder per member of the Lilliput-AE family, as well as: - `common.mk`: makefile recipes for test programs - `debug.h`: helper functions to dump intermediate values, used in the trace-generating patches - `test-helpers.h`: helper functions for test code `nist` ------ Contains code to - generate the directory structure required by NIST - compile each member of the Lilliput-AE family against NIST's `genkat_aead.c` - generate test vectors - package code and test vectors together into `results/crypto_aead` The code can be run with `make nist`. `traces` -------- Contains patches to add print statements for inputs, outputs and intermediate values. `make traces` will - apply the patches - run the trace programs - collect traces - revert the patches