From e13590a378d947527da943c3f7876af5b1bd81b1 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Mon, 3 Dec 2018 10:47:49 +0100 Subject: Suppression des structures (tweakey|cipher)_state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pas l'impression que l'utilisation de structures dans les codes de référence soit très idiomatique. --- src/tweakey.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/tweakey.h') diff --git a/src/tweakey.h b/src/tweakey.h index 0642724..5470bc8 100644 --- a/src/tweakey.h +++ b/src/tweakey.h @@ -6,26 +6,18 @@ #include "parameters.h" -struct tweakey_state -{ - uint8_t TK[TWEAKEY_BYTES]; -}; - -typedef struct tweakey_state tweakey_state; - - void tweakey_state_init( - tweakey_state *TK, + uint8_t TK[TWEAKEY_BYTES], const uint8_t key[KEY_BYTES], const uint8_t tweak[TWEAK_BYTES] ); void tweakey_state_extract( - const tweakey_state *TK, - uint8_t round_tweakey[ROUND_TWEAKEY_BYTES], /* output */ - uint8_t i /* round constant */ + const uint8_t TK[TWEAKEY_BYTES], + uint8_t round_constant, + uint8_t round_tweakey[ROUND_TWEAKEY_BYTES] /* output */ ); -void tweakey_state_update(tweakey_state *TK); +void tweakey_state_update(uint8_t TK[TWEAKEY_BYTES]); #endif /* TWEAKEY_H */ -- cgit v1.2.3