get_pt_modulus: Moduli of an LWE ciphertext

View source: R/binfhe-keys.R

get_pt_modulusR Documentation

Moduli of an LWE ciphertext

Description

get_modulus() of an LWECiphertext is its ciphertext modulus, and get_pt_modulus() its plaintext modulus. set_modulus() and set_pt_modulus() change the values recorded in the ciphertext, in place; they do not rescale it.

Usage

get_pt_modulus(ct)

set_modulus(ct, modulus)

set_pt_modulus(ct, plaintext_modulus)

Arguments

ct

An LWECiphertext.

modulus, plaintext_modulus

The new value: a whole number of at most 2^53, or a string of decimal digits.

Details

get_modulus() and get_length() also work on an LWEPrivateKey and an LWEPublicKey, and == and != compare two LWE ciphertexts, two secret keys or two public keys by content.

Value

get_pt_modulus(): a number, or a string of decimal digits if the value is above 2^53. The setters: ct, invisibly.


openfhe.R documentation built on Nov. 13, 2026, 5:07 p.m.