pub struct SecretKey<T>(_);Expand description
SecretKey type
Trait Implementations
sourceimpl<T> AdditiveHomomorphicScheme<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
impl<T> AdditiveHomomorphicScheme<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
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 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> EncryptionOfZeros<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
impl<T> EncryptionOfZeros<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
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 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
sourceimpl<T> KeyGeneration<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
impl<T> KeyGeneration<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
sourcefn generate_key(&self) -> SecretKey<T>
fn generate_key(&self) -> SecretKey<T>
Generate a secret key
sourcefn generate_keypair(&self) -> (FVCiphertext<T>, SecretKey<T>)
fn generate_keypair(&self) -> (FVCiphertext<T>, SecretKey<T>)
Generate a (pk, sk) keypair
sourceimpl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
impl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
sourcefn encrypt(&self, pt: &FVPlaintext<T>, pk: &FVCiphertext<T>) -> FVCiphertext<T>
fn encrypt(&self, pt: &FVPlaintext<T>, pk: &FVCiphertext<T>) -> FVCiphertext<T>
Encrypt a given plaintext
sourceimpl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
impl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
sourcefn encrypt(
&self,
pt: &DefaultFVPlaintext,
pk: &FVCiphertext<T>
) -> FVCiphertext<T>
fn encrypt(
&self,
pt: &DefaultFVPlaintext,
pk: &FVCiphertext<T>
) -> FVCiphertext<T>
Encrypt a given plaintext
sourceimpl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
impl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
sourcefn encrypt_sk(&self, pt: &FVPlaintext<T>, sk: &SecretKey<T>) -> FVCiphertext<T>
fn encrypt_sk(&self, pt: &FVPlaintext<T>, sk: &SecretKey<T>) -> FVCiphertext<T>
Encrypt a given plaintext
sourcefn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> FVPlaintext<T>
fn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> FVPlaintext<T>
Decrypt a ciphertext
sourceimpl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
impl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8, Global>, SecretKey<T>> for FV<T> where
RqPoly<T>: FiniteRingElt,
T: Clone + ArithUtils<T> + PartialEq + From<u32>,
sourcefn encrypt_sk(
&self,
pt: &DefaultFVPlaintext,
sk: &SecretKey<T>
) -> FVCiphertext<T>
fn encrypt_sk(
&self,
pt: &DefaultFVPlaintext,
sk: &SecretKey<T>
) -> FVCiphertext<T>
Encrypt a given plaintext
sourcefn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> DefaultFVPlaintext
fn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> DefaultFVPlaintext
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