Encrypt a value for Binary FHE
bin_encrypt(
ctx,
sk,
message,
output = BinFHEOutput$BOOTSTRAPPED,
p = 4L,
mod = NULL
)An LWECiphertext
A BinFHE context
An LWEPrivateKey, or an LWEPublicKey to encrypt under the public key.
Integer (0 or 1 for Boolean; larger for integer FHE)
An element of BinFHEOutput (default:
BinFHEOutput$BOOTSTRAPPED). Use
BinFHEOutput$LARGE_DIM together with mod for the
functional-bootstrapping path. With a public key the default is
BinFHEOutput$SMALL_DIM, as in openfhe-python, which needs the
switching key that bin_bt_key_gen() generates.
Plaintext modulus (default: 4)
Optional large ciphertext modulus Q for the LARGE_DIM path. NULL (default) selects the standard small-modulus encrypt. A whole number of at most 2^53, or a string of decimal digits for a larger value.