Removed traits on structs not dependent on Module API

This commit is contained in:
Pro7ech
2025-10-20 10:32:02 +02:00
parent 60fbd3e625
commit 53bc78f421
50 changed files with 858 additions and 2010 deletions

View File

@@ -6,16 +6,16 @@ use poulpy_hal::{
use crate::{
GLWEKeyswitch, ScratchTakeCore,
layouts::{
GGLWEInfos, GLWE, GLWEAlloc, GLWEInfos, GLWELayout, GLWEToMut, LWE, LWEInfos, LWEToRef,
GGLWEInfos, GLWE, GLWEInfos, GLWELayout, GLWEToMut, LWE, LWEInfos, LWEToRef,
prepared::{LWEToGLWESwitchingKeyPrepared, LWEToGLWESwitchingKeyPreparedToRef},
},
};
impl<BE: Backend> GLWEFromLWE<BE> for Module<BE> where Self: GLWEKeyswitch<BE> + GLWEAlloc {}
impl<BE: Backend> GLWEFromLWE<BE> for Module<BE> where Self: GLWEKeyswitch<BE> {}
pub trait GLWEFromLWE<BE: Backend>
where
Self: GLWEKeyswitch<BE> + GLWEAlloc,
Self: GLWEKeyswitch<BE>,
{
fn glwe_from_lwe_tmp_bytes<R, A, K>(&self, glwe_infos: &R, lwe_infos: &A, key_infos: &K) -> usize
where
@@ -23,7 +23,8 @@ where
A: LWEInfos,
K: GGLWEInfos,
{
let ct: usize = self.bytes_of_glwe(
let ct: usize = GLWE::bytes_of(
self.n().into(),
key_infos.base2k(),
lwe_infos.k().max(glwe_infos.k()),
1u32.into(),