pub struct ModulusAwareCiphertext<Params: BGVCiphertextParams, Strategy: ?Sized + BGVModswitchStrategy<Params>> {
pub data: Ciphertext<Params>,
pub dropped_rns_factor_indices: Box<RNSFactorIndexList>,
pub info: Strategy::CiphertextInfo,
}Expand description
A Ciphertext which additionally stores w.r.t. which ciphertext modulus it is defined,
and which noise level (as measured by some BGVModswitchStrategy) it is estimated to have.
Fields§
§data: Ciphertext<Params>The stored raw ciphertext
dropped_rns_factor_indices: Box<RNSFactorIndexList>The indices of those RNS components w.r.t. a “master RNS base” (specified by the context) that are not used for this ciphertext; in other words, the ciphertext modulus of this ciphertext is the product of all RNS factors of the master RNS base that are not mentioned in this list
info: Strategy::CiphertextInfoAdditional information required by the modulus-switching strategy
Auto Trait Implementations§
impl<Params, Strategy> Freeze for ModulusAwareCiphertext<Params, Strategy>where
<Strategy as BGVModswitchStrategy<Params>>::CiphertextInfo: Freeze,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: Freeze,
Strategy: ?Sized,
impl<Params, Strategy> RefUnwindSafe for ModulusAwareCiphertext<Params, Strategy>where
<Strategy as BGVModswitchStrategy<Params>>::CiphertextInfo: RefUnwindSafe,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: RefUnwindSafe,
Strategy: ?Sized,
impl<Params, Strategy> Send for ModulusAwareCiphertext<Params, Strategy>where
<Strategy as BGVModswitchStrategy<Params>>::CiphertextInfo: Send,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: Send,
Strategy: ?Sized,
impl<Params, Strategy> Sync for ModulusAwareCiphertext<Params, Strategy>where
<Strategy as BGVModswitchStrategy<Params>>::CiphertextInfo: Sync,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: Sync,
Strategy: ?Sized,
impl<Params, Strategy> Unpin for ModulusAwareCiphertext<Params, Strategy>where
<Strategy as BGVModswitchStrategy<Params>>::CiphertextInfo: Unpin,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: Unpin,
Strategy: ?Sized,
impl<Params, Strategy> UnwindSafe for ModulusAwareCiphertext<Params, Strategy>where
<Strategy as BGVModswitchStrategy<Params>>::CiphertextInfo: UnwindSafe,
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: UnwindSafe,
Strategy: ?Sized,
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