lilliput-ae-reference-implementation

Implementations of Lilliput-AE submitted to the NIST LWC standardization process
git clone https://git.kevinlegouguec.net/lilliput-ae-reference-implementation
Log | Files | Refs | README

commit 52abee4e2d33c1bd7805e8c917e0def94045ebd1
parent fa8bfd4386a86834bf527988c2a05fbf0336f8cb
Author: Kévin Le Gouguec <kevin.legouguec@airbus.com>
Date:   Wed, 21 Nov 2018 17:43:50 +0100

Implémentation de la couche linéaire

Toujours conforme au vecteur de test.

Diffstat:
Mcrypto_aead/lilliputaei128v1/ref/cipher.c | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/crypto_aead/lilliputaei128v1/ref/cipher.c b/crypto_aead/lilliputaei128v1/ref/cipher.c @@ -105,6 +105,22 @@ static void _nonlinear_layer(cipher_state *X, const uint8_t RTK[ROUND_TWEAKEY_BY static void _linear_layer(cipher_state *X) { debug_dump_buffer(X->debug, " Linear Layer :", sizeof(X->X), X->X, 10); + + X->X[15] ^= X->X[1]; + X->X[15] ^= X->X[2]; + X->X[15] ^= X->X[3]; + X->X[15] ^= X->X[4]; + X->X[15] ^= X->X[5]; + X->X[15] ^= X->X[6]; + X->X[15] ^= X->X[7]; + + X->X[14] ^= X->X[7]; + X->X[13] ^= X->X[7]; + X->X[12] ^= X->X[7]; + X->X[11] ^= X->X[7]; + X->X[10] ^= X->X[7]; + X->X[9] ^= X->X[7]; + debug_dump_buffer(X->debug, " State linearized :", sizeof(X->X), X->X, 10); }