mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
Enforce extension factor to be a power of two
This commit is contained in:
@@ -82,7 +82,6 @@ pub fn cggi_blind_rotate<DataRes, DataIn>(
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: ENSURE DOMAIN EXTENSION AS
|
||||
pub(crate) fn cggi_blind_rotate_block_binary_extended<DataRes, DataIn>(
|
||||
module: &Module<FFT64>,
|
||||
res: &mut GLWECiphertext<DataRes>,
|
||||
|
||||
@@ -8,6 +8,14 @@ pub struct LookUpTable {
|
||||
|
||||
impl LookUpTable {
|
||||
pub fn alloc(module: &Module<FFT64>, basek: usize, k: usize, extension_factor: usize) -> Self {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
assert!(
|
||||
extension_factor & (extension_factor - 1) == 0,
|
||||
"extension_factor must be a power of two but is: {}",
|
||||
extension_factor
|
||||
);
|
||||
}
|
||||
let size: usize = k.div_ceil(basek);
|
||||
let mut data: Vec<VecZnx<Vec<u8>>> = Vec::with_capacity(extension_factor);
|
||||
(0..extension_factor).for_each(|_| {
|
||||
|
||||
Reference in New Issue
Block a user