View source: R/functional-bootstrapping.R
| eval_fbt_setup | R Documentation |
Functional bootstrapping refreshes a ciphertext and applies a
look-up table to the encrypted integers in the same step. The input
is an RLWE ciphertext converted to CKKS with
schemelet_convert_rlwe_to_ckks(), and the output goes back with
schemelet_convert_ckks_to_rlwe().
eval_fbt_setup(
cc,
coeffs,
num_slots,
p_in,
p_out,
big_q,
pub_key,
dim1,
level_budget,
lvls_after_boot = 0L,
depth_leveled_computation = 0L,
order = 1L
)
eval_fbt(
ct,
coeffs,
digit_bit_size,
initial_scaling,
post_scaling,
level_to_reduce = 0L,
order = 1L
)
eval_fbt_no_decoding(ct, coeffs, digit_bit_size, initial_scaling, order = 1L)
eval_hom_decoding(ct, post_scaling, level_to_reduce = 0L)
cc |
A CKKS |
coeffs |
The coefficients of the look-up table; see Details. |
num_slots |
Integer; number of CKKS slots. |
p_in, p_out |
Input and output plaintext moduli. |
big_q |
The modulus of the RLWE ciphertext converted to CKKS. |
pub_key |
The |
dim1 |
Integer vector of length 2; baby-step dimensions of the
two linear transforms ( |
level_budget |
Integer vector of length 2; level budgets of the two linear transforms. |
lvls_after_boot |
Integer; levels available after
bootstrapping. Default |
depth_leveled_computation |
Integer; levels of the computation
done between |
order |
Integer; order of the Hermite interpolation. Default
|
ct |
A |
digit_bit_size |
Integer; number of bits of the input modulus. |
initial_scaling |
The modulus the input is scaled by, usually
|
post_scaling |
The scale applied to the coefficients (the
|
level_to_reduce |
Integer; levels to drop before decoding.
Default |
eval_fbt_setup() prepares the context; call
eval_bootstrap_key_gen() and eval_mult_key_gen() after it.
eval_fbt() applies the table. eval_fbt_no_decoding() stops
before the return to coefficient encoding, leaving a slot-packed
CKKS ciphertext on which leveled operations can be done;
eval_hom_decoding() then finishes.
The R type of coeffs selects the form of the table, as the Python
type does in openfhe-python. An integer vector is the optimized
Boolean case (input modulus 2, order 1), with the two coefficients
c(f(1), f(0) - f(1)); build it with as.integer(). A double or
complex vector is the general case, with the coefficients from
get_hermite_trig_coefficients().
p_in, p_out, big_q, initial_scaling and
post_scaling are strings of decimal digits, or whole numbers of
at most 2^53.
eval_fbt_setup(): cc, invisibly. The others: a
Ciphertext.
eval_mvb_precompute() to apply several tables to one
input; get_fbt_depth().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.