From 0ba0dda345c2280ebebe67ecaaa6179330b5cb01 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 27 Nov 2018 08:07:38 +0100 Subject: Suppression du code de debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avec debug.h, il devrait être facile d'ajouter des traces en cas de besoin. --- crypto_aead/lilliputaei128v1/ref/tweakey.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'crypto_aead/lilliputaei128v1/ref/tweakey.c') diff --git a/crypto_aead/lilliputaei128v1/ref/tweakey.c b/crypto_aead/lilliputaei128v1/ref/tweakey.c index 4946245..da97019 100644 --- a/crypto_aead/lilliputaei128v1/ref/tweakey.c +++ b/crypto_aead/lilliputaei128v1/ref/tweakey.c @@ -1,13 +1,10 @@ -#include +#include #include -#include /* debug */ #include "constants.h" #include "parameters.h" #include "tweakey.h" -#include "debug.h" - #define LANE_BITS 64 #define LANE_BYTES (LANE_BITS/8) @@ -17,17 +14,11 @@ void tweakey_state_init( tweakey_state *TK, const uint8_t key[KEY_BYTES], - const uint8_t tweak[TWEAK_BYTES], - FILE *debug + const uint8_t tweak[TWEAK_BYTES] ) { memcpy(TK->TK, tweak, TWEAK_BYTES); memcpy(TK->TK+TWEAK_BYTES, key, KEY_BYTES); - - TK->debug = debug; - debug_dump_lanes(debug, " Tweak is :", TWEAK_BYTES, tweak, 5); - debug_dump_lanes(debug, " Key is :", KEY_BYTES, key, 5); - debug_dump_lanes(debug, " Tweakey is :", sizeof(TK->TK), TK->TK, 5); } @@ -48,11 +39,6 @@ void tweakey_state_extract( } round_tweakey[0] ^= i; - - char debug[512]; - snprintf(debug, sizeof(debug), " Extracting Subtweakey round %"PRIu8, i); - debug_dump_lanes(TK->debug, debug, sizeof(TK->TK), TK->TK, 5); - debug_dump_lanes(TK->debug, " Subtweakey :", ROUND_TWEAKEY_BYTES, round_tweakey, 5); } @@ -92,13 +78,6 @@ static void _multiply_state(tweakey_state *TK) void tweakey_state_update(tweakey_state *TK) { - debug_dump_lanes(TK->debug, " Input Tweakey :", sizeof(TK->TK), TK->TK, 10); - _permute_state(TK); - - debug_dump_lanes(TK->debug, " Post permutation Tweakey :", sizeof(TK->TK), TK->TK, 10); - _multiply_state(TK); - - debug_dump_lanes(TK->debug, " Post multiplication Tweakey :", sizeof(TK->TK), TK->TK, 10); } -- cgit v1.2.3