Learn R Programming

openfhe.R (version 1.6.1)

key_switch_gen: Switch a ciphertext from one secret key to another

Description

key_switch_gen() makes the key that switches ciphertexts under old_private_key to ciphertexts under new_private_key. key_switch() applies it and returns the switched ciphertext; key_switch_in_place() switches the ciphertext it is given.

Usage

key_switch_gen(cc, old_private_key, new_private_key)

key_switch(ct, eval_key)

key_switch_in_place(ct, eval_key)

Value

key_switch_gen(): an EvalKey. key_switch(): a Ciphertext. key_switch_in_place(): ct, invisibly.

Arguments

cc

A CryptoContext.

old_private_key, new_private_key

PrivateKey objects.

ct

A Ciphertext.

eval_key

The EvalKey from key_switch_gen().

See Also

re_key_gen() for the form that needs only the public key of the receiving party.