mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
* 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
24 lines
688 B
Rust
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);
|
|
}
|