Files
poulpy/core/src/glwe/tests/generic_serialization.rs
Jean-Philippe Bossuat 9aa4b1f1e2 Dev serialization (#64)
* Added compressed serialization for GLWECiphertext + Ciphertext decompression

* Added compressed serialization for GGLWECiphertext & GLWESwitchingkey

* generalized automorphism test

* Removed ops on scalar_znx, replaced by as_vec_znx/as_vec_znx_mut and then call op on vec_znx

* Added tests for automorphism key encryption

* Added tensorkey compressed

* added ggsw compressed
2025-08-12 17:43:28 +02:00

24 lines
688 B
Rust

use backend::hal::{
api::VecZnxAlloc,
layouts::{Backend, Module},
tests::serialization::test_reader_writer_interface,
};
use crate::{GLWECiphertext, GLWECiphertextCompressed};
pub(crate) fn test_serialization<B: Backend>(module: &Module<B>)
where
Module<B>: VecZnxAlloc,
{
let original: GLWECiphertext<Vec<u8>> = GLWECiphertext::alloc(module, 12, 54, 3);
test_reader_writer_interface(original);
}
pub(crate) fn test_serialization_compressed<B: Backend>(module: &Module<B>)
where
Module<B>: VecZnxAlloc,
{
let original: GLWECiphertextCompressed<Vec<u8>> = GLWECiphertextCompressed::alloc(module, 12, 54, 3);
test_reader_writer_interface(original);
}