pkenc_gm82¶
Goldwasser-Micali Public Key Encryption Scheme (Quadratic Residuosity problem)
From: “S. Goldwasser, S. Micali: Probabilistic encryption and how to play
mental poker keeping secret all partial information”
Published in: 14th Symposium on Theory of Computing (1982)
Available from: http://groups.csail.mit.edu/cis/pubs/shafi/1982-stoc.pdf
Notes:
- type: encryption (public key)
- setting: Integer
- assumption: Quadratic Residuosity
Authors: | Guillermo Ramos |
---|---|
Date: | 01/2015 |
-
class
pkenc_gm82.
GM82
[source]¶ Bases:
charm.toolbox.PKEnc.PKEnc
>>> gm82 = GM82() >>> (pk, sk) = gm82.keygen(512) >>> zero = gm82.encrypt(pk, 0) >>> one = gm82.encrypt(pk, 1) >>> gm82.decrypt(sk, zero) 0 >>> gm82.decrypt(sk, one) 1 >>> gm82.decrypt(sk, gm82.xor(pk, zero, zero)) 0 >>> gm82.decrypt(sk, gm82.xor(pk, zero, one)) 1 >>> gm82.decrypt(sk, gm82.xor(pk, one, zero)) 1 >>> gm82.decrypt(sk, gm82.xor(pk, one, one)) 0