Construct a Paillier public key with the given modulus.
Construct a Paillier public key with the given modulus.
Value
An R6::R6Class()
generator object
See also
PaillierPrivateKey()
which goes hand-in-hand with this object
Public 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
Method new()
Create a new public key and precompute some internal values for efficiency
Usage
PaillierPublicKey$new(bits, n)
Method sub()
Subtract one encrypted message from another
Method add_real()
Return the sum a + b
of an encrypted real message a
,
a list consisting of a encrypted
integer part (named int
) and an
encrypted fractional part (named frac
),
and a real number a
using
den
as denominator in the rational
approximation.
Method sub_real()
Return the difference a - b
of an encrypted real message a
,
a list consisting of a encrypted
integer part (named int
) and an
encrypted fractional part (named frac
),
and a real number b
using
den
as denominator in the rational
approximation.