| PaillierPublicKey {homomorpheR} | R Documentation |
Construct a Paillier public key with the given modulus.
Description
Construct a Paillier public key with the given modulus.
Usage
PaillierPublicKey
Format
An R6Class generator object
Fields
bitsthe number of bits in the modulus
nthe modulus
nSquaredthe square of the modulus
nPlusOneone more than the modulus
Methods
PaillierPublicKey$new(bits, n)Create a new public key with given
bitsand modulusn. It also precomputes a few values for more efficient computationsPaillierPublicKey$encrypt(m)Encrypt a message. The value
mshould be less than the modulus, not checkedPaillierPublicKey$add(a, b)Return the sum of two encrypted messages
aandbPaillierPublicKey$mult(a, b)Return the product of two encrypted messages
aandb
See Also
PaillierPrivateKey which goes hand-in-hand with this object
[Package homomorpheR version 0.2-2 Index]