Update READMEs & add SECURITY.md (#78)

This commit is contained in:
Jean-Philippe Bossuat
2025-08-20 20:52:59 +02:00
committed by GitHub
parent 3b94ab047e
commit ccd94e36cc
256 changed files with 1982 additions and 31869 deletions

View File

@@ -35,7 +35,6 @@ impl<DataSelf: DataMut> GGLWEAutomorphismKeyCompressed<DataSelf> {
sk: &GLWESecret<DataSk>,
seed_xa: [u8; 32],
source_xe: &mut Source,
sigma: f64,
scratch: &mut Scratch<B>,
) where
Module<B>: VecZnxAutomorphism
@@ -97,7 +96,7 @@ impl<DataSelf: DataMut> GGLWEAutomorphismKeyCompressed<DataSelf> {
}
self.key
.encrypt_sk(module, sk, &sk_out, seed_xa, source_xe, sigma, scratch_1);
.encrypt_sk(module, sk, &sk_out, seed_xa, source_xe, scratch_1);
self.p = p;
}

View File

@@ -10,7 +10,7 @@ use poulpy_hal::{
use crate::{
TakeGLWEPt,
encryption::glwe_encrypt_sk_internal,
encryption::{SIGMA, glwe_encrypt_sk_internal},
layouts::{GGLWECiphertext, Infos, compressed::GGLWECiphertextCompressed, prepared::GLWESecretPrepared},
};
@@ -32,7 +32,6 @@ impl<D: DataMut> GGLWECiphertextCompressed<D> {
sk: &GLWESecretPrepared<DataSk, B>,
seed: [u8; 32],
source_xe: &mut Source,
sigma: f64,
scratch: &mut Scratch<B>,
) where
Module<B>: VecZnxAddScalarInplace
@@ -128,7 +127,7 @@ impl<D: DataMut> GGLWECiphertextCompressed<D> {
sk,
&mut source_xa_tmp,
source_xe,
sigma,
SIGMA,
scrach_1,
);
});

View File

@@ -41,7 +41,6 @@ impl<DataSelf: DataMut> GGLWESwitchingKeyCompressed<DataSelf> {
sk_out: &GLWESecret<DataSkOut>,
seed_xa: [u8; 32],
source_xe: &mut Source,
sigma: f64,
scratch: &mut Scratch<B>,
) where
Module<B>: SvpPrepare<B>
@@ -119,7 +118,6 @@ impl<DataSelf: DataMut> GGLWESwitchingKeyCompressed<DataSelf> {
&sk_out_tmp,
seed_xa,
source_xe,
sigma,
scratch2,
);
self.sk_in_n = sk_in.n();

View File

@@ -32,7 +32,6 @@ impl<DataSelf: DataMut> GGLWETensorKeyCompressed<DataSelf> {
sk: &GLWESecret<DataSk>,
seed_xa: [u8; 32],
source_xe: &mut Source,
sigma: f64,
scratch: &mut Scratch<B>,
) where
Module<B>: SvpApply<B>
@@ -104,7 +103,7 @@ impl<DataSelf: DataMut> GGLWETensorKeyCompressed<DataSelf> {
let (seed_xa_tmp, _) = source_xa.branch();
self.at_mut(i, j)
.encrypt_sk(module, &sk_ij, sk, seed_xa_tmp, source_xe, sigma, scratch5);
.encrypt_sk(module, &sk_ij, sk, seed_xa_tmp, source_xe, scratch5);
});
})
}

View File

@@ -10,7 +10,7 @@ use poulpy_hal::{
use crate::{
TakeGLWEPt,
encryption::glwe_encrypt_sk_internal,
encryption::{SIGMA, glwe_encrypt_sk_internal},
layouts::{GGSWCiphertext, Infos, compressed::GGSWCiphertextCompressed, prepared::GLWESecretPrepared},
};
@@ -32,7 +32,6 @@ impl<DataSelf: DataMut> GGSWCiphertextCompressed<DataSelf> {
sk: &GLWESecretPrepared<DataSk, B>,
seed_xa: [u8; 32],
source_xe: &mut Source,
sigma: f64,
scratch: &mut Scratch<B>,
) where
Module<B>: VecZnxAddScalarInplace
@@ -97,7 +96,7 @@ impl<DataSelf: DataMut> GGSWCiphertextCompressed<DataSelf> {
sk,
&mut source_xa_tmp,
source_xe,
sigma,
SIGMA,
scratch_1,
);
});

View File

@@ -9,7 +9,7 @@ use poulpy_hal::{
};
use crate::{
encryption::glwe_ct::glwe_encrypt_sk_internal,
encryption::{SIGMA, glwe_ct::glwe_encrypt_sk_internal},
layouts::{GLWECiphertext, GLWEPlaintext, Infos, compressed::GLWECiphertextCompressed, prepared::GLWESecretPrepared},
};
@@ -31,7 +31,6 @@ impl<D: DataMut> GLWECiphertextCompressed<D> {
sk: &GLWESecretPrepared<DataSk, B>,
seed_xa: [u8; 32],
source_xe: &mut Source,
sigma: f64,
scratch: &mut Scratch<B>,
) where
Module<B>: VecZnxDftAllocBytes
@@ -49,15 +48,7 @@ impl<D: DataMut> GLWECiphertextCompressed<D> {
+ VecZnxSub,
Scratch<B>: TakeVecZnxDft<B> + ScratchAvailable + TakeVecZnx,
{
self.encrypt_sk_internal(
module,
Some((pt, 0)),
sk,
seed_xa,
source_xe,
sigma,
scratch,
);
self.encrypt_sk_internal(module, Some((pt, 0)), sk, seed_xa, source_xe, scratch);
}
#[allow(clippy::too_many_arguments)]
@@ -68,7 +59,6 @@ impl<D: DataMut> GLWECiphertextCompressed<D> {
sk: &GLWESecretPrepared<DataSk, B>,
seed_xa: [u8; 32],
source_xe: &mut Source,
sigma: f64,
scratch: &mut Scratch<B>,
) where
Module<B>: VecZnxDftAllocBytes
@@ -99,7 +89,7 @@ impl<D: DataMut> GLWECiphertextCompressed<D> {
sk,
&mut source_xa,
source_xe,
sigma,
SIGMA,
scratch,
);
self.seed = seed_xa;