summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-11-15 00:22:50 (GMT)
committerGitHub <noreply@github.com>2024-11-15 00:22:50 (GMT)
commit3fecbe9255391be1ac3c3b52dfe0254ee5c665bd (patch)
treef181bd00817400f194f00f28d6cc42e3a0373f90 /Modules
parent9a456383bed52010b90bd491277ea855626a7bba (diff)
downloadcpython-3fecbe9255391be1ac3c3b52dfe0254ee5c665bd.zip
cpython-3fecbe9255391be1ac3c3b52dfe0254ee5c665bd.tar.gz
cpython-3fecbe9255391be1ac3c3b52dfe0254ee5c665bd.tar.bz2
gh-126433: Update hacl-star (GH-126791)
Retrieve the change: "Lib_Memzero0.c: Fix compiler warning on 32-bit Windows".
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_hacl/Hacl_Hash_Blake2b.c3
-rw-r--r--Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c3
-rw-r--r--Modules/_hacl/Hacl_Hash_Blake2s.c3
-rw-r--r--Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c3
-rw-r--r--Modules/_hacl/Hacl_Hash_SHA2.c6
-rw-r--r--Modules/_hacl/Hacl_Hash_SHA3.c3
-rw-r--r--Modules/_hacl/Lib_Memzero0.c2
-rw-r--r--Modules/_hacl/internal/Hacl_Hash_SHA2.h2
-rwxr-xr-xModules/_hacl/refresh.sh2
9 files changed, 17 insertions, 10 deletions
diff --git a/Modules/_hacl/Hacl_Hash_Blake2b.c b/Modules/_hacl/Hacl_Hash_Blake2b.c
index cd3b977..1bab75e 100644
--- a/Modules/_hacl/Hacl_Hash_Blake2b.c
+++ b/Modules/_hacl/Hacl_Hash_Blake2b.c
@@ -1029,7 +1029,8 @@ Hacl_Hash_Blake2b_reset_with_key_and_params(
uint8_t *k
)
{
- index_of_state(s);
+ Hacl_Hash_Blake2b_index i1 = index_of_state(s);
+ KRML_MAYBE_UNUSED_VAR(i1);
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
}
diff --git a/Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c b/Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c
index 92b2e8f..19234ab 100644
--- a/Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c
+++ b/Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c
@@ -855,7 +855,8 @@ Hacl_Hash_Blake2b_Simd256_reset_with_key_and_params(
uint8_t *k
)
{
- index_of_state(s);
+ Hacl_Hash_Blake2b_index i1 = index_of_state(s);
+ KRML_MAYBE_UNUSED_VAR(i1);
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
}
diff --git a/Modules/_hacl/Hacl_Hash_Blake2s.c b/Modules/_hacl/Hacl_Hash_Blake2s.c
index e5e0ecd..ceb7385 100644
--- a/Modules/_hacl/Hacl_Hash_Blake2s.c
+++ b/Modules/_hacl/Hacl_Hash_Blake2s.c
@@ -1011,7 +1011,8 @@ Hacl_Hash_Blake2s_reset_with_key_and_params(
uint8_t *k
)
{
- index_of_state(s);
+ Hacl_Hash_Blake2b_index i1 = index_of_state(s);
+ KRML_MAYBE_UNUSED_VAR(i1);
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
}
diff --git a/Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c b/Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c
index f675a7f..3b68783 100644
--- a/Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c
+++ b/Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c
@@ -842,7 +842,8 @@ Hacl_Hash_Blake2s_Simd128_reset_with_key_and_params(
uint8_t *k
)
{
- index_of_state(s);
+ Hacl_Hash_Blake2b_index i1 = index_of_state(s);
+ KRML_MAYBE_UNUSED_VAR(i1);
reset_raw(s, ((Hacl_Hash_Blake2b_params_and_key){ .fst = p, .snd = k }));
}
diff --git a/Modules/_hacl/Hacl_Hash_SHA2.c b/Modules/_hacl/Hacl_Hash_SHA2.c
index 4b6af5f..cc930bb 100644
--- a/Modules/_hacl/Hacl_Hash_SHA2.c
+++ b/Modules/_hacl/Hacl_Hash_SHA2.c
@@ -211,7 +211,7 @@ void Hacl_Hash_SHA2_sha224_init(uint32_t *hash)
os[i] = x;);
}
-static inline void sha224_update_nblocks(uint32_t len, uint8_t *b, uint32_t *st)
+void Hacl_Hash_SHA2_sha224_update_nblocks(uint32_t len, uint8_t *b, uint32_t *st)
{
Hacl_Hash_SHA2_sha256_update_nblocks(len, b, st);
}
@@ -825,7 +825,7 @@ void Hacl_Hash_SHA2_digest_224(Hacl_Streaming_MD_state_32 *state, uint8_t *outpu
}
uint8_t *buf_last = buf_1 + r - ite;
uint8_t *buf_multi = buf_1;
- sha224_update_nblocks(0U, buf_multi, tmp_block_state);
+ Hacl_Hash_SHA2_sha224_update_nblocks(0U, buf_multi, tmp_block_state);
uint64_t prev_len_last = total_len - (uint64_t)r;
Hacl_Hash_SHA2_sha224_update_last(prev_len_last + (uint64_t)r, r, buf_last, tmp_block_state);
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
Hacl_Hash_SHA2_sha224_init(st);
uint32_t rem = input_len % 64U;
uint64_t len_ = (uint64_t)input_len;
- sha224_update_nblocks(input_len, ib, st);
+ Hacl_Hash_SHA2_sha224_update_nblocks(input_len, ib, st);
uint32_t rem1 = input_len % 64U;
uint8_t *b0 = ib;
uint8_t *lb = b0 + input_len - rem1;
diff --git a/Modules/_hacl/Hacl_Hash_SHA3.c b/Modules/_hacl/Hacl_Hash_SHA3.c
index 9cf5abb..b964e1d 100644
--- a/Modules/_hacl/Hacl_Hash_SHA3.c
+++ b/Modules/_hacl/Hacl_Hash_SHA3.c
@@ -251,7 +251,8 @@ Hacl_Hash_SHA3_update_multi_sha3(
uint8_t *bl0 = b_;
uint8_t *uu____0 = b0 + i * block_len(a);
memcpy(bl0, uu____0, block_len(a) * sizeof (uint8_t));
- block_len(a);
+ uint32_t unused = block_len(a);
+ KRML_MAYBE_UNUSED_VAR(unused);
absorb_inner_32(b_, s);
}
}
diff --git a/Modules/_hacl/Lib_Memzero0.c b/Modules/_hacl/Lib_Memzero0.c
index 5b1a2f7..5c269d2 100644
--- a/Modules/_hacl/Lib_Memzero0.c
+++ b/Modules/_hacl/Lib_Memzero0.c
@@ -36,7 +36,7 @@ void Lib_Memzero0_memzero0(void *dst, uint64_t len) {
size_t len_ = (size_t) len;
#ifdef _WIN32
- SecureZeroMemory(dst, len);
+ SecureZeroMemory(dst, len_);
#elif defined(__APPLE__) && defined(__MACH__)
memset_s(dst, len_, 0, len_);
#elif (defined(__linux__) && !defined(LINUX_NO_EXPLICIT_BZERO)) || defined(__FreeBSD__)
diff --git a/Modules/_hacl/internal/Hacl_Hash_SHA2.h b/Modules/_hacl/internal/Hacl_Hash_SHA2.h
index 0127f43..cb60f9e 100644
--- a/Modules/_hacl/internal/Hacl_Hash_SHA2.h
+++ b/Modules/_hacl/internal/Hacl_Hash_SHA2.h
@@ -123,6 +123,8 @@ void Hacl_Hash_SHA2_sha256_finish(uint32_t *st, uint8_t *h);
void Hacl_Hash_SHA2_sha224_init(uint32_t *hash);
+void Hacl_Hash_SHA2_sha224_update_nblocks(uint32_t len, uint8_t *b, uint32_t *st);
+
void
Hacl_Hash_SHA2_sha224_update_last(uint64_t totlen, uint32_t len, uint8_t *b, uint32_t *st);
diff --git a/Modules/_hacl/refresh.sh b/Modules/_hacl/refresh.sh
index 6234fea..4147ab3 100755
--- a/Modules/_hacl/refresh.sh
+++ b/Modules/_hacl/refresh.sh
@@ -22,7 +22,7 @@ fi
# Update this when updating to a new version after verifying that the changes
# the update brings in are good.
-expected_hacl_star_rev=315a9e491d2bc347b9dae99e0ea506995ea84d9d
+expected_hacl_star_rev=f218923ef2417d963d7efc7951593ae6aef613f7
hacl_dir="$(realpath "$1")"
cd "$(dirname "$0")"