PaillierPublicKey: Construct a Paillier public key with the given modulus.

Description Usage Format Fields Methods See Also

Description

Construct a Paillier public key with the given modulus.

Usage

1

Format

An R6Class generator object

Fields

bits

the number of bits in the modulus

n

the modulus

nSquared

the square of the modulus

nPlusOne

one more than the modulus

Methods

PaillierPublicKey$new(bits, n)

Create a new public key with given bits and modulus n. It also precomputes a few values for more efficient computations

PaillierPublicKey$encrypt(m)

Encrypt a message. The value m should be less than the modulus, not checked

PaillierPublicKey$add(a, b)

Return the sum of two encrypted messages a and b

PaillierPublicKey$mult(a, b)

Return the product of two encrypted messages a and b

See Also

PaillierPrivateKey which goes hand-in-hand with this object


homomorpheR documentation built on May 29, 2017, 10:04 a.m.