This commit is contained in:
Jean-Philippe Bossuat
2025-05-07 10:23:18 +02:00
parent 9afe9372bd
commit ccebb80660
5 changed files with 128 additions and 44 deletions

View File

@@ -1,6 +1,5 @@
use base2k::{
Backend, FFT64, Module, Scalar, ScalarAlloc, ScalarZnxDft, ScalarZnxDftOps, ScalarZnxDftToMut, Scratch, VecZnxDft,
VecZnxDftAlloc, VecZnxDftToMut,
Backend, Module, Scalar, ScalarAlloc, ScalarZnxDft, ScalarZnxDftAlloc, ScalarZnxDftOps, ScalarZnxDftToMut, Scratch, VecZnxDft, VecZnxDftAlloc, VecZnxDftToMut, ZnxInfos, FFT64
};
use sampling::source::Source;
@@ -43,6 +42,16 @@ impl SecretKey<Scalar<Vec<u8>>> {
}
}
type SecretKeyPrep<C, B> = SecretKey<ScalarZnxDft<C, B>>;
impl<B: Backend> SecretKey<ScalarZnxDft<Vec<u8>, B>> {
pub fn new(module: &Module<B>) -> Self{
Self{
data: module.new_scalar_znx_dft(1)
}
}
}
pub struct PublicKey<D, B: Backend> {
data: VecZnxDft<D, B>,
}