pub struct AssociatedCiphertext<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C>> {
pub ciphertext: C,
pub public_key: &'pk PK,
}
Expand description
An AssociatedCiphertext associates a ciphertext with a reference to the corresponding public key to make homomorphic operations and decrypting more ergonomic.
Fields
ciphertext: C
A potentially homomorphic ciphertext
public_key: &'pk PK
The related public key
Implementations
sourceimpl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicMultiplication> AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicMultiplication> AssociatedCiphertext<'pk, C, PK>
sourcepub fn pow(&self, rhs: &PK::Input) -> AssociatedCiphertext<'pk, C, PK>
pub fn pow(&self, rhs: &PK::Input) -> AssociatedCiphertext<'pk, C, PK>
Applies some operation on this ciphertext so that the decrypted value reflects some exponentiation with input
Trait Implementations
sourceimpl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicAddition> Add<&AssociatedCiphertext<'pk, C, PK>> for &AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicAddition> Add<&AssociatedCiphertext<'pk, C, PK>> for &AssociatedCiphertext<'pk, C, PK>
sourceimpl<'pk, P: PotentialInput, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C, Plaintext = P> + HomomorphicAddition> Add<&P> for &AssociatedCiphertext<'pk, C, PK>
impl<'pk, P: PotentialInput, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C, Plaintext = P> + HomomorphicAddition> Add<&P> for &AssociatedCiphertext<'pk, C, PK>
sourceimpl<'pk, C: Debug + Associable<PK>, PK: Debug + EncryptionKey<Ciphertext = C>> Debug for AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Debug + Associable<PK>, PK: Debug + EncryptionKey<Ciphertext = C>> Debug for AssociatedCiphertext<'pk, C, PK>
sourceimpl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicMultiplication> Mul<&AssociatedCiphertext<'pk, C, PK>> for &AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicMultiplication> Mul<&AssociatedCiphertext<'pk, C, PK>> for &AssociatedCiphertext<'pk, C, PK>
sourceimpl<'pk, P: PotentialInput, C: Associable<PK>, PK: EncryptionKey<Input = P, Ciphertext = C> + HomomorphicAddition> Mul<&P> for &AssociatedCiphertext<'pk, C, PK>
impl<'pk, P: PotentialInput, C: Associable<PK>, PK: EncryptionKey<Input = P, Ciphertext = C> + HomomorphicAddition> Mul<&P> for &AssociatedCiphertext<'pk, C, PK>
sourceimpl<'pk, C: PartialEq + Associable<PK>, PK: PartialEq + EncryptionKey<Ciphertext = C>> PartialEq<AssociatedCiphertext<'pk, C, PK>> for AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: PartialEq + Associable<PK>, PK: PartialEq + EncryptionKey<Ciphertext = C>> PartialEq<AssociatedCiphertext<'pk, C, PK>> for AssociatedCiphertext<'pk, C, PK>
sourcefn eq(&self, other: &AssociatedCiphertext<'pk, C, PK>) -> bool
fn eq(&self, other: &AssociatedCiphertext<'pk, C, PK>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicAddition> Sub<&AssociatedCiphertext<'pk, C, PK>> for &AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C> + HomomorphicAddition> Sub<&AssociatedCiphertext<'pk, C, PK>> for &AssociatedCiphertext<'pk, C, PK>
sourceimpl<'pk, P: PotentialInput, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C, Plaintext = P> + HomomorphicAddition> Sub<&P> for &AssociatedCiphertext<'pk, C, PK>
impl<'pk, P: PotentialInput, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C, Plaintext = P> + HomomorphicAddition> Sub<&P> for &AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Eq + Associable<PK>, PK: Eq + EncryptionKey<Ciphertext = C>> Eq for AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C>> StructuralEq for AssociatedCiphertext<'pk, C, PK>
impl<'pk, C: Associable<PK>, PK: EncryptionKey<Ciphertext = C>> StructuralPartialEq for AssociatedCiphertext<'pk, C, PK>
Auto Trait Implementations
impl<'pk, C, PK> RefUnwindSafe for AssociatedCiphertext<'pk, C, PK>where
C: RefUnwindSafe,
PK: RefUnwindSafe,
impl<'pk, C, PK> Send for AssociatedCiphertext<'pk, C, PK>where
C: Send,
PK: Sync,
impl<'pk, C, PK> Sync for AssociatedCiphertext<'pk, C, PK>where
C: Sync,
PK: Sync,
impl<'pk, C, PK> Unpin for AssociatedCiphertext<'pk, C, PK>where
C: Unpin,
impl<'pk, C, PK> UnwindSafe for AssociatedCiphertext<'pk, C, PK>where
C: UnwindSafe,
PK: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.