pub struct Ciphertext<V: Variant> {
pub u: V::Public,
pub v: Block,
pub w: Block,
}
Expand description
Encrypted message.
Fields§
§u: V::Public
First group element U = r * Public::one().
v: Block
Encrypted random value V = sigma XOR H2(e(r * P_pub, Q_id)).
w: Block
Encrypted message W = M XOR H4(sigma).
Trait Implementations§
Source§impl<V: Clone + Variant> Clone for Ciphertext<V>
impl<V: Clone + Variant> Clone for Ciphertext<V>
Source§fn clone(&self) -> Ciphertext<V>
fn clone(&self) -> Ciphertext<V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<V: Variant> EncodeSize for Ciphertext<V>
impl<V: Variant> EncodeSize for Ciphertext<V>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl<V: Ord + Variant> Ord for Ciphertext<V>
impl<V: Ord + Variant> Ord for Ciphertext<V>
Source§fn cmp(&self, other: &Ciphertext<V>) -> Ordering
fn cmp(&self, other: &Ciphertext<V>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<V: PartialOrd + Variant> PartialOrd for Ciphertext<V>where
V::Public: PartialOrd,
impl<V: PartialOrd + Variant> PartialOrd for Ciphertext<V>where
V::Public: PartialOrd,
Source§impl<V: Variant> Read for Ciphertext<V>
impl<V: Variant> Read for Ciphertext<V>
Source§impl<V: Variant> Write for Ciphertext<V>
impl<V: Variant> Write for Ciphertext<V>
impl<V: Eq + Variant> Eq for Ciphertext<V>
impl<V: Variant> StructuralPartialEq for Ciphertext<V>
Auto Trait Implementations§
impl<V> Freeze for Ciphertext<V>
impl<V> RefUnwindSafe for Ciphertext<V>
impl<V> Send for Ciphertext<V>
impl<V> Sync for Ciphertext<V>
impl<V> Unpin for Ciphertext<V>
impl<V> UnwindSafe for Ciphertext<V>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
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