diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-21 11:22:08 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-21 11:22:08 +0100 |
| commit | 2df3f453fc584c9001404c3d2a74cb2059d94c0f (patch) | |
| tree | d81bd29417cf97b7f3e6e8bf8b0a1c6fdf71043d /crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c | |
| parent | 1a8a1c0f98e39907af61d181d318fd45f3ce93ca (diff) | |
| download | lilliput-ae-implem-2df3f453fc584c9001404c3d2a74cb2059d94c0f.tar.xz | |
Introduction de l'entête "parameters.h"
Permet d'isoler les paramètres propres à la taille de clé et au mode ;
normalement, le reste du code devrait être strictement identique d'un
dossier à l'autre.
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c')
| -rw-r--r-- | crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c b/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c index 53ea14c..8449ea4 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c @@ -3,22 +3,7 @@ #include "tweakey.h" - -#define ARRAY_NB(A) (sizeof(A)/sizeof(A[0])) -#define ARRAY_END(A) (A+ARRAY_NB(A)) - - -#define ROUNDS 32 - - -struct vector_input -{ - char * name; - uint8_t key[KEY_BYTES]; - uint8_t tweak[TWEAK_BYTES]; -}; - -typedef struct vector_input vector_input; +#include "helpers.h" /* [0]: LSB */ @@ -76,14 +61,6 @@ vector_input VECTORS[] = { }; -FILE* open_dump_file(const char *folder, const char *name) -{ - char filename[128]; - snprintf(filename, sizeof(filename), "%s/tweakey_%s.txt", folder, name); - return fopen(filename, "w"); -} - - int main(int argc, char const * const *argv) { if (argc < 2) @@ -95,7 +72,7 @@ int main(int argc, char const * const *argv) for (vector_input* input=VECTORS; input<ARRAY_END(VECTORS); input++) { printf("%s\n", input->name); - FILE* dump = open_dump_file(argv[1], input->name); + FILE* dump = open_dump_file(argv[1], "tweakey", input->name); fprintf(dump, "Building Tweakey :\n"); |
