From d4a72f038b36e2ebcc1891484a2f10665daae3ed Mon Sep 17 00:00:00 2001 From: Franziskus Kiefer Date: Tue, 15 Oct 2024 11:11:22 +0200 Subject: [PATCH] fixup arm code --- libcrux-ml-kem/cg/benches/mlkem768.cc | 8 ++++---- libcrux-ml-kem/cg/tests/mlkem768.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libcrux-ml-kem/cg/benches/mlkem768.cc b/libcrux-ml-kem/cg/benches/mlkem768.cc index 7ce70a7e1..85928cc1e 100644 --- a/libcrux-ml-kem/cg/benches/mlkem768.cc +++ b/libcrux-ml-kem/cg/benches/mlkem768.cc @@ -35,11 +35,11 @@ kyber768_key_generation_unpacked(benchmark::State &state) uint8_t randomness[64]; generate_random(randomness, 64); libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked key_pair = libcrux_ml_kem_mlkem768_portable_unpacked_init_key_pair() ; - libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair(randomness, &key_pair); + libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair_mut(randomness, &key_pair); for (auto _ : state) { - libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair(randomness, &key_pair); + libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair_mut(randomness, &key_pair); } } @@ -66,7 +66,7 @@ kyber768_encapsulation_unpacked(benchmark::State &state) generate_random(randomness, 64); libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked key_pair = libcrux_ml_kem_mlkem768_portable_unpacked_init_key_pair() ; - libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair(randomness, &key_pair); + libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair_mut(randomness, &key_pair); generate_random(randomness, 32); auto ctxt = libcrux_ml_kem_mlkem768_portable_unpacked_encapsulate(&key_pair.public_key, randomness); @@ -102,7 +102,7 @@ kyber768_decapsulation_unpacked(benchmark::State &state) generate_random(randomness, 64); libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked key_pair = libcrux_ml_kem_mlkem768_portable_unpacked_init_key_pair() ; - libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair(randomness, &key_pair); + libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair_mut(randomness, &key_pair); generate_random(randomness, 32); auto ctxt = libcrux_ml_kem_mlkem768_portable_unpacked_encapsulate(&key_pair.public_key, randomness); diff --git a/libcrux-ml-kem/cg/tests/mlkem768.cc b/libcrux-ml-kem/cg/tests/mlkem768.cc index 947171f58..64abd5c88 100644 --- a/libcrux-ml-kem/cg/tests/mlkem768.cc +++ b/libcrux-ml-kem/cg/tests/mlkem768.cc @@ -106,7 +106,7 @@ TEST(MlKem768TestPortableUnpacked, ConsistencyTest) keygen_randomness[i] = 13; } libcrux_ml_kem_mlkem768_portable_unpacked_MlKem768KeyPairUnpacked key_pair = libcrux_ml_kem_mlkem768_portable_unpacked_init_key_pair() ; - libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair(keygen_randomness, &key_pair); + libcrux_ml_kem_mlkem768_portable_unpacked_generate_key_pair_mut(keygen_randomness, &key_pair); uint8_t encap_randomness[32]; for (int i = 0; i < 32; i++)