mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 13:16:44 +01:00
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
This commit is contained in:
committed by
GitHub
parent
4c59733566
commit
9aa4b1f1e2
23
core/src/glwe/tests/generic_serialization.rs
Normal file
23
core/src/glwe/tests/generic_serialization.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user