| fhe_context | R Documentation |
High-level constructor that creates a CryptoContext with sensible
defaults. PKE, KEYSWITCH, and LEVELEDSHE features are enabled
automatically.
fhe_context(scheme = c("BFV", "BGV", "CKKS"), ..., features = NULL)
scheme |
Character: "BFV", "BGV", or "CKKS". |
... |
Scheme-specific |
features |
Additional |
All scheme-specific CCParams setter arguments are accepted via
... and forwarded to the appropriate per-scheme constructor
(BFVParams(), BGVParams(), or CKKSParams()). See those
functions' argument lists for the valid per-scheme setter surface
— each scheme accepts only the setters that are not disabled in
its upstream CCParams<T> specialization.
Passing an invalid scheme-specific argument produces an R-level
"unused argument" error at the underlying *Params() call site.
A CryptoContext object.
BFVParams(), BGVParams(), CKKSParams()
## An exact context over the integers modulo 65537 (BFV). The ring
## dimension is chosen for you from the security level.
bfv <- fhe_context("BFV", plaintext_modulus = 65537L,
multiplicative_depth = 2L)
ring_dimension(bfv)
## An approximate context over the reals (CKKS), which is what the
## statistical applications use.
ckks <- fhe_context("CKKS", multiplicative_depth = 2L,
scaling_mod_size = 50L, batch_size = 8L)
ring_dimension(ckks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.