Paillier cryptosystem

from Wikipedia, the free encyclopedia

The Paillier cryptosystem was presented by Pascal Paillier at the Eurocrypt in 1999. This is an asymmetrical cryptosystem , the security of which is based on the fact that it is not possible to efficiently check for a composite module whether an element in a th root has modulo or not. A special feature of the Paillier cryptosystem is that two encrypted messages can be added without first decrypting the messages.

The process is often referred to as the successor to the Okamoto Uchiyama cryptosystem . It is also a special case of the Damgård-Jurik cryptosystem .

Procedure

In the following, the key generation and the algorithms for encrypting and decrypting messages are described.

Generation of the public and private key

The key pair is generated as follows:

  • One generates two random prime numbers so that . In practice, n should have at least 1024, but better 1536 or 2048 binary digits . You then bet as well .
  • One randomly chooses in such that the order of divides.

The public key consists of , the private key consists of .

Simplification : The key generation can also be simplified as follows:

  • One chooses a security parameter and the two prime numbers randomly in , i.e. with the same bit length.
  • One defines as well .

Encrypt messages

To encrypt a message , proceed as follows:

  • First you choose a random one .
  • The encrypted message is then given through .

Decrypting messages (decoding)

To decrypt, you first define the function . For a cipher text is then carried out as follows:

  • One sets where the logarithmic function is from above.

In this step it should be noted that the division must be carried out modulo , i. i.e., by multiplying by the multiplicative inverse . The division in the calculation of the logarithmic function is carried out over the whole numbers.

Simplification : If you have chosen the simplified variant of key generation, the decryption results in:

  • One sets , whereby the division is to be understood modulo again .

safety

Under the Decisional Composite Residuosity assumption, it can be shown that the method is semantically secure against selected plaintext attacks . This assumption means that it is not possible to efficiently check for a composite module whether an element in a -th root has modulo or not.

Homomorphism properties

The Paillier cryptosystem is additive- homomorphic , which means that unknown plaintexts can be added through operations on key texts :

  • By multiplying two key texts , the encrypted plain texts are added:
.
Sometimes two special cases are of particular interest:
  • By multiplying a ciphertext with an arbitrary value can for encrypted clear text is added:
  • By multiplying a key text with , i. H. the addition of the encrypted value "0", encryption can be randomized again without changing the message :
  • By exponentiation of a key text by a natural number , the encrypted message comparable w -facht be
.

However, there is no known possibility of multiplying the messages contained in them by means of operations on two key texts.

advantages

The homomorphic properties are u. a. exploited in connection with the following applications.

  • E-voting : After all eligible voters have encrypted their votes (in the simplest case a 1 for yes , a 0 for no ) and transmitted them to the electoral authority, all key texts are multiplied; the resulting ciphertext contains the sum of the yes votes (in encrypted form). The result of the election is obtained by decoding. It is important that the party performing the first step does not need to know the secret key, which means that no individual votes can be decrypted.
  • eCash
  • Zero-knowledge evidence in the Universal Composability Model

disadvantage

Due to the listed homomorphic properties, however, the method is not IND-CCA safe, i. H. not safe under selected ciphertext attacks . Every encryption system that has this security would have to be non-deformable , a property that contradicts homomorphism. In the literature one also finds transformations to transform the Paillier cryptosystem into an IND-CCA-safe variant. Whether these transformations are appropriate or not depends on the particular application.

Complete example

The steps outlined above are illustrated here using a small example.

Key generation

First we choose the security parameter , then choose and . This now allows us to choose the simplified variant of key generation. With this we get:

The public key is given by:

The secret key is .

Preliminary work

In a first step, the text to be encrypted must be translated into numbers smaller than the number . To do this, we simply replace each letter with its position in the alphabet:

A=01 B=02 C=03 usw. (00 = Leerzeichen)

We are now encrypting three characters at a time, as four consecutive letters could possibly deliver too great a value.

Klartext:  P  A  I  L  L  I  E  R
Kodierung: 16 01 09 12 12 09 05 18 00

Encryption

We have three plaintexts to encrypt ( , and ), for each of which we need one.

r1 =  12312
r2 = 623543
r3 = 215688

The encryptions thus result in:

ci = gmirin mod n2
c1 = 899778160109 12312899777 mod 809598649729 = 594091908920
c2 = 508000332395
c3 = 783129227180

Decryption

Since we had chosen the simplified variant for key generation, we can decrypt the messages by:

mi = L(ci mod n2) /  mod n

It is important here that the division is carried out. We therefore calculate the multiplicative inverse of modulo using the extended Euclidean algorithm and thus obtain . This results in the decryption to:

m1 = L(594091908920897876 mod 809598649729) * 141522 mod 899777 = 160109
m2 = 121209
m3 = 051800

By inverting the substitution rule , these values ​​can now be translated back into letters.

credentials

  1. Pascal Paillier: Public-Key Cryptosystems Based on Composite Degree Residuosity Classes (English) . In: Eurocrypt 99 , Springer Verlag, 1999, pp. 223-238. 
  2. Eiichiro Fujisaki and Tatsuako Okamoto: How to Enhance the Security of Public-Key Encryption at Minimum Cost (English) . In: PKC 99 , Springer Verlag, 1999, pp. 53-68. 
  3. Pascal Paillier and David Pointcheval: Efficient Public-Key Cryptosystems provably Secure Against Active Adversaries (English) . In: ASIACRYPT 99 , Springer Verlag, 1999, pp. 165-179.