HOME

TheInfoList



OR:

The Paillier cryptosystem, invented by and named after Pascal Paillier in 1999, is a probabilistic
asymmetric algorithm Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
for
public key cryptography Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic al ...
. The problem of computing ''n''-th residue classes is believed to be computationally difficult. The
decisional composite residuosity assumption The decisional composite residuosity assumption (DCRA) is a mathematical assumption used in cryptography. In particular, the assumption is used in the proof of the Paillier cryptosystem. Informally, the DCRA states that given a composite n and an ...
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 m_1 and m_2, one can compute the encryption of m_1+m_2.


Algorithm

The scheme works as follows:


Key generation

#Choose two large prime numbers p and q randomly and independently of each other such that \gcd(pq, (p-1)(q-1))=1. This property is assured if both primes are of equal length.Jonathan Katz, Yehuda Lindell, "Introduction to Modern Cryptography: Principles and Protocols," Chapman & Hall/CRC, 2007 #Compute n=pq and \lambda=\operatorname(p-1,q-1). lcm means
Least Common Multiple In arithmetic and number theory, the least common multiple (LCM), lowest common multiple, or smallest common multiple (SCM) of two integers ''a'' and ''b'', usually denoted by , is the smallest positive integer that is divisible by both ''a'' and ...
. #Select random integer g where g\in \mathbb Z^_ #Ensure n divides the order of g by checking the existence of the following
modular multiplicative inverse In mathematics, particularly in the area of arithmetic, a modular multiplicative inverse of an integer is an integer such that the product is congruent to 1 with respect to the modulus .. In the standard notation of modular arithmetic this cong ...
: \mu = (L(g^\lambda \bmod n^2))^ \bmod n, :where function L is defined as L(x) = \frac . ::Note that the notation \frac does not denote the modular multiplication of a times the
modular multiplicative inverse In mathematics, particularly in the area of arithmetic, a modular multiplicative inverse of an integer is an integer such that the product is congruent to 1 with respect to the modulus .. In the standard notation of modular arithmetic this cong ...
of b but rather the
quotient In arithmetic, a quotient (from 'how many times', pronounced ) is a quantity produced by the division of two numbers. The quotient has widespread use throughout mathematics. It has two definitions: either the integer part of a division (in th ...
of a divided by b, i.e., the largest integer value v \ge 0 to satisfy the relation a \ge vb. *The public (encryption) key is (n, g). *The private (decryption) key is (\lambda, \mu). If using p,q of equivalent length, a simpler variant of the above key generation steps would be to set g = n+1, \lambda = \varphi(n), and \mu = \varphi(n)^ \bmod n, where \varphi(n) = (p-1)(q-1) . The simpler variant is recommended for implementational purposes, because in the general form the calculation time of \mu can be very high with sufficiently large primes p,q.


Encryption

#Let m be a message to be encrypted where 0 \leq m < n #Select random r where 0 < r < n and \gcd(r,n)=1.
(Note: if you find a value that has \gcd(r,n) \ne 1, you can use this to calculate the private key: this is unlikely enough to ignore.) #Compute ciphertext as: c=g^m \cdot r^n \bmod n^2


Decryption

#Let c be the ciphertext to decrypt, where c\in \mathbb Z^_ #Compute the plaintext message as: m = L(c^\lambda \bmod n^2) \cdot \mu \bmod n As the original paper points out, decryption is "essentially one exponentiation modulo n^2."


Homomorphic properties

A notable feature of the Paillier cryptosystem is its homomorphic properties along with its non-deterministic encryption (see Electronic voting in Applications for usage). As the encryption function is additively homomorphic, the following identities can be described: * Homomorphic addition of plaintexts : The product of two ciphertexts will decrypt to the sum of their corresponding plaintexts, :: D(E(m_1, r_1)\cdot E(m_2, r_2)\bmod n^2) = m_1 + m_2 \bmod n. \, : The product of a ciphertext with a plaintext raising g will decrypt to the sum of the corresponding plaintexts, :: D(E(m_1, r_1)\cdot g^ \bmod n^2) = m_1 + m_2 \bmod n. \, * Homomorphic multiplication of plaintexts : A ciphertext raised to the power of a plaintext will decrypt to the product of the two plaintexts, :: D(E(m_1, r_1)^\bmod n^2) = m_1 m_2 \bmod n, \, :: D(E(m_2, r_2)^\bmod n^2) = m_1 m_2 \bmod n. \, : More generally, a ciphertext raised to a constant ''k'' will decrypt to the product of the plaintext and the constant, :: D(E(m_1, r_1)^k\bmod n^2) = k m_1 \bmod n. \, However, given the Paillier encryptions of two messages there is no known way to compute an encryption of the product of these messages without knowing the private key.


Background

Paillier cryptosystem exploits the fact that certain
discrete logarithms In mathematics, for given real numbers a and b, the logarithm \log_b(a) is a number x such that b^x=a. Analogously, in any group G, powers b^k can be defined for all integers k, and the discrete logarithm \log_b(a) is an integer k such that b^k=a. ...
can be computed easily. For example, by
binomial theorem In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial. According to the theorem, the power expands into a polynomial with terms of the form , where the exponents and a ...
, :: (1+n)^x=\sum_^x n^k = 1+nx+n^2 + \textn This indicates that: :: (1+n)^x \equiv 1+nx\pmod Therefore, if: :: y = (1+n)^x \bmod n^2 then :: x \equiv \frac \pmod. Thus: :: L((1+n)^x \bmod n^2) \equiv x \pmod, :where function L is defined as L(u) = \frac (quotient of integer division) and x \in \mathbb Z_.


Semantic security

The original cryptosystem as shown above does provide
semantic security In cryptography, a semantically secure cryptosystem is one where only negligible information about the plaintext can be feasibly extracted from the ciphertext. Specifically, any probabilistic, polynomial-time algorithm (PPTA) that is given the ci ...
against chosen-plaintext attacks ( IND-CPA). The ability to successfully distinguish the challenge ciphertext essentially amounts to the ability to decide composite residuosity. The so-called
decisional composite residuosity assumption The decisional composite residuosity assumption (DCRA) is a mathematical assumption used in cryptography. In particular, the assumption is used in the proof of the Paillier cryptosystem. Informally, the DCRA states that given a composite n and an ...
(DCRA) is believed to be intractable. Because of the aforementioned homomorphic properties however, the system is
malleable Ductility refers to the ability of a material to sustain significant plastic deformation before fracture. Plastic deformation is the permanent distortion of a material under applied stress, as opposed to elastic deformation, which is reversi ...
, and therefore does not enjoy the highest level of semantic security, protection against adaptive chosen-ciphertext attacks ( IND-CCA2). Usually in cryptography the notion of malleability is not seen as an "advantage," but under certain applications such as secure electronic voting and
threshold cryptosystem A threshold cryptosystem, the basis for the field of threshold cryptography, is a cryptosystem that protects information by encrypting it and distributing it among a cluster of fault-tolerant computers. The message is encrypted using a public key, ...
s, 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 Cramer–Shoup system is an asymmetric key encryption algorithm, and was the first efficient scheme proven to be secure against adaptive chosen ciphertext attack using standard cryptographic assumptions. Its security is based on the computatio ...
, 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 In cryptography, a random oracle is an oracle (a theoretical black box) that responds to every ''unique query'' with a (truly) random response chosen uniformly from its output domain. If a query is repeated, it responds the same way every tim ...
.


Applications


Electronic voting

Semantic security is not the only consideration. There are situations under which malleability may be desirable. Secure
electronic voting Electronic voting is voting that uses electronic means to either aid or handle casting and counting ballots including voting time. Depending on the particular implementation, e-voting may use standalone '' electronic voting machines'' (also ...
systems can utilize the above homomorphic properties. Consider a simple binary ("for" or "against") vote. Let ''m'' voters cast a vote of either ''1'' (for) or ''0'' (against). Each voter encrypts their choice before casting their vote. The election official takes the product of the ''m'' encrypted votes and then decrypts the result and obtains the value ''n'', which is the sum of all the votes. The election official then knows that ''n'' people voted ''for'' and ''m-n'' people voted ''against''. The role of the random ''r'' ensures that two equivalent votes will encrypt to the same value only with negligible likelihood, hence ensuring voter privacy.


Electronic cash

Another feature named in paper is the notion of self- blinding. This is the ability to change one ciphertext into another without changing the content of its decryption. This has application to the development of ecash, an effort originally spearheaded by
David Chaum David Lee Chaum (born 1955) is an American computer scientist, List of cryptographers, cryptographer, and inventor. He is known as a pioneer in cryptography and privacy-preserving technologies, and widely recognized as the inventor of Digital cur ...
. Imagine paying for an item online without the vendor needing to know your credit card number, and hence your identity. The goal in both electronic cash and electronic voting, is to ensure the e-coin (likewise e-vote) is valid, while at the same time not disclosing the identity of the person with whom it is currently associated.


Electronic auction

The Paillier cryptosystem plays a crucial role in enhancing the security of electronic auctions. It prevents fraudulent activities such as dishonest auctioneers and collusion between bidders and auctioneers who manipulate bids. By ensuring the confidentiality of actual bidding values while revealing auction results, the Pailler cryptosystem successfully promotes fair practices.


Threshold cryptosystem

The homomorphic property of Paillier cryptosystem is sometimes used to build
Threshold Threshold may refer to: Science Biology * Threshold (reference value) * Absolute threshold * Absolute threshold of hearing * Action potential * Aerobic threshold * Anaerobic threshold * Dark adaptation threshold * Epidemic threshold * Flicke ...
ECDSA signature.


See also

* The
Naccache–Stern cryptosystem The Naccache–Stern cryptosystem is a homomorphic public-key cryptosystem whose security rests on the higher residuosity problem. The Naccache–Stern cryptosystem was discovered by David Naccache and Jacques Stern in 1998. Scheme Definition L ...
and the
Okamoto–Uchiyama cryptosystem The Okamoto–Uchiyama cryptosystem is a public key cryptosystem proposed in 1998 by Tatsuaki Okamoto and Shigenori Uchiyama. The system works in the multiplicative group of integers modulo n, (\mathbb/n\mathbb)^*, where ''n'' is of the form ''p ...
are historical antecedents of Paillier. * The
Damgård–Jurik cryptosystem The Damgård–Jurik cryptosystemIvan Damgård, Mads JurikA Generalisation, a Simplification and Some Applications of Paillier's Probabilistic Public-Key System Public Key Cryptography 2001: 119-136 is a generalization of the Paillier cryptosystem. ...
is a generalization of Paillier.


References

* * * *


Notes


External links


The Homomorphic Encryption Project
implements the Paillier cryptosystem along with its homomorphic operations.
Encounter: an open-source library providing an implementation of Paillier cryptosystem and a cryptographic counters construction based on the same.python-paillier
a library for Partially Homomorphic Encryption in Python, including full support for floating point numbers. * Th
Paillier cryptosystem interactive simulator
demonstrates a voting application. * A
interactive demo
of the Paillier cryptosystem. * A proof-of-concep
Javascript implementation
of the Paillier cryptosystem with a
interactive demo
*
googletechtalk video
on voting using cryptographic methods. *
Ruby implementation
of Paillier homomorphic addition and a zero-knowledge proof protocol
documentation
{{Cryptography navbox , public-key Public-key encryption schemes