pub struct ThinBootstrapData<Params, Strategy>where
Params: BGVCiphertextParams,
Strategy: BGVModswitchStrategy<Params>,
<CiphertextRing<Params> as RingStore>::Type: AsBGVPlaintext<Params>,{ /* private fields */ }Implementations§
Source§impl<Params, Strategy> ThinBootstrapData<Params, Strategy>where
Params: BGVCiphertextParams,
Strategy: BGVModswitchStrategy<Params>,
<CiphertextRing<Params> as RingStore>::Type: AsBGVPlaintext<Params>,
impl<Params, Strategy> ThinBootstrapData<Params, Strategy>where
Params: BGVCiphertextParams,
Strategy: BGVModswitchStrategy<Params>,
<CiphertextRing<Params> as RingStore>::Type: AsBGVPlaintext<Params>,
pub fn largest_plaintext_ring(&self) -> &PlaintextRing<Params>
pub fn required_galois_keys( &self, P: &PlaintextRing<Params>, ) -> Vec<CyclotomicGaloisGroupEl>
Sourcepub fn bootstrap_thin<'a, const LOG: bool>(
&self,
C_master: &CiphertextRing<Params>,
P_base: &PlaintextRing<Params>,
ct_dropped_moduli: &RNSFactorIndexList,
ct: Ciphertext<Params>,
rk: &RelinKey<'a, Params>,
gks: &[(CyclotomicGaloisGroupEl, KeySwitchKey<'a, Params>)],
sk_hwt: Option<usize>,
debug_sk: Option<&SecretKey<Params>>,
) -> ModulusAwareCiphertext<Params, Strategy>where
Params: 'a,
pub fn bootstrap_thin<'a, const LOG: bool>(
&self,
C_master: &CiphertextRing<Params>,
P_base: &PlaintextRing<Params>,
ct_dropped_moduli: &RNSFactorIndexList,
ct: Ciphertext<Params>,
rk: &RelinKey<'a, Params>,
gks: &[(CyclotomicGaloisGroupEl, KeySwitchKey<'a, Params>)],
sk_hwt: Option<usize>,
debug_sk: Option<&SecretKey<Params>>,
) -> ModulusAwareCiphertext<Params, Strategy>where
Params: 'a,
Performs bootstrapping on thinly packed ciphertexts.
Parameters are as follows:
C_masteris the ciphertext ring over the largest RNS base, both relinearization and Galois keys must be defined w.r.t.C_masterP_baseis the current plaintext ring;ctmust be a valid BGV ciphertext encrypting a message fromP_basect_dropped_modulicontains all RNS factor indices ofC_masterthat aren’t used byct(anymore); More concrete,ctlives over the ciphertext ring one obtains by dropping the RNS factors with these indices from the RNS base ofC_masterctis the ciphertext to bootstrap; It must be thinly packed (i.e. each slot may only contain an element ofZ/(t)), otherwise this function will cause immediate noise overflow.rkis a relinearization key, to be used for computing productsgksis a list of Galois keys, to be used for applying Galois automorphisms. This list must contain a Galois key for each Galois automorphism listed inThinBootstrapData::required_galois_keys(), but may contain additional Galois keysdebug_skcan be a reference to a secret key, which is used to print out decryptions of intermediate results for debugging purposes. May only be set ifLOG == true.
Auto Trait Implementations§
impl<Params, Strategy> Freeze for ThinBootstrapData<Params, Strategy>where
Strategy: Freeze,
<<Params as BGVCiphertextParams>::CiphertextRing as BGFVCiphertextRing>::NumberRing: Freeze,
impl<Params, Strategy> RefUnwindSafe for ThinBootstrapData<Params, Strategy>where
Strategy: RefUnwindSafe,
<<Params as BGVCiphertextParams>::CiphertextRing as BGFVCiphertextRing>::NumberRing: RefUnwindSafe,
<<<Params as BGVCiphertextParams>::CiphertextRing as BGFVCiphertextRing>::NumberRing as HENumberRing>::Decomposed: RefUnwindSafe,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: RefUnwindSafe,
impl<Params, Strategy> Send for ThinBootstrapData<Params, Strategy>
impl<Params, Strategy> Sync for ThinBootstrapData<Params, Strategy>
impl<Params, Strategy> Unpin for ThinBootstrapData<Params, Strategy>where
Strategy: Unpin,
<<Params as BGVCiphertextParams>::CiphertextRing as BGFVCiphertextRing>::NumberRing: Unpin,
<<<Params as BGVCiphertextParams>::CiphertextRing as BGFVCiphertextRing>::NumberRing as HENumberRing>::Decomposed: Unpin,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: Unpin,
impl<Params, Strategy> UnwindSafe for ThinBootstrapData<Params, Strategy>where
Strategy: UnwindSafe,
<<Params as BGVCiphertextParams>::CiphertextRing as BGFVCiphertextRing>::NumberRing: UnwindSafe,
<<<Params as BGVCiphertextParams>::CiphertextRing as BGFVCiphertextRing>::NumberRing as HENumberRing>::Decomposed: UnwindSafe,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more