fix(shortint): fix CompressedModulusSwitchNoiseReductionKey generation

- was using the wrong seeded encryption API resulting in garbage values
when decompressing
This commit is contained in:
Arthur Meyre
2025-02-15 13:19:50 +01:00
parent 49566cd7cf
commit e4e03277b5

View File

@@ -225,22 +225,22 @@ impl CompressedModulusSwitchNoiseReductionKey {
// Parallelism allowed
#[cfg(any(not(feature = "__wasm_api"), feature = "parallel-wasm-api"))]
par_encrypt_seeded_lwe_ciphertext_list_with_existing_generator(
par_encrypt_seeded_lwe_ciphertext_list(
secret_key,
&mut modulus_switch_zeros,
&plaintext_list,
lwe_noise_distribution,
&mut engine.encryption_generator,
&mut engine.seeder,
);
// No parallelism allowed
#[cfg(all(feature = "__wasm_api", not(feature = "parallel-wasm-api")))]
encrypt_seeded_lwe_ciphertext_list_with_existing_generator(
encrypt_seeded_lwe_ciphertext_list(
secret_key,
&mut modulus_switch_zeros,
&plaintext_list,
lwe_noise_distribution,
&mut engine.encryption_generator,
&mut engine.seeder,
);
Self {