Skip to content

Commit 1566c34

Browse files
gh-134069: bump HACL* revision to incoporate memset_s (#134027)
Bumps the HACL* revision to include recent revisions that corrects issues building with legacy/cross-platform macOS SDKs. Signed-off-by: aeiouaeiouaeiouaeiouaeiouaeiou <[email protected]>
1 parent 7a504b3 commit 1566c34

13 files changed

+405
-648
lines changed

Misc/sbom.spdx.json

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/_hacl/Hacl_Hash_Blake2b.c

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,9 @@ void Hacl_Hash_Blake2b_init(uint64_t *hash, uint32_t kk, uint32_t nn)
544544
uint64_t x = r;
545545
os[i] = x;);
546546
tmp[0U] =
547-
(uint64_t)nn1
548-
^
549-
((uint64_t)kk1
550-
<< 8U
551-
^ ((uint64_t)p.fanout << 16U ^ ((uint64_t)p.depth << 24U ^ (uint64_t)p.leaf_length << 32U)));
547+
(uint64_t)nn1 ^
548+
((uint64_t)kk1 << 8U ^
549+
((uint64_t)p.fanout << 16U ^ ((uint64_t)p.depth << 24U ^ (uint64_t)p.leaf_length << 32U)));
552550
tmp[1U] = p.node_offset;
553551
tmp[2U] = (uint64_t)p.node_depth ^ (uint64_t)p.inner_length << 8U;
554552
tmp[3U] = 0ULL;
@@ -860,14 +858,10 @@ static Hacl_Hash_Blake2b_state_t
860858
uint64_t x = r4;
861859
os[i0] = x;);
862860
tmp[0U] =
863-
(uint64_t)nn1
864-
^
865-
((uint64_t)kk2
866-
<< 8U
867-
^
868-
((uint64_t)pv.fanout
869-
<< 16U
870-
^ ((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
861+
(uint64_t)nn1 ^
862+
((uint64_t)kk2 << 8U ^
863+
((uint64_t)pv.fanout << 16U ^
864+
((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
871865
tmp[1U] = pv.node_offset;
872866
tmp[2U] = (uint64_t)pv.node_depth ^ (uint64_t)pv.inner_length << 8U;
873867
tmp[3U] = 0ULL;
@@ -1059,11 +1053,9 @@ static void reset_raw(Hacl_Hash_Blake2b_state_t *state, Hacl_Hash_Blake2b_params
10591053
uint64_t x = r;
10601054
os[i0] = x;);
10611055
tmp[0U] =
1062-
(uint64_t)nn1
1063-
^
1064-
((uint64_t)kk2
1065-
<< 8U
1066-
^ ((uint64_t)pv.fanout << 16U ^ ((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
1056+
(uint64_t)nn1 ^
1057+
((uint64_t)kk2 << 8U ^
1058+
((uint64_t)pv.fanout << 16U ^ ((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
10671059
tmp[1U] = pv.node_offset;
10681060
tmp[2U] = (uint64_t)pv.node_depth ^ (uint64_t)pv.inner_length << 8U;
10691061
tmp[3U] = 0ULL;
@@ -1200,8 +1192,7 @@ Hacl_Hash_Blake2b_update(Hacl_Hash_Blake2b_state_t *state, uint8_t *chunk, uint3
12001192
uint8_t *buf2 = buf + sz1;
12011193
memcpy(buf2, chunk, chunk_len * sizeof (uint8_t));
12021194
uint64_t total_len2 = total_len1 + (uint64_t)chunk_len;
1203-
*state
1204-
=
1195+
*state =
12051196
(
12061197
(Hacl_Hash_Blake2b_state_t){
12071198
.block_state = block_state1,
@@ -1265,8 +1256,7 @@ Hacl_Hash_Blake2b_update(Hacl_Hash_Blake2b_state_t *state, uint8_t *chunk, uint3
12651256
nb);
12661257
uint8_t *dst = buf;
12671258
memcpy(dst, data2, data2_len * sizeof (uint8_t));
1268-
*state
1269-
=
1259+
*state =
12701260
(
12711261
(Hacl_Hash_Blake2b_state_t){
12721262
.block_state = block_state1,
@@ -1296,8 +1286,7 @@ Hacl_Hash_Blake2b_update(Hacl_Hash_Blake2b_state_t *state, uint8_t *chunk, uint3
12961286
uint8_t *buf2 = buf0 + sz10;
12971287
memcpy(buf2, chunk1, diff * sizeof (uint8_t));
12981288
uint64_t total_len2 = total_len10 + (uint64_t)diff;
1299-
*state
1300-
=
1289+
*state =
13011290
(
13021291
(Hacl_Hash_Blake2b_state_t){
13031292
.block_state = block_state10,
@@ -1359,8 +1348,7 @@ Hacl_Hash_Blake2b_update(Hacl_Hash_Blake2b_state_t *state, uint8_t *chunk, uint3
13591348
nb);
13601349
uint8_t *dst = buf;
13611350
memcpy(dst, data2, data2_len * sizeof (uint8_t));
1362-
*state
1363-
=
1351+
*state =
13641352
(
13651353
(Hacl_Hash_Blake2b_state_t){
13661354
.block_state = block_state1,
@@ -1690,14 +1678,10 @@ Hacl_Hash_Blake2b_hash_with_key_and_params(
16901678
uint64_t x = r;
16911679
os[i] = x;);
16921680
tmp[0U] =
1693-
(uint64_t)nn
1694-
^
1695-
((uint64_t)kk
1696-
<< 8U
1697-
^
1698-
((uint64_t)params.fanout
1699-
<< 16U
1700-
^ ((uint64_t)params.depth << 24U ^ (uint64_t)params.leaf_length << 32U)));
1681+
(uint64_t)nn ^
1682+
((uint64_t)kk << 8U ^
1683+
((uint64_t)params.fanout << 16U ^
1684+
((uint64_t)params.depth << 24U ^ (uint64_t)params.leaf_length << 32U)));
17011685
tmp[1U] = params.node_offset;
17021686
tmp[2U] = (uint64_t)params.node_depth ^ (uint64_t)params.inner_length << 8U;
17031687
tmp[3U] = 0ULL;

Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,9 @@ Hacl_Hash_Blake2b_Simd256_init(Lib_IntVector_Intrinsics_vec256 *hash, uint32_t k
274274
uint64_t x = r;
275275
os[i] = x;);
276276
tmp[0U] =
277-
(uint64_t)nn1
278-
^
279-
((uint64_t)kk1
280-
<< 8U
281-
^ ((uint64_t)p.fanout << 16U ^ ((uint64_t)p.depth << 24U ^ (uint64_t)p.leaf_length << 32U)));
277+
(uint64_t)nn1 ^
278+
((uint64_t)kk1 << 8U ^
279+
((uint64_t)p.fanout << 16U ^ ((uint64_t)p.depth << 24U ^ (uint64_t)p.leaf_length << 32U)));
282280
tmp[1U] = p.node_offset;
283281
tmp[2U] = (uint64_t)p.node_depth ^ (uint64_t)p.inner_length << 8U;
284282
tmp[3U] = 0ULL;
@@ -746,14 +744,10 @@ static Hacl_Hash_Blake2b_Simd256_state_t
746744
uint64_t x = r4;
747745
os[i0] = x;);
748746
tmp[0U] =
749-
(uint64_t)nn1
750-
^
751-
((uint64_t)kk2
752-
<< 8U
753-
^
754-
((uint64_t)pv.fanout
755-
<< 16U
756-
^ ((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
747+
(uint64_t)nn1 ^
748+
((uint64_t)kk2 << 8U ^
749+
((uint64_t)pv.fanout << 16U ^
750+
((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
757751
tmp[1U] = pv.node_offset;
758752
tmp[2U] = (uint64_t)pv.node_depth ^ (uint64_t)pv.inner_length << 8U;
759753
tmp[3U] = 0ULL;
@@ -936,11 +930,9 @@ reset_raw(Hacl_Hash_Blake2b_Simd256_state_t *state, Hacl_Hash_Blake2b_params_and
936930
uint64_t x = r;
937931
os[i0] = x;);
938932
tmp[0U] =
939-
(uint64_t)nn1
940-
^
941-
((uint64_t)kk2
942-
<< 8U
943-
^ ((uint64_t)pv.fanout << 16U ^ ((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
933+
(uint64_t)nn1 ^
934+
((uint64_t)kk2 << 8U ^
935+
((uint64_t)pv.fanout << 16U ^ ((uint64_t)pv.depth << 24U ^ (uint64_t)pv.leaf_length << 32U)));
944936
tmp[1U] = pv.node_offset;
945937
tmp[2U] = (uint64_t)pv.node_depth ^ (uint64_t)pv.inner_length << 8U;
946938
tmp[3U] = 0ULL;
@@ -1075,8 +1067,7 @@ Hacl_Hash_Blake2b_Simd256_update(
10751067
uint8_t *buf2 = buf + sz1;
10761068
memcpy(buf2, chunk, chunk_len * sizeof (uint8_t));
10771069
uint64_t total_len2 = total_len1 + (uint64_t)chunk_len;
1078-
*state
1079-
=
1070+
*state =
10801071
(
10811072
(Hacl_Hash_Blake2b_Simd256_state_t){
10821073
.block_state = block_state1,
@@ -1140,8 +1131,7 @@ Hacl_Hash_Blake2b_Simd256_update(
11401131
nb);
11411132
uint8_t *dst = buf;
11421133
memcpy(dst, data2, data2_len * sizeof (uint8_t));
1143-
*state
1144-
=
1134+
*state =
11451135
(
11461136
(Hacl_Hash_Blake2b_Simd256_state_t){
11471137
.block_state = block_state1,
@@ -1171,8 +1161,7 @@ Hacl_Hash_Blake2b_Simd256_update(
11711161
uint8_t *buf2 = buf0 + sz10;
11721162
memcpy(buf2, chunk1, diff * sizeof (uint8_t));
11731163
uint64_t total_len2 = total_len10 + (uint64_t)diff;
1174-
*state
1175-
=
1164+
*state =
11761165
(
11771166
(Hacl_Hash_Blake2b_Simd256_state_t){
11781167
.block_state = block_state10,
@@ -1234,8 +1223,7 @@ Hacl_Hash_Blake2b_Simd256_update(
12341223
nb);
12351224
uint8_t *dst = buf;
12361225
memcpy(dst, data2, data2_len * sizeof (uint8_t));
1237-
*state
1238-
=
1226+
*state =
12391227
(
12401228
(Hacl_Hash_Blake2b_Simd256_state_t){
12411229
.block_state = block_state1,
@@ -1578,14 +1566,10 @@ Hacl_Hash_Blake2b_Simd256_hash_with_key_and_params(
15781566
uint64_t x = r;
15791567
os[i] = x;);
15801568
tmp[0U] =
1581-
(uint64_t)nn
1582-
^
1583-
((uint64_t)kk
1584-
<< 8U
1585-
^
1586-
((uint64_t)params.fanout
1587-
<< 16U
1588-
^ ((uint64_t)params.depth << 24U ^ (uint64_t)params.leaf_length << 32U)));
1569+
(uint64_t)nn ^
1570+
((uint64_t)kk << 8U ^
1571+
((uint64_t)params.fanout << 16U ^
1572+
((uint64_t)params.depth << 24U ^ (uint64_t)params.leaf_length << 32U)));
15891573
tmp[1U] = params.node_offset;
15901574
tmp[2U] = (uint64_t)params.node_depth ^ (uint64_t)params.inner_length << 8U;
15911575
tmp[3U] = 0ULL;

0 commit comments

Comments
 (0)