summaryrefslogtreecommitdiff
path: root/src/ref
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2019-05-20 15:07:58 +0200
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2019-05-20 15:07:58 +0200
commit96fa2a449999e2e3a077a9a5c5c061d59fcf8c10 (patch)
treeb45bc0587efb2aaa27928d3cac6db5187f864a2b /src/ref
parentf77abc48bbd4009aa959984a3e2840b3ee462790 (diff)
downloadlilliput-ae-implem-96fa2a449999e2e3a077a9a5c5c061d59fcf8c10.tar.xz
Inversion de la seconde boucle de la couche linéaire
1. Ça ressemble plus à ce qu'on voit sur le schéma. 2. Pour une raison obscure, la version incrémentée bouffe souvent plus de ROM et plus de cycles (jusqu'à 5% de ROM sur ARM).
Diffstat (limited to 'src/ref')
-rw-r--r--src/ref/cipher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ref/cipher.c b/src/ref/cipher.c
index 6f1b4b5..8ebbbc3 100644
--- a/src/ref/cipher.c
+++ b/src/ref/cipher.c
@@ -103,7 +103,7 @@ static void _linear_layer(uint8_t X[BLOCK_BYTES])
X[15] ^= X[j];
}
- for (size_t j=9; j<15; j++)
+ for (size_t j=14; j>8; j--)
{
X[j] ^= X[7];
}