diff options
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); } |
