Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 0 additions & 18 deletions src/pk_encryption/dual_regev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)]
Expand Down
19 changes: 0 additions & 19 deletions src/pk_encryption/dual_regev_discrete_gauss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)]
Expand Down
18 changes: 0 additions & 18 deletions src/pk_encryption/lpr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)]
Expand Down
18 changes: 0 additions & 18 deletions src/pk_encryption/regev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)]
Expand Down
18 changes: 0 additions & 18 deletions src/pk_encryption/regev_discrete_gauss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)]
Expand Down
18 changes: 0 additions & 18 deletions src/pk_encryption/ring_lpr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)]
Expand Down
Loading