From 8d46de55be9fce55b297915e7086f77ceaab6f19 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 21 Nov 2018 16:34:25 +0100 Subject: Ajout de traces pour cipher.c (début) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implémentation de test-cipher.c en passant. --- crypto_aead/lilliputaei128v1/ref/cipher.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crypto_aead/lilliputaei128v1/ref/cipher.c') diff --git a/crypto_aead/lilliputaei128v1/ref/cipher.c b/crypto_aead/lilliputaei128v1/ref/cipher.c index dba7e90..31f7f02 100644 --- a/crypto_aead/lilliputaei128v1/ref/cipher.c +++ b/crypto_aead/lilliputaei128v1/ref/cipher.c @@ -7,6 +7,8 @@ #include "parameters.h" #include "tweakey.h" +#include "debug.h" + enum permutation { @@ -96,6 +98,11 @@ void lilliput_tbc_encrypt( FILE *debug ) { + debug_dump_lanes(debug, "Tweak :", TWEAK_BYTES, tweak, 0); + debug_dump_lanes(debug, "Key :", KEY_BYTES, key, 0); + debug_dump_buffer(debug, "Message :", BLOCK_BYTES, message, 0); + fprintf(debug, "\n"); + cipher_state X; _state_init(&X, message, debug); @@ -110,6 +117,9 @@ void lilliput_tbc_encrypt( _one_round_egfn(&X, RTK[ROUNDS-1], PERMUTATION_NONE); memcpy(ciphertext, X.X, BLOCK_BYTES); + + debug_dump_buffer(debug, "Ciphertext :", BLOCK_BYTES, ciphertext, 0); + } void lilliput_tbc_decrypt( -- cgit v1.2.3