pub struct BFV {
pub params: RingParams,
pub t: u64,
pub eta: usize,
pub ntt_precalculated: NTTprecaculated,
}Fields§
§params: RingParams§t: u64§eta: usize§ntt_precalculated: NTTprecaculatedImplementations§
Source§impl BFV
impl BFV
pub fn noise_threshold(&self) -> u64
pub fn estimate_noise( &self, secret_key: &Polynomial, params: &RingParams, ciphertext: &BFVCiphertext, ) -> u64
pub fn generate_public_b(&self, a: &Polynomial, s: &Polynomial) -> Polynomial
pub fn generate_public_a(&self) -> Polynomial
pub fn generate_secret_key(&self) -> Polynomial
pub fn encrypt( &self, message: &BFVPlaintext, public_a: &Polynomial, public_b: &Polynomial, ) -> BFVCiphertext
pub fn backend_decrypt( &self, ciphertext: &BFVCiphertext, secret_key: &Polynomial, ) -> Polynomial
pub fn decrypt( &self, ciphertext: &BFVCiphertext, secret_key: &Polynomial, ) -> String
pub fn sum_ciphertexts( &self, first_cipher: BFVCiphertext, second_cipher: BFVCiphertext, ) -> BFVCiphertext
pub fn sum_ciphertext_and_plaintext( &self, ciphertext: &BFVCiphertext, plaintext: &BFVPlaintext, ) -> BFVCiphertext
pub fn mul_ciphertext_and_plaintext( &self, ciphertext: &BFVCiphertext, plaintext: &BFVPlaintext, ) -> BFVCiphertext
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BFV
impl RefUnwindSafe for BFV
impl Send for BFV
impl Sync for BFV
impl Unpin for BFV
impl UnsafeUnpin for BFV
impl UnwindSafe for BFV
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more