This commit is contained in:
Pro7ech
2025-10-15 10:48:14 +02:00
parent a5df85170d
commit 008b800c01
74 changed files with 890 additions and 871 deletions

View File

@@ -5,7 +5,6 @@ use poulpy_hal::{
};
use crate::{
TakeGLWESecret,
encryption::compressed::gglwe_ksk::GGLWEKeyCompressedEncryptSk,
layouts::{
GGLWEInfos, GLWEInfos, GLWESecret, GLWESecretToRef, LWEInfos,
@@ -41,7 +40,7 @@ pub trait GGLWEAutomorphismKeyCompressedEncryptSk<B: Backend> {
impl<B: Backend> GGLWEAutomorphismKeyCompressedEncryptSk<B> for Module<B>
where
Module<B>: GGLWEKeyCompressedEncryptSk<B> + VecZnxNormalizeTmpBytes + VecZnxDftBytesOf + SvpPPolBytesOf + VecZnxAutomorphism,
Scratch<B>: TakeGLWESecret + ScratchAvailable,
Scratch<B>: ScratchAvailable,
{
fn gglwe_automorphism_key_compressed_encrypt_sk<R, S>(
&self,

View File

@@ -8,7 +8,6 @@ use poulpy_hal::{
};
use crate::{
TakeGLWEPlaintext,
encryption::{SIGMA, glwe_ct::GLWEEncryptSkInternal},
layouts::{
GGLWE, GGLWEInfos, LWEInfos,
@@ -67,7 +66,7 @@ where
+ VecZnxDftBytesOf
+ VecZnxAddScalarInplace
+ ZnNormalizeInplace<B>,
Scratch<B>: TakeGLWEPlaintext<B> + ScratchAvailable,
Scratch<B>: ScratchAvailable,
{
fn gglwe_compressed_encrypt_sk<R, P, S>(
&self,

View File

@@ -1,13 +1,10 @@
use poulpy_hal::{
api::{
ScratchAvailable, SvpPPolBytesOf, SvpPrepare, TakeScalarZnx, VecZnxDftBytesOf, VecZnxNormalizeTmpBytes, VecZnxSwitchRing,
},
api::{ScratchAvailable, SvpPPolBytesOf, SvpPrepare, VecZnxDftBytesOf, VecZnxNormalizeTmpBytes, VecZnxSwitchRing},
layouts::{Backend, DataMut, DataRef, Module, ScalarZnx, Scratch},
source::Source,
};
use crate::{
TakeGLWESecretPrepared,
encryption::compressed::gglwe_ct::GGLWECompressedEncryptSk,
layouts::{
Degree, GGLWE, GGLWEInfos, GLWEInfos, GLWESecret, GLWESecretToRef, LWEInfos,
@@ -68,7 +65,7 @@ where
+ VecZnxDftBytesOf
+ VecZnxSwitchRing
+ SvpPrepare<B>,
Scratch<B>: ScratchAvailable + TakeScalarZnx + TakeGLWESecretPrepared<B>,
Scratch<B>: ScratchAvailable,
{
fn gglwe_key_compressed_encrypt_sk<R, SI, SO>(
&self,

View File

@@ -1,14 +1,13 @@
use poulpy_hal::{
api::{
SvpApplyDftToDft, SvpPPolBytesOf, SvpPrepare, TakeVecZnxBig, TakeVecZnxDft, VecZnxBigBytesOf, VecZnxBigNormalize,
VecZnxDftApply, VecZnxDftBytesOf, VecZnxIdftApplyTmpA, VecZnxNormalizeTmpBytes,
SvpApplyDftToDft, SvpPPolBytesOf, SvpPrepare, VecZnxBigBytesOf, VecZnxBigNormalize, VecZnxDftApply, VecZnxDftBytesOf,
VecZnxIdftApplyTmpA, VecZnxNormalizeTmpBytes,
},
layouts::{Backend, DataMut, DataRef, Module, Scratch},
source::Source,
};
use crate::{
TakeGLWESecret, TakeGLWESecretPrepared,
encryption::compressed::gglwe_ksk::GGLWEKeyCompressedEncryptSk,
layouts::{
GGLWEInfos, GLWEInfos, GLWESecret, GLWESecretToRef, LWEInfos, Rank, TensorKey,
@@ -47,7 +46,7 @@ where
+ VecZnxIdftApplyTmpA<B>
+ VecZnxBigNormalize<B>
+ SvpPrepare<B>,
Scratch<B>: TakeGLWESecretPrepared<B> + TakeVecZnxDft<B> + TakeVecZnxBig<B> + TakeGLWESecret,
Scratch<B>:,
{
fn gglwe_tensor_key_encrypt_sk<R, S>(
&self,

View File

@@ -5,7 +5,6 @@ use poulpy_hal::{
};
use crate::{
TakeGLWEPlaintext,
encryption::{SIGMA, glwe_ct::GLWEEncryptSkInternal},
layouts::{
GGSW, GGSWInfos, GLWEInfos, LWEInfos,
@@ -42,7 +41,7 @@ pub trait GGSWCompressedEncryptSk<B: Backend> {
impl<B: Backend> GGSWCompressedEncryptSk<B> for Module<B>
where
Module<B>: GLWEEncryptSkInternal<B> + VecZnxAddScalarInplace + VecZnxNormalizeInplace<B>,
Scratch<B>: TakeGLWEPlaintext<B>,
Scratch<B>:,
{
fn ggsw_compressed_encrypt_sk<R, P, S>(
&self,