diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-21 16:34:25 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-21 16:34:49 +0100 |
| commit | 8d46de55be9fce55b297915e7086f77ceaab6f19 (patch) | |
| tree | 6847da64c3e46f455fdd626f8d9d2a0dcdc37cad /crypto_aead/lilliputaei128v1/ref/cipher.c | |
| parent | 42b8c9908b04635cabc775c4f86f66cb91497c9f (diff) | |
| download | lilliput-ae-implem-8d46de55be9fce55b297915e7086f77ceaab6f19.tar.xz | |
Ajout de traces pour cipher.c (début)
Implémentation de test-cipher.c en passant.
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/cipher.c')
| -rw-r--r-- | crypto_aead/lilliputaei128v1/ref/cipher.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/cipher.c b/crypto_aead/lilliputaei128v1/ref/cipher.c index dba7e90..31f7f02 100644 --- a/crypto_aead/lilliputaei128v1/ref/cipher.c +++ b/crypto_aead/lilliputaei128v1/ref/cipher.c @@ -7,6 +7,8 @@ #include "parameters.h" #include "tweakey.h" +#include "debug.h" + enum permutation { @@ -96,6 +98,11 @@ void lilliput_tbc_encrypt( FILE *debug ) { + debug_dump_lanes(debug, "Tweak :", TWEAK_BYTES, tweak, 0); + debug_dump_lanes(debug, "Key :", KEY_BYTES, key, 0); + debug_dump_buffer(debug, "Message :", BLOCK_BYTES, message, 0); + fprintf(debug, "\n"); + cipher_state X; _state_init(&X, message, debug); @@ -110,6 +117,9 @@ void lilliput_tbc_encrypt( _one_round_egfn(&X, RTK[ROUNDS-1], PERMUTATION_NONE); memcpy(ciphertext, X.X, BLOCK_BYTES); + + debug_dump_buffer(debug, "Ciphertext :", BLOCK_BYTES, ciphertext, 0); + } void lilliput_tbc_decrypt( |
