pub struct SecretKey<T>(_);Expand description
SecretKey type
Trait Implementations
sourceimpl<T> AdditiveHomomorphicScheme<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq,
impl<T> AdditiveHomomorphicScheme<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq,
sourcefn add_inplace(&self, ct1: &mut FVCiphertext<T>, ct2: &FVCiphertext<T>)
fn add_inplace(&self, ct1: &mut FVCiphertext<T>, ct2: &FVCiphertext<T>)
Add a ciphertext into another.
sourcefn add_plain_inplace(&self, ct: &mut FVCiphertext<T>, pt: &FVPlaintext)
fn add_plain_inplace(&self, ct: &mut FVCiphertext<T>, pt: &FVPlaintext)
Add a plaintext into a ciphertext.
sourcefn rerandomize(&self, ct: &mut FVCiphertext<T>, pk: &FVCiphertext<T>)
fn rerandomize(&self, ct: &mut FVCiphertext<T>, pk: &FVCiphertext<T>)
Rerandomize a ciphertext in-place. The resulting ciphertext will decrypt to the same plaintext, while being unlinkable to the input ciphertext. Read more
sourceimpl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq,
impl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq,
sourcefn encrypt(&self, pt: &FVPlaintext, pk: &FVCiphertext<T>) -> FVCiphertext<T>
fn encrypt(&self, pt: &FVPlaintext, pk: &FVCiphertext<T>) -> FVCiphertext<T>
Encrypt a given plaintext
sourcefn encrypt_zero(&self, pk: &FVCiphertext<T>) -> FVCiphertext<T>
fn encrypt_zero(&self, pk: &FVCiphertext<T>) -> FVCiphertext<T>
Generate a fresh encryption of the zero plaintext
sourcefn generate_keypair(&self) -> (FVCiphertext<T>, SecretKey<T>)
fn generate_keypair(&self) -> (FVCiphertext<T>, SecretKey<T>)
Generate a (pk, sk) keypair
sourceimpl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T>,
impl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T>,
sourcefn generate_key(&self) -> SecretKey<T>
fn generate_key(&self) -> SecretKey<T>
Generate a secret key
sourcefn encrypt_zero_sk(&self, sk: &SecretKey<T>) -> FVCiphertext<T>
fn encrypt_zero_sk(&self, sk: &SecretKey<T>) -> FVCiphertext<T>
Use the secret key to generate a fresh encryption of zero
sourcefn encrypt_sk(&self, pt: &FVPlaintext, sk: &SecretKey<T>) -> FVCiphertext<T>
fn encrypt_sk(&self, pt: &FVPlaintext, sk: &SecretKey<T>) -> FVCiphertext<T>
Encrypt a given plaintext
sourcefn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> FVPlaintext
fn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> FVPlaintext
Decrypt a ciphertext
Auto Trait Implementations
impl<T> RefUnwindSafe for SecretKey<T> where
T: RefUnwindSafe,
impl<T> Send for SecretKey<T> where
T: Send + Sync,
impl<T> Sync for SecretKey<T> where
T: Send + Sync,
impl<T> Unpin for SecretKey<T> where
T: Unpin,
impl<T> UnwindSafe for SecretKey<T> where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more