pub struct Ciphertext<Params: ?Sized + BGVCiphertextParams> {
pub implicit_scale: El<Zn>,
pub c0: El<CiphertextRing<Params>>,
pub c1: El<CiphertextRing<Params>>,
}Expand description
A BGV ciphertext w.r.t. some BGVCiphertextParams. Note that this implementation
does not include an automatic management of the ciphertext modulus chain,
it is up to the user to keep track of the RNS base used for each ciphertext.
Fields§
§implicit_scale: El<Zn>the ciphertext represents the value implicit_scale^-1 lift(c0 + c1 s) mod t,
i.e. implicit_scale stores the factor in Z/tZ that is introduced by modulus-switching;
Hence, implicit_scale is set to 1 when encrypting a value, and only changes when
doing modulus-switching.
c0: El<CiphertextRing<Params>>§c1: El<CiphertextRing<Params>>Auto Trait Implementations§
impl<Params> Freeze for Ciphertext<Params>where
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: Freeze,
Params: ?Sized,
impl<Params> RefUnwindSafe for Ciphertext<Params>where
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: RefUnwindSafe,
Params: ?Sized,
impl<Params> Send for Ciphertext<Params>
impl<Params> Sync for Ciphertext<Params>
impl<Params> Unpin for Ciphertext<Params>where
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: Unpin,
Params: ?Sized,
impl<Params> UnwindSafe for Ciphertext<Params>where
<<Params as BGVCiphertextParams>::CiphertextRing as RingBase>::Element: UnwindSafe,
Params: ?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