summaryrefslogtreecommitdiff
path: root/src/ref
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2019-07-05 09:48:32 +0200
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2019-07-05 09:51:21 +0200
commit5fdd2fd67a68d43830300c3ddf4440478ff73cfd (patch)
tree4b5a946faad84309dacbc406ded839ba8d521be9 /src/ref
parent5fc1268d9c866ac78d3360af51eb0c0201a31167 (diff)
downloadlilliput-ae-implem-5fdd2fd67a68d43830300c3ddf4440478ff73cfd.tar.xz
Utilisation de "size_t" pour l'indexation d'un tableau
Cf. db83bae, surtout par souci d'homogénéité.
Diffstat (limited to 'src/ref')
-rw-r--r--src/ref/cipher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ref/cipher.c b/src/ref/cipher.c
index 8ebbbc3..07405e1 100644
--- a/src/ref/cipher.c
+++ b/src/ref/cipher.c
@@ -148,7 +148,7 @@ void lilliput_tbc_encrypt(
uint8_t RTK[ROUNDS][ROUND_TWEAKEY_BYTES];
_compute_round_tweakeys(key, tweak, RTK);
- for (uint8_t i=0; i<ROUNDS-1; i++)
+ for (size_t i=0; i<ROUNDS-1; i++)
{
_one_round_egfn(X, RTK[i], PERMUTATION_ENCRYPTION);
}
@@ -171,7 +171,7 @@ void lilliput_tbc_decrypt(
uint8_t RTK[ROUNDS][ROUND_TWEAKEY_BYTES];
_compute_round_tweakeys(key, tweak, RTK);
- for (uint8_t i=0; i<ROUNDS-1; i++)
+ for (size_t i=0; i<ROUNDS-1; i++)
{
_one_round_egfn(X, RTK[ROUNDS-1-i], PERMUTATION_DECRYPTION);
}