summaryrefslogtreecommitdiff
path: root/crypto_aead/lilliputaei128v1/ref/cipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/cipher.c')
-rw-r--r--crypto_aead/lilliputaei128v1/ref/cipher.c10
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(