diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-27 08:07:38 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-27 08:10:01 +0100 |
| commit | 0ba0dda345c2280ebebe67ecaaa6179330b5cb01 (patch) | |
| tree | 6a2854a496b80c4c66307f6f168a1dd07f297052 /crypto_aead/lilliputaei128v1/ref/tweakey.c | |
| parent | 4a5daafd4292d907e15291204aaffd29e6f6bbc2 (diff) | |
| download | lilliput-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/tweakey.c')
| -rw-r--r-- | crypto_aead/lilliputaei128v1/ref/tweakey.c | 25 |
1 files changed, 2 insertions, 23 deletions
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 <stdbool.h> +#include <stdint.h> #include <string.h> -#include <inttypes.h> /* 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); } |
