diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-12-04 10:30:50 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-12-04 10:40:58 +0100 |
| commit | ca5d23276808b6b6c4d069e0ce77d776b5d93306 (patch) | |
| tree | 3a67c1f7b1cd6282484a27b114eb6dba21bf43c8 /crypto_aead/lilliputaei128v1/ref/test/traces-tbc-128-i.c | |
| parent | a5dff3123ce3bcb0d20b72f0797e6f2c9e3eb99d (diff) | |
| download | lilliput-ae-implem-ca5d23276808b6b6c4d069e0ce77d776b5d93306.tar.xz | |
[WIP] Réorganisation des traces
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/test/traces-tbc-128-i.c')
| -rw-r--r-- | crypto_aead/lilliputaei128v1/ref/test/traces-tbc-128-i.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/test/traces-tbc-128-i.c b/crypto_aead/lilliputaei128v1/ref/test/traces-tbc-128-i.c deleted file mode 100644 index c128da2..0000000 --- a/crypto_aead/lilliputaei128v1/ref/test/traces-tbc-128-i.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <stdint.h> - -#include "cipher.h" - -#include "debug.h" -#include "test-helpers.h" - - -FILE *DUMP; - - -struct vector -{ - char *name; - uint8_t key[KEY_BYTES]; - uint8_t tweak[TWEAK_BYTES]; - uint8_t message[BLOCK_BYTES]; -}; - -typedef struct vector vector; - - -const vector VECTORS[] = { - { - .name = "order", - .key = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - }, - .tweak = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - }, - .message = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f - } - } -}; - - -int main() -{ - for (const vector *v=VECTORS; v<ARRAY_END(VECTORS); v++) - { - debug_open_dump("tbc-128-i", v->name); - debug_dump_buffer("message", BLOCK_BYTES, v->message, 0); - debug_dump_buffer("key", KEY_BYTES, v->key, 0); - debug_dump_buffer("tweak", TWEAK_BYTES, v->tweak, 0); - - uint8_t ciphertext[BLOCK_BYTES]; - - lilliput_tbc_encrypt(v->key, v->tweak, v->message, ciphertext); - - debug_dump_buffer("ciphertext", BLOCK_BYTES, ciphertext, 0); - - fclose(DUMP); - } -} |
