diff options
Diffstat (limited to 'crypto_aead/lilliputaei128v1')
8 files changed, 7 insertions, 40 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/test/helpers.h b/crypto_aead/lilliputaei128v1/ref/test/helpers.h deleted file mode 100644 index 0e1b3c2..0000000 --- a/crypto_aead/lilliputaei128v1/ref/test/helpers.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef HELPERS_H -#define HELPERS_H - -#include <stdint.h> -#include <stdio.h> - -#include "parameters.h" - - -#define ARRAY_NB(A) (sizeof(A)/sizeof(A[0])) -#define ARRAY_END(A) (A+ARRAY_NB(A)) - -#define REPORT_DIFFERENCE(VECTOR, ELEMENT) do { \ - fprintf(stderr, "%s: vector %s: %s differs from expected\n", \ - __FILE__, (VECTOR), (ELEMENT)); \ - } while (0) - -#define REPORT_INVALID(VECTOR) do { \ - fprintf(stderr, "%s: vector %s: ciphertext/tag invalid\n", \ - __FILE__, (VECTOR)); \ - } while (0) - - -static inline FILE* open_dump_file(const char *folder, const char* vector, const char *name) -{ - size_t filename_len = snprintf(NULL, 0, "%s/%s_%s.txt", folder, vector, name); - char filename[filename_len+1]; - snprintf(filename, sizeof(filename), "%s/%s_%s.txt", folder, vector, name); - return fopen(filename, "w"); -} - - -#endif /* HELPERS_H */ diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-ae-decrypt.c b/crypto_aead/lilliputaei128v1/ref/test/test-ae-decrypt.c index c72857e..8ae6308 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-ae-decrypt.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-ae-decrypt.c @@ -4,7 +4,7 @@ #include "lilliput-ae.h" -#include "helpers.h" +#include "test-helpers.h" struct vector diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-ae-encrypt.c b/crypto_aead/lilliputaei128v1/ref/test/test-ae-encrypt.c index 205a69c..9a7dce0 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-ae-encrypt.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-ae-encrypt.c @@ -4,7 +4,7 @@ #include "lilliput-ae.h" -#include "helpers.h" +#include "test-helpers.h" struct vector diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c b/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c index c9b2a1c..80ac737 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c @@ -4,7 +4,7 @@ #include "lilliput-ae.h" -#include "helpers.h" +#include "test-helpers.h" struct vector diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c b/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c index 6bd78ef..9bd6996 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c @@ -4,7 +4,7 @@ #include "cipher.h" -#include "helpers.h" +#include "test-helpers.h" struct vector diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-tbc-encrypt.c b/crypto_aead/lilliputaei128v1/ref/test/test-tbc-encrypt.c index 2d116b9..60cc9cf 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-tbc-encrypt.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-tbc-encrypt.c @@ -4,7 +4,7 @@ #include "cipher.h" -#include "helpers.h" +#include "test-helpers.h" struct vector diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c b/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c index 7d2e08a..a10981f 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c @@ -4,7 +4,7 @@ #include "tweakey.h" -#include "helpers.h" +#include "test-helpers.h" struct vector diff --git a/crypto_aead/lilliputaei128v1/ref/test/traces-ae-128-i.c b/crypto_aead/lilliputaei128v1/ref/test/traces-ae-128-i.c index 2467084..223ab2e 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/traces-ae-128-i.c +++ b/crypto_aead/lilliputaei128v1/ref/test/traces-ae-128-i.c @@ -4,7 +4,7 @@ #include "lilliput-ae.h" #include "debug.h" -#include "helpers.h" +#include "test-helpers.h" FILE *DUMP; |
