pub struct SecretKey<T>(/* private fields */);
Expand description
SecretKey type
Trait Implementations§
Source§impl<T> AdditiveHomomorphicScheme<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
impl<T> AdditiveHomomorphicScheme<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
Source§fn 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.
Source§fn 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.
Source§impl<T> EncryptionOfZeros<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
impl<T> EncryptionOfZeros<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
Source§fn 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
Source§fn 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
Source§impl<T> KeyGeneration<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
impl<T> KeyGeneration<(RqPoly<T>, RqPoly<T>), SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
Source§fn generate_key(&self) -> SecretKey<T>
fn generate_key(&self) -> SecretKey<T>
Generate a secret key
Source§fn generate_keypair(&self) -> (FVCiphertext<T>, SecretKey<T>)
fn generate_keypair(&self) -> (FVCiphertext<T>, SecretKey<T>)
Generate a (pk, sk) keypair
Source§impl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
impl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
Source§fn 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
Source§impl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
impl<T> PKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
Source§fn encrypt(
&self,
pt: &DefaultFVPlaintext,
pk: &FVCiphertext<T>,
) -> FVCiphertext<T>
fn encrypt( &self, pt: &DefaultFVPlaintext, pk: &FVCiphertext<T>, ) -> FVCiphertext<T>
Encrypt a given plaintext
Source§impl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
impl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<T>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
Source§fn 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
Source§fn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> FVPlaintext<T>
fn decrypt(&self, ct: &FVCiphertext<T>, sk: &SecretKey<T>) -> FVPlaintext<T>
Decrypt a ciphertext
Source§impl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
impl<T> SKEncryption<(RqPoly<T>, RqPoly<T>), Vec<u8>, SecretKey<T>> for FV<T>where
RqPoly<T>: FiniteRingElt,
T: SuperTrait<T>,
Source§fn 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
Source§fn 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> Freeze for SecretKey<T>
impl<T> RefUnwindSafe for SecretKey<T>where
T: RefUnwindSafe,
impl<T> Send for SecretKey<T>
impl<T> Sync for SecretKey<T>
impl<T> Unpin for SecretKey<T>where
T: Unpin,
impl<T> UnwindSafe for SecretKey<T>where
T: RefUnwindSafe + UnwindSafe,
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