Skip to content

Commit

Permalink
fixup arm code
Browse files Browse the repository at this point in the history
  • Loading branch information
franziskuskiefer committed Oct 15, 2024
1 parent 9f6ddc6 commit d4a72f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions libcrux-ml-kem/cg/benches/mlkem768.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libcrux-ml-kem/cg/tests/mlkem768.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit d4a72f0

Please sign in to comment.