| SchemeSwitchingDataSerializer | R Documentation |
A scheme-switching computation needs a CKKS context with its public
key and evaluation keys, the FHEW context inside it with its
bootstrapping keys, the switching key from FHEW to CKKS, and the
ciphertext to work on. SchemeSwitchingDataSerializer writes all of
it to a directory, and SchemeSwitchingDataDeserializer reads it
back in another session, so that one party can set the computation
up and another can run it.
SchemeSwitchingDataSerializer(
crypto_context = NULL,
public_key = NULL,
raw_ciphertext = NULL,
ptr = NULL
)
SchemeSwitchingDataDeserializer(ptr = NULL)
set_data_directory(x, dir)
serialize_scheme_switching_data(x)
deserialize_scheme_switching_data(x)
get_raw_ciphertext(x)
crypto_context |
A CKKS |
public_key |
The |
raw_ciphertext |
The |
ptr |
External pointer (internal use). |
x |
A |
dir |
Character string; the directory. |
The writer is made from the context, the public key and the
ciphertext. set_data_directory() names the directory, which must
exist, and serialize_scheme_switching_data() writes the files
(binary format, fixed file names). The multiplication and
automorphism keys written are all those in the key registries.
The reader is made empty. After set_data_directory(),
deserialize_scheme_switching_data() reads the files, registers the
evaluation keys, and puts the FHEW context and the switching key
into the CKKS context. get_crypto_context(), get_public_key()
and get_raw_ciphertext() then return the three objects.
The C++ classes default the directory to demoData under the
working directory. The R functions do not: reading or writing before
set_data_directory() is an error.
The constructors: an S7 object of the class, inheriting from
OpenFHEObject. get_raw_ciphertext(): a Ciphertext, or NULL
before the data has been read. The others: x, invisibly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.