pkenc_paillier99¶
Paillier Public Key Encryption Scheme (Paillier99)
Authors: P. Paillier
Title: “Public-Key Cryptosystems Based on Composite Degree Residuosity Classes”
Published in: EUROCRYPT 1999
Available from: http://link.springer.com/chapter/10.1007%2F3-540-48910-X_16
Notes: Additively homomorphic encryption scheme
Scheme Properties
Type: encryption (public key)
Setting: Integer
Assumption: Composite Residuosity
Implementation
- Authors:
Ayo Akinyele
- Date:
4/2011 (updated 2/2016)
- class pkenc_paillier99.Ciphertext(ct, pk, key)[source]¶
Bases:
dictThis tests the additively holomorphic properties of the Paillier encryption scheme.
>>> from charm.toolbox.integergroup import RSAGroup >>> group = RSAGroup() >>> pai = Pai99(group) >>> (public_key, secret_key) = pai.keygen()
>>> msg_1=12345678987654321 >>> msg_2=12345761234123409 >>> msg_3 = msg_1 + msg_2
>>> cipher_1 = pai.encrypt(public_key, msg_1) >>> cipher_2 = pai.encrypt(public_key, msg_2) >>> cipher_3 = cipher_1 + cipher_2
>>> decrypted_msg_3 = pai.decrypt(public_key, secret_key, cipher_3) >>> decrypted_msg_3 == msg_3 True
- pkenc_paillier99.debug = False¶
A ciphertext class with homomorphic properties