generalized_paillier/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2
3//! # Paillier encryption and Damgard-Jurik encryption
4//!
5//! - Paillier encryption from the paper [Public-Key Cryptosystems Based on Composite Degree Residuosity Classes](https://link.springer.com/content/pdf/10.1007/3-540-48910-X_16.pdf). Check [the module](./src/paillier_original.rs) for more docs.
6//! - Generalization of Paillier encryption, called Damgard-Jurik scheme from the paper [A Generalization of Paillier’s Public-Key System with Applications to Electronic Voting](https://people.csail.mit.edu/rivest/voting/papers/DamgardJurikNielsen-AGeneralizationOfPailliersPublicKeySystemWithApplicationsToElectronicVoting.pdf).
7//! Check [the module](./src/damgard_jurik.rs) for more docs
8//!
9//! The code is generic over the prime size and expansion factor `S` (for Damgard-Jurik)
10//!
11//! By default, it uses standard library and [rayon](https://github.com/rayon-rs/rayon) for parallelization.
12//!
13//! For `no_std` support, build as
14//!
15//! `cargo build --no-default-features`
16//!
17//! and for wasm-32, build as
18//!
19//! `cargo build --no-default-features --target wasm32-unknown-unknown`
20//!
21//!
22
23extern crate alloc;
24
25#[macro_use]
26pub mod util;
27pub mod damgard_jurik;
28pub mod error;
29pub mod paillier_original;