From 88dae654e7e9f35a4d4aa39205fe1e632379dd05 Mon Sep 17 00:00:00 2001 From: jnsiemer Date: Sat, 18 Oct 2025 11:50:47 +0100 Subject: [PATCH 1/2] Update links in README --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 54c491c..95efff6 100644 --- a/README.md +++ b/README.md @@ -29,22 +29,22 @@ For a more detailed description, please refer to [our tutorial section](https:// Constructions -- [Public Key Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/pk_encryption.rs) - - [LWE Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/pk_encryption/regev.rs) - - [Dual LWE Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/pk_encryption/dual_regev.rs) - - [LPR Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/pk_encryption/lpr.rs) - - [Ring-based LPR Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/pk_encryption/ring_lpr.rs) - - [Prototype of K-PKE](https://github.com/qfall/schemes/blob/dev/src/construction/pk_encryption/k_pke.rs), which is the foundation of [CRYSTALS-Kyber](https://pq-crystals.org/kyber/) and [ML-KEM](https://csrc.nist.gov/pubs/fips/203/final) - - [CCA-secure Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/pk_encryption/ccs_from_ibe.rs) -- [Signatures](https://github.com/qfall/schemes/blob/dev/src/construction/signature.rs) - - [Full-Domain Hash (FDH)](https://github.com/qfall/schemes/blob/dev/src/construction/signature/fdh.rs) - - [Probabilistic FDH (PFDH)](https://github.com/qfall/schemes/blob/dev/src/construction/signature/pfdh.rs) - - [Ring-based FDH](https://github.com/qfall/schemes/blob/dev/src/construction/signature/fdh/gpv_ring.rs) -- [Identity Based Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/identity_based_encryption.rs) - - [From Dual LWE Encryption](https://github.com/qfall/schemes/blob/dev/src/construction/identity_based_encryption/dual_regev_ibe.rs) -- [Hash Functions](https://github.com/qfall/schemes/blob/dev/src/construction/hash.rs) - - [SIS-Hash Function](https://github.com/qfall/schemes/blob/dev/src/construction/hash/sis.rs) - - [SHA-256-based Hash](https://github.com/qfall/schemes/blob/dev/src/construction/hash/sha256.rs) +- [Public Key Encryption](https://github.com/qfall/schemes/blob/dev/src/pk_encryption.rs) + - [LWE Encryption](https://github.com/qfall/schemes/blob/dev/src/pk_encryption/regev.rs) + - [Dual LWE Encryption](https://github.com/qfall/schemes/blob/dev/src/pk_encryption/dual_regev.rs) + - [LPR Encryption](https://github.com/qfall/schemes/blob/dev/src/pk_encryption/lpr.rs) + - [Ring-based LPR Encryption](https://github.com/qfall/schemes/blob/dev/src/pk_encryption/ring_lpr.rs) + - [Prototype of K-PKE](https://github.com/qfall/schemes/blob/dev/src/pk_encryption/k_pke.rs), which is the foundation of [CRYSTALS-Kyber](https://pq-crystals.org/kyber/) and [ML-KEM](https://csrc.nist.gov/pubs/fips/203/final) + - [CCA-secure Encryption](https://github.com/qfall/schemes/blob/dev/src/pk_encryption/ccs_from_ibe.rs) +- [Signatures](https://github.com/qfall/schemes/blob/dev/src/signature.rs) + - [Full-Domain Hash (FDH)](https://github.com/qfall/schemes/blob/dev/src/signature/fdh.rs) + - [Probabilistic FDH (PFDH)](https://github.com/qfall/schemes/blob/dev/src/signature/pfdh.rs) + - [Ring-based FDH](https://github.com/qfall/schemes/blob/dev/src/signature/fdh/gpv_ring.rs) +- [Identity Based Encryption](https://github.com/qfall/schemes/blob/dev/src/identity_based_encryption.rs) + - [From Dual LWE Encryption](https://github.com/qfall/schemes/blob/dev/src/identity_based_encryption/dual_regev_ibe.rs) +- [Hash Functions](https://github.com/qfall/schemes/blob/dev/src/hash.rs) + - [SIS-Hash Function](https://github.com/qfall/schemes/blob/dev/src/hash/sis.rs) + - [SHA-256-based Hash](https://github.com/qfall/schemes/blob/dev/src/hash/sha256.rs) ## License From fed3603c594ed8394bb05fa255540891a8fcf5b7 Mon Sep 17 00:00:00 2001 From: jnsiemer Date: Sat, 18 Oct 2025 11:51:37 +0100 Subject: [PATCH 2/2] Remove bad 128-bit secure parameter choices --- src/pk_encryption/dual_regev.rs | 18 ------------------ .../dual_regev_discrete_gauss.rs | 19 ------------------- src/pk_encryption/lpr.rs | 18 ------------------ src/pk_encryption/regev.rs | 18 ------------------ src/pk_encryption/regev_discrete_gauss.rs | 18 ------------------ src/pk_encryption/ring_lpr.rs | 18 ------------------ 6 files changed, 109 deletions(-) diff --git a/src/pk_encryption/dual_regev.rs b/src/pk_encryption/dual_regev.rs index 362793c..b8375fe 100644 --- a/src/pk_encryption/dual_regev.rs +++ b/src/pk_encryption/dual_regev.rs @@ -292,14 +292,6 @@ impl DualRegev { Ok(()) } - - /// This function instantiates a 128-bit secure [`DualRegev`] scheme. - /// - /// The public parameters used for this scheme were generated via `DualRegev::new_from_n(350)` - /// and its bit-security determined via the [lattice estimator](https://github.com/malb/lattice-estimator). - pub fn secure128() -> Self { - Self::new(230, 5313, 7764299, 0.0011) - } } impl Default for DualRegev { @@ -524,16 +516,6 @@ mod test_pp_generation { fn invalid_n() { DualRegev::new_from_n(9); } - - /// Checks whether `secure128` outputs a new instance with correct and secure - /// parameters. - #[test] - fn secure128_validity() { - let dr = DualRegev::secure128(); - - assert!(dr.check_correctness().is_ok()); - assert!(dr.check_security().is_ok()); - } } #[cfg(test)] diff --git a/src/pk_encryption/dual_regev_discrete_gauss.rs b/src/pk_encryption/dual_regev_discrete_gauss.rs index fcadb54..7f64671 100644 --- a/src/pk_encryption/dual_regev_discrete_gauss.rs +++ b/src/pk_encryption/dual_regev_discrete_gauss.rs @@ -312,15 +312,6 @@ impl DualRegevWithDiscreteGaussianRegularity { Ok(()) } - - /// This function instantiates a 128-bit secure [`DualRegevWithDiscreteGaussianRegularity`] scheme. - /// - /// The public parameters used for this scheme were generated - /// via `DualRegevWithDiscreteGaussianRegularity::new_from_n(350)` - /// and its bit-security determined via the [lattice estimator](https://github.com/malb/lattice-estimator). - pub fn secure128() -> Self { - Self::new(350, 5248, 29892991, 12.357, 0.00009) - } } impl Default for DualRegevWithDiscreteGaussianRegularity { @@ -545,16 +536,6 @@ mod test_pp_generation { fn invalid_n() { DualRegevWithDiscreteGaussianRegularity::new_from_n(1); } - - /// Checks whether `secure128` outputs a new instance with correct and secure - /// parameters. - #[test] - fn secure128_validity() { - let dr = DualRegevWithDiscreteGaussianRegularity::secure128(); - - assert!(dr.check_correctness().is_ok()); - assert!(dr.check_security().is_ok()); - } } #[cfg(test)] diff --git a/src/pk_encryption/lpr.rs b/src/pk_encryption/lpr.rs index d1236c8..2f132f3 100644 --- a/src/pk_encryption/lpr.rs +++ b/src/pk_encryption/lpr.rs @@ -282,14 +282,6 @@ impl LPR { Ok(()) } - - /// This function instantiates a 128-bit secure [`LPR`] scheme. - /// - /// The public parameters used for this scheme were generated via `LPR::new_from_n(350)` - /// and its bit-security determined via the [lattice estimator](https://github.com/malb/lattice-estimator). - pub fn secure128() -> Self { - Self::new(500, 76859609, 0.000005) - } } impl Default for LPR { @@ -543,16 +535,6 @@ mod test_pp_generation { fn invalid_n() { LPR::new_from_n(9); } - - /// Checks whether `secure128` outputs a new instance with correct and secure - /// parameters. - #[test] - fn secure128_validity() { - let lpr = LPR::secure128(); - - assert!(lpr.check_correctness().is_ok()); - assert!(lpr.check_security().is_ok()); - } } #[cfg(test)] diff --git a/src/pk_encryption/regev.rs b/src/pk_encryption/regev.rs index 607c066..3849fa7 100644 --- a/src/pk_encryption/regev.rs +++ b/src/pk_encryption/regev.rs @@ -293,14 +293,6 @@ impl Regev { Ok(()) } - - /// This function instantiates a 128-bit secure [`Regev`] scheme. - /// - /// The public parameters used for this scheme were generated via `Regev::new_from_n(350)` - /// and its bit-security determined via the [lattice estimator](https://github.com/malb/lattice-estimator). - pub fn secure128() -> Self { - Self::new(230, 5313, 7764299, 0.0011) - } } impl Default for Regev { @@ -526,16 +518,6 @@ mod test_pp_generation { fn invalid_n() { Regev::new_from_n(9); } - - /// Checks whether `secure128` outputs a new instance with correct and secure - /// parameters. - #[test] - fn secure128_validity() { - let regev = Regev::secure128(); - - assert!(regev.check_correctness().is_ok()); - assert!(regev.check_security().is_ok()); - } } #[cfg(test)] diff --git a/src/pk_encryption/regev_discrete_gauss.rs b/src/pk_encryption/regev_discrete_gauss.rs index b074f9b..ec5e1f7 100644 --- a/src/pk_encryption/regev_discrete_gauss.rs +++ b/src/pk_encryption/regev_discrete_gauss.rs @@ -312,14 +312,6 @@ impl RegevWithDiscreteGaussianRegularity { Ok(()) } - - /// This function instantiates a 128-bit secure [`RegevWithDiscreteGaussianRegularity`] scheme. - /// - /// The public parameters used for this scheme were generated via `RegevWithDiscreteGaussianRegularity::new_from_n(350)` - /// and its bit-security determined via the [lattice estimator](https://github.com/malb/lattice-estimator). - pub fn secure128() -> Self { - Self::new(350, 5248, 29892991, 12.357, 0.00009) - } } impl Default for RegevWithDiscreteGaussianRegularity { @@ -540,16 +532,6 @@ mod test_pp_generation { fn invalid_n() { RegevWithDiscreteGaussianRegularity::new_from_n(1); } - - /// Checks whether `secure128` outputs a new instance with correct and secure - /// parameters. - #[test] - fn secure128_validity() { - let dr = RegevWithDiscreteGaussianRegularity::secure128(); - - assert!(dr.check_correctness().is_ok()); - assert!(dr.check_security().is_ok()); - } } #[cfg(test)] diff --git a/src/pk_encryption/ring_lpr.rs b/src/pk_encryption/ring_lpr.rs index 2a85d79..9e70e0b 100644 --- a/src/pk_encryption/ring_lpr.rs +++ b/src/pk_encryption/ring_lpr.rs @@ -309,14 +309,6 @@ impl RingLPR { Ok(()) } - - /// This function instantiates a 128-bit secure [`RingLPR`] scheme. - /// - /// The public parameters used for this scheme were generated via `RingLPR::new_from_n(512)` - /// and its bit-security determined via the [lattice estimator](https://github.com/malb/lattice-estimator). - pub fn secure128() -> Self { - Self::new(512, 92897729, 0.000005) - } } impl Default for RingLPR { @@ -562,16 +554,6 @@ mod test_pp_generation { fn invalid_n() { RingLPR::new_from_n(9); } - - /// Checks whether `secure128` outputs a new instance with correct and secure - /// parameters. - #[test] - fn secure128_validity() { - let scheme = RingLPR::secure128(); - - assert!(scheme.check_correctness().is_ok()); - assert!(scheme.check_security().is_ok()); - } } #[cfg(test)]