| bin_key_gen_pair | R Documentation |
bin_key_gen_pair() generates a public key and its secret key.
bin_pub_key_gen() generates a public key for an existing secret
key. bin_key_gen_n() generates a secret key of the large
dimension N, and bin_key_switch_gen() the key that switches
ciphertexts under it (modulus Q, dimension N) to ciphertexts
under sk (modulus q, dimension n).
bin_key_gen_pair(ctx)
bin_pub_key_gen(ctx, sk)
bin_key_gen_n(ctx)
bin_key_switch_gen(ctx, sk, sk_n)
ctx |
A |
sk |
An |
sk_n |
An |
bin_key_gen_pair(): an LWEKeyPair.
bin_pub_key_gen(): an LWEPublicKey. bin_key_gen_n(): an
LWEPrivateKey. bin_key_switch_gen(): an LWESwitchingKey.
bin_key_gen(), bin_encrypt(), switch_ct_to_qn()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.