Skip to content

Commit

Permalink
Merge BoringSSL '1b2b7b2': Various -Wshorten-64-to-32 fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Sep 24, 2023
2 parents b08f7da + 1b2b7b2 commit 97a526c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crypto/fipsmodule/aes/aes_nohw.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ static void aes_nohw_encrypt_batch(const AES_NOHW_SCHEDULE *key,

static void aes_nohw_expand_round_keys(AES_NOHW_SCHEDULE *out,
const AES_KEY *key) {
for (unsigned i = 0; i <= key->rounds; i++) {
for (size_t i = 0; i <= key->rounds; i++) {
// Copy the round key into each block in the batch.
for (size_t j = 0; j < AES_NOHW_BATCH_SIZE; j++) {
aes_word_t tmp[AES_NOHW_BLOCK_WORDS];
Expand Down Expand Up @@ -921,8 +921,8 @@ void aes_nohw_ctr32_encrypt_blocks(const uint8_t *in, uint8_t *out,
uint32_t ctr = CRYPTO_load_u32_be(ivs + 12);
for (;;) {
// Update counters.
for (uint32_t i = 0; i < AES_NOHW_BATCH_SIZE; i++) {
CRYPTO_store_u32_be(ivs + 16 * i + 12, ctr + i);
for (size_t i = 0; i < AES_NOHW_BATCH_SIZE; i++) {
CRYPTO_store_u32_be(ivs + 16 * i + 12, ctr + (uint32_t)i);
}

size_t todo = blocks >= AES_NOHW_BATCH_SIZE ? AES_NOHW_BATCH_SIZE : blocks;
Expand Down

0 comments on commit 97a526c

Please sign in to comment.