Skip to content

Commit 3fecbe9

Browse files
authored
gh-126433: Update hacl-star (GH-126791)
Retrieve the change: "Lib_Memzero0.c: Fix compiler warning on 32-bit Windows".
1 parent 9a45638 commit 3fecbe9

10 files changed

+37
-30
lines changed

Misc/sbom.spdx.json

+20-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/_hacl/Hacl_Hash_Blake2b.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,8 @@ Hacl_Hash_Blake2b_reset_with_key_and_params(
10291029
uint8_t *k
10301030
)
10311031
{
1032-
index_of_state(s);
1032+
Hacl_Hash_Blake2b_index i1 = index_of_state(s);
1033+
KRML_MAYBE_UNUSED_VAR(i1);
10331034
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
10341035
}
10351036

Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,8 @@ Hacl_Hash_Blake2b_Simd256_reset_with_key_and_params(
855855
uint8_t *k
856856
)
857857
{
858-
index_of_state(s);
858+
Hacl_Hash_Blake2b_index i1 = index_of_state(s);
859+
KRML_MAYBE_UNUSED_VAR(i1);
859860
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
860861
}
861862

Modules/_hacl/Hacl_Hash_Blake2s.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,8 @@ Hacl_Hash_Blake2s_reset_with_key_and_params(
10111011
uint8_t *k
10121012
)
10131013
{
1014-
index_of_state(s);
1014+
Hacl_Hash_Blake2b_index i1 = index_of_state(s);
1015+
KRML_MAYBE_UNUSED_VAR(i1);
10151016
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
10161017
}
10171018

Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,8 @@ Hacl_Hash_Blake2s_Simd128_reset_with_key_and_params(
842842
uint8_t *k
843843
)
844844
{
845-
index_of_state(s);
845+
Hacl_Hash_Blake2b_index i1 = index_of_state(s);
846+
KRML_MAYBE_UNUSED_VAR(i1);
846847
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
847848
}
848849

Modules/_hacl/Hacl_Hash_SHA2.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void Hacl_Hash_SHA2_sha224_init(uint32_t *hash)
211211
os[i] = x;);
212212
}
213213

214-
static inline void sha224_update_nblocks(uint32_t len, uint8_t *b, uint32_t *st)
214+
void Hacl_Hash_SHA2_sha224_update_nblocks(uint32_t len, uint8_t *b, uint32_t *st)
215215
{
216216
Hacl_Hash_SHA2_sha256_update_nblocks(len, b, st);
217217
}
@@ -825,7 +825,7 @@ void Hacl_Hash_SHA2_digest_224(Hacl_Streaming_MD_state_32 *state, uint8_t *outpu
825825
}
826826
uint8_t *buf_last = buf_1 + r - ite;
827827
uint8_t *buf_multi = buf_1;
828-
sha224_update_nblocks(0U, buf_multi, tmp_block_state);
828+
Hacl_Hash_SHA2_sha224_update_nblocks(0U, buf_multi, tmp_block_state);
829829
uint64_t prev_len_last = total_len - (uint64_t)r;
830830
Hacl_Hash_SHA2_sha224_update_last(prev_len_last + (uint64_t)r, r, buf_last, tmp_block_state);
831831
Hacl_Hash_SHA2_sha224_finish(tmp_block_state, output);
@@ -847,7 +847,7 @@ void Hacl_Hash_SHA2_hash_224(uint8_t *output, uint8_t *input, uint32_t input_len
847847
Hacl_Hash_SHA2_sha224_init(st);
848848
uint32_t rem = input_len % 64U;
849849
uint64_t len_ = (uint64_t)input_len;
850-
sha224_update_nblocks(input_len, ib, st);
850+
Hacl_Hash_SHA2_sha224_update_nblocks(input_len, ib, st);
851851
uint32_t rem1 = input_len % 64U;
852852
uint8_t *b0 = ib;
853853
uint8_t *lb = b0 + input_len - rem1;

Modules/_hacl/Hacl_Hash_SHA3.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ Hacl_Hash_SHA3_update_multi_sha3(
251251
uint8_t *bl0 = b_;
252252
uint8_t *uu____0 = b0 + i * block_len(a);
253253
memcpy(bl0, uu____0, block_len(a) * sizeof (uint8_t));
254-
block_len(a);
254+
uint32_t unused = block_len(a);
255+
KRML_MAYBE_UNUSED_VAR(unused);
255256
absorb_inner_32(b_, s);
256257
}
257258
}

Modules/_hacl/Lib_Memzero0.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void Lib_Memzero0_memzero0(void *dst, uint64_t len) {
3636
size_t len_ = (size_t) len;
3737

3838
#ifdef _WIN32
39-
SecureZeroMemory(dst, len);
39+
SecureZeroMemory(dst, len_);
4040
#elif defined(__APPLE__) && defined(__MACH__)
4141
memset_s(dst, len_, 0, len_);
4242
#elif (defined(__linux__) && !defined(LINUX_NO_EXPLICIT_BZERO)) || defined(__FreeBSD__)

Modules/_hacl/internal/Hacl_Hash_SHA2.h

+2
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ void Hacl_Hash_SHA2_sha256_finish(uint32_t *st, uint8_t *h);
123123

124124
void Hacl_Hash_SHA2_sha224_init(uint32_t *hash);
125125

126+
void Hacl_Hash_SHA2_sha224_update_nblocks(uint32_t len, uint8_t *b, uint32_t *st);
127+
126128
void
127129
Hacl_Hash_SHA2_sha224_update_last(uint64_t totlen, uint32_t len, uint8_t *b, uint32_t *st);
128130

Modules/_hacl/refresh.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fi
2222

2323
# Update this when updating to a new version after verifying that the changes
2424
# the update brings in are good.
25-
expected_hacl_star_rev=315a9e491d2bc347b9dae99e0ea506995ea84d9d
25+
expected_hacl_star_rev=f218923ef2417d963d7efc7951593ae6aef613f7
2626

2727
hacl_dir="$(realpath "$1")"
2828
cd "$(dirname "$0")"

0 commit comments

Comments
 (0)