summaryrefslogtreecommitdiff
path: root/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2018-11-27 08:07:38 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2018-11-27 08:10:01 +0100
commit0ba0dda345c2280ebebe67ecaaa6179330b5cb01 (patch)
tree6a2854a496b80c4c66307f6f168a1dd07f297052 /crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c
parent4a5daafd4292d907e15291204aaffd29e6f6bbc2 (diff)
downloadlilliput-ae-implem-0ba0dda345c2280ebebe67ecaaa6179330b5cb01.tar.xz
Suppression du code de debug
Avec debug.h, il devrait être facile d'ajouter des traces en cas de besoin.
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c')
-rw-r--r--crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c b/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c
index 212e28d..6bd78ef 100644
--- a/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c
+++ b/crypto_aead/lilliputaei128v1/ref/test/test-tbc-decrypt.c
@@ -1,4 +1,4 @@
-#include <inttypes.h>
+#include <stdint.h>
#include <stdio.h>
#include <string.h>
@@ -64,30 +64,20 @@ const vector VECTORS[] = {
};
-int main(int argc, char const * const *argv)
+int main()
{
- if (argc < 2)
- {
- fprintf(stderr, "usage: %s OUTPUT-FOLDER\n", argv[0]);
- return 1;
- }
-
int diff = 0;
for (const vector *v=VECTORS; v<ARRAY_END(VECTORS); v++)
{
- FILE *dump = open_dump_file(argv[1], "tbc-decrypt", v->name);
-
uint8_t message[BLOCK_BYTES];
- lilliput_tbc_decrypt(v->key, v->tweak, v->ciphertext, message, dump);
+ lilliput_tbc_decrypt(v->key, v->tweak, v->ciphertext, message);
if (memcmp(message, v->message, sizeof(message)) != 0)
{
REPORT_DIFFERENCE(v->name, "decrypted message");
diff++;
}
-
- fclose(dump);
}
return diff;