summaryrefslogtreecommitdiff
path: root/src/add_felicsref/cipher.c
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
commitb29cc9d5f7bf458fb499ed6ab7c409310287397a (patch)
tree4b5a946faad84309dacbc406ded839ba8d521be9 /src/add_felicsref/cipher.c
parent3d1334d6a9eb091b457f068033071f97d8758941 (diff)
downloadlilliput-ae-implem-b29cc9d5f7bf458fb499ed6ab7c409310287397a.tar.xz
Utilisation de "size_t" pour l'indexation d'un tableau
Cf. ef17fe7, surtout par souci d'homogénéité.
Diffstat (limited to 'src/add_felicsref/cipher.c')
-rw-r--r--src/add_felicsref/cipher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/add_felicsref/cipher.c b/src/add_felicsref/cipher.c
index 7de0a08..59bc5d8 100644
--- a/src/add_felicsref/cipher.c
+++ b/src/add_felicsref/cipher.c
@@ -150,7 +150,7 @@ void lilliput_tbc_encrypt(
uint8_t RTK[ROUND_TWEAKEY_BYTES];
tweakey_state_init(TK, key, tweak);
- for (unsigned i=0; i<ROUNDS-1; i++)
+ for (size_t i=0; i<ROUNDS-1; i++)
{
tweakey_state_extract(TK, i, RTK);
_one_round_egfn(ciphertext, RTK, PERMUTATION_ENCRYPTION);
@@ -174,7 +174,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);
}