diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-07-05 15:00:59 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-07-05 16:37:11 +0200 |
| commit | 1b4b310cde60372107376c130de1d1950adc8809 (patch) | |
| tree | 1b202648f34277df73e0718f7f03f3aba21a7255 /src/add_threshold/cipher.c | |
| parent | 4f58d99e11e1c412a600f39f32a8d181765f0246 (diff) | |
| download | lilliput-ae-implem-1b4b310cde60372107376c130de1d1950adc8809.tar.xz | |
Utilisation de "size_t" pour l'indexation d'un tableau
Cf. db83bae et 5fdd2fd, surtout par souci d'homogénéité.
Diffstat (limited to 'src/add_threshold/cipher.c')
| -rw-r--r-- | src/add_threshold/cipher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/add_threshold/cipher.c b/src/add_threshold/cipher.c index db1ec04..778a100 100644 --- a/src/add_threshold/cipher.c +++ b/src/add_threshold/cipher.c @@ -103,7 +103,7 @@ static void _state_init( memcpy(X, SHARES_0, BLOCK_BYTES); memcpy(Y, SHARES_1, BLOCK_BYTES); - for (uint8_t i=0; i<BLOCK_BYTES; i++) + for (size_t i=0; i<BLOCK_BYTES; i++) { Z[i] = message[i] ^ SHARES_0[i] ^ SHARES_1[i]; } @@ -122,7 +122,7 @@ static void _compute_round_tweakeys( tweakey_state_init(TK_X, TK_Y, key, tweak); tweakey_state_extract(TK_X, TK_Y, 0, RTK_X[0], RTK_Y[0]); - for (uint8_t i=1; i<ROUNDS; i++) + for (size_t i=1; i<ROUNDS; i++) { tweakey_state_update(TK_X, TK_Y); tweakey_state_extract(TK_X, TK_Y, i, RTK_X[i], RTK_Y[i]); |
