saveFHE: Save and load keys and ciphertexts

Description Usage Arguments Details Examples

View source: R/save.R

Description

Use these functions rather than the base R functions for saving and loading of ciphertexts and keys. Note that this is due to a limitation in Rcpp, so the save, save.image and saveRDS base R functions are overriden to warn if they are used incorrectly on ciper text objects.

Usage

1
2
3

Arguments

object

the ciphertext or keys to be saved

file

the filename to save (load) the object to (from)

Details

These functions provide a way to save ciphertexts and keys generated by this package to a file in such a way that they can later be restored to another R session (possibly on a different machine).

At present no compression is performed so for long-term storage or transmission over a network it would be advisable to gzip the files after creation.

Examples

1
2
3
4
5
6
7
p <- pars("FandV")
keys <- keygen(p)
ct1 <- enc(keys$pk, 2)
## Not run: saveFHE(ct1, "~/myCipherText.fhe")

# Start a new session or transfer to another machine
## Not run: ct1 <- loadFHE("~/myCipherText.fhe")

iamtrask/R-Homomorphic-Encryption-Package documentation built on May 29, 2019, 2:56 p.m.