Skip to content

LFDT-Lockness/fast-paillier

License Docs Crates io Discord

Optimized Paillier encryption scheme

Library implements Paillier encryption scheme with optimization such as:

  • Faster encryption and homomorphic operations via Chinese Remainder Theorem when the private key is known
  • Faster secret key generation (a.k.a faster safe primes generation)

Big integer backend

This crate uses an abstraction over the big integer implementation, available in backend module. The concrete backend can be selected with a feature flag:

  • backend-num-bigint (default) - use num-bigit
  • backend-rug - use rug. This backend is based on GNU GMP and can be several times faster.

The applicability of this backend to your uses is not guaranteed, any additional functionality to it will not be added. However, you can convert them to bytes or, if using a fixed backend, to the underlying format, and perform the necessary operations with those.

#![no_std] support

Library is #![no_std]-friendly as long as you enable no_std feature, and you use only these features: backend-num-bigint, serde. Enabling other features will introduce transitive dependency on std.

Join us in Discord!

Feel free to reach out to us in Discord!

About

Fast Paillier Encryption in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages