ctx <- bin_fhe_context(BinFHEParamSet$TOY)
kp <- bin_key_gen_pair(ctx)
## Under the public key of the pair, in dimension N; no bootstrapping
## keys are needed for this form.
ct <- bin_encrypt(ctx, kp@public, 1L, BinFHEOutput$LARGE_DIM)
bin_decrypt(ctx, kp@secret, ct)
Run the code above in your browser using DataLab