|Dec 26, 2022
|Apr 3, 2022
|Oct 19, 2021
|Oct 7, 2021
|Jun 16, 2021
#672 in Cryptography
4,004 downloads per month
Used in 4 crates (2 directly)
Zero Knowledge Paillier
This library contains a collection of Paillier cryptosystem zero knowledge proofs written in Rust. Each proof can be used as a stand alone proof but usually it will be used as part of another protocol. For each proof we state in comments what are the security assumptions required. Pay special attention to proofs that require more assumptions than just DCRA which is the assumption used in Paillier cryptosystem.
Currently implemented proofs
- Proof that a ciphertext encrypts zero
- Proof of knowledge of plaintext (correctness of ciphertext)
- Proof of correct paillier keypair generation
- Non-interactive proof of correct paillier keypair generation
- Range proof that a paillier ciphertext lies in interval [0,q]
- Non-interactive range proof that a paillier ciphertext lies in interval [0,q]
- Proof of correct opening of a ciphertext
- Proof that a ciphertext encrypts a message from a given message space
- Witness Indistinguishable Proof of knowledge of discrete log with composite modulus
- NI Proof of plaintext multiplication: ciphertexts
e_a = Enc(a), e_b = Enc(b), e_c = Enc(c)such that
ab = c mod n
- NI proof of linear relation between several plaintexts of several known ciphertexts
There is no unified API at the moment, please follow the test attached to each proof for example usage.
Rust-paillier was orignally a library that implemented the basic Paillier cryptosystem with main contributors from Snips. Catalyzed by KZen needs for paillier zero knowledge proofs the original library was forked and another layer of proofs was added. As more and more zk-proofs were being added we realized that the base paillier cryptosystem layer is at a point of stability and only minor changes are required once in a while where on the other hand the second layer of zk-proofs are evolving at a much faster pace and the code should be considered more experimental. At this point we agreed to divide the library to the base layer (rust-paillier) and zk-paillier which is the current library.
the Rust utilities wiki contains information on workflow and environment set-up.
zk-paillier is released under the terms of the GPL-3.0 license. See LICENSE for more information.