Expand description
§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) - usenum-bigitbackend-rug- userug. 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!
Modules§
- backend
- Abstract big integer backend. This module makes no guarantees of applicability, all methods are considered internal, except for conversion functions:
- utils
- Various utilities
Structs§
- Decryption
Key - Paillier decryption key
- Encryption
Key - Paillier encryption key
- Error
- Error type used in the library
Traits§
- AnyEncryption
Key - Any key capable of encryption
- AnyEncryption
KeyExt - Additional functionality implemented for AnyEncryptionKey
Type Aliases§
- Ciphertext
- Paillier ciphertext
- Nonce
- Paillier nonce
- Plaintext
- Paillier plaintext