Paillier cryptosystem
The Paillier cryptosystem, invented by and named after Pascal Paillier in 1999, is a probabilistic asymmetric algorithm for public key cryptography. The problem of computing n-th residue classes is believed to be computationally difficult. The decisional composite residuosity assumption is the intractability hypothesis upon which this cryptosystem is based.
The scheme is an additive homomorphic cryptosystem; this means that, given only the public key and the
encryption of and, one can compute the encryption of.
Algorithm
The scheme works as follows:Key generation
- Choose two large prime numbers and randomly and independently of each other such that. This property is assured if both primes are of equal length.
- Compute and. lcm means Least Common Multiple.
- Select random integer where
- Ensure divides the order of by checking the existence of the following modular multiplicative inverse:,
- The public key is.
- The private key is
The simpler variant is recommended for implementational purposes, because in the general form the calculation time of can be very high with sufficiently large primes p,q.
Encryption
- Let be a message to be encrypted where
- Select random where and .
- Compute ciphertext as:
Decryption
- Let be the ciphertext to decrypt, where
- Compute the plaintext message as:
Homomorphic properties
A notable feature of the Paillier cryptosystem is its homomorphic properties along with its non-deterministic encryption. As the encryption function is additively homomorphic, the following identities can be described:- Homomorphic addition of plaintexts
- Homomorphic multiplication of plaintexts
Background
Paillier cryptosystem exploits the fact that certain discrete logarithms can be computed easily.For example, by binomial theorem,
This indicates that:
Therefore, if:
then
Thus:
Semantic security
The original cryptosystem as shown above does provide semantic security against chosen-plaintext attacks. The ability to successfully distinguish the challenge ciphertext essentially amounts to the ability to decide composite residuosity. The so-called decisional composite residuosity assumption is believed to be intractable.Because of the aforementioned homomorphic properties however, the system is malleable, and therefore does not enjoy the highest level of semantic security, protection against adaptive chosen-ciphertext attacks.
Usually in cryptography the notion of malleability is not seen as an "advantage," but under certain applications such as secure electronic voting and threshold cryptosystems, this property may indeed be necessary.
Paillier and Pointcheval however went on to propose an improved cryptosystem that incorporates the combined hashing of message m with random r. Similar in intent to the Cramer–Shoup cryptosystem, the hashing prevents an attacker, given only c, from being able to change m in a meaningful way. Through this adaptation the improved scheme can be shown to be IND-CCA2 secure in the random oracle model.