diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-12-03 10:47:49 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-12-03 10:54:22 +0100 |
| commit | e13590a378d947527da943c3f7876af5b1bd81b1 (patch) | |
| tree | 2ebddd6cd4e47de527f9d75ab77802da90298195 /src/tweakey.h | |
| parent | 8a8950699eb8bb9cd29311d32d003431a4472ae4 (diff) | |
| download | lilliput-ae-implem-e13590a378d947527da943c3f7876af5b1bd81b1.tar.xz | |
Suppression des structures (tweakey|cipher)_state
Pas l'impression que l'utilisation de structures dans les codes de
référence soit très idiomatique.
Diffstat (limited to 'src/tweakey.h')
| -rw-r--r-- | src/tweakey.h | 18 |
1 files changed, 5 insertions, 13 deletions
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 */ |
