eval_ckks_to_fhew_setup: Switch a CKKS ciphertext to FHEW ciphertexts

View source: R/scheme-switching.R

eval_ckks_to_fhew_setupR Documentation

Switch a CKKS ciphertext to FHEW ciphertexts

Description

Scheme switching takes the values in the slots of a CKKS ciphertext to one FHEW (LWE) ciphertext each, on which Boolean gates, the sign and look-up tables can be evaluated (CKKS with real data and Feature$SCHEMESWITCH).

Usage

eval_ckks_to_fhew_setup(cc, schswchparams)

eval_ckks_to_fhew_key_gen(cc, key_pair, lwesk)

eval_ckks_to_fhew_precompute(cc, scale = 1)

eval_ckks_to_fhew(ct, num_ctxts = 0L)

Arguments

cc

A CKKS CryptoContext.

schswchparams

A SchSwchParams object. The setup fills its CKKS fields from cc.

key_pair

The KeyPair of the CKKS context.

lwesk

The LWEPrivateKey of the FHEW context.

scale

Numeric; the scale. Default 1.

ct

A Ciphertext.

num_ctxts

Integer; the number of slots to switch, 0L (default) for all.

Details

eval_ckks_to_fhew_setup() creates the FHEW context inside cc (read it with get_bin_cc_for_scheme_switch()) and returns its secret key. eval_ckks_to_fhew_key_gen() generates the keys of the switch. eval_ckks_to_fhew_precompute() fixes the scale the values are multiplied by before the switch, normally one over the FHEW plaintext modulus. eval_ckks_to_fhew() does the switch.

Value

eval_ckks_to_fhew_setup(): an LWEPrivateKey. eval_ckks_to_fhew(): a list of LWECiphertext objects. The others: cc, invisibly.

See Also

eval_fhew_to_ckks() for the other direction; eval_scheme_switching_setup() for both at once.


openfhe.R documentation built on Nov. 13, 2026, 5:07 p.m.