Construct a Paillier public and private key pair given a fixed number of bits
Source:R/paillier.R
PaillierKeyPair.Rd
Construct a Paillier public and private key pair given a fixed number of bits
Construct a Paillier public and private key pair given a fixed number of bits
Format
An R6::R6Class()
generator object
Methods
Method new()
Create a new public private key pair with specified number of modulus bits
Usage
PaillierKeyPair$new(modulusBits)
Examples
keys <- PaillierKeyPair$new(1024)
keys$pubkey
#> <PaillierPublicKey>
#> Public:
#> add: function (a, b)
#> add_real: function (den, a, b)
#> bits: 1024
#> clone: function (deep = FALSE)
#> encrypt: function (m)
#> initialize: function (bits, n)
#> mult: function (a, b)
#> n: 13513891455470442392728615117337774955015770408059685429 ...
#> nPlusOne: 13513891455470442392728615117337774955015770408059685429 ...
#> nSquared: 18262526227023703188755128798122578316842762524824305454 ...
#> sub: function (a, b)
#> sub_real: function (den, a, b)
#> Private:
#> randomize: function (a)
keys$getPrivateKey()
#> <PaillierPrivateKey>
#> Public:
#> clone: function (deep = FALSE)
#> decrypt: function (c)
#> getLambda: function ()
#> initialize: function (lambda, pubkey)
#> pubkey: PaillierPublicKey, R6
#> Private:
#> lambda: 67569457277352211963643075586688874775078852040298427149 ...
#> x: 10467730736249515472776798664340932798070920882170095764 ...