pub struct Ciphertext<V: Variant> {
pub u: V::Public,
pub v: Block,
pub w: Block,
}Expand description
Encrypted message.
Fields§
§u: V::PublicFirst group element U = r * Public::generator().
v: BlockEncrypted random value V = sigma XOR H2(e(P_pub, Q_id)^r).
w: BlockEncrypted message W = M XOR H4(sigma).
Trait Implementations§
Source§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§fn encode_inline_size(&self) -> usize
fn encode_inline_size(&self) -> usize
Returns the encoded size excluding bytes passed to
BufsMut::push
during Write::write_bufs. Used to size the fixed working buffer for
inline writes, so it must not be less than the bytes written inline.
Override alongside Write::write_bufs for types where large
byte fields go via push, or the working buffer will over-allocate.impl<V: Eq + Variant> Eq for Ciphertext<V>
Source§impl<V: Ord + Variant> Ord for Ciphertext<V>
impl<V: Ord + Variant> Ord for Ciphertext<V>
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum 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>
impl<V: PartialEq + Variant> StructuralPartialEq for Ciphertext<V>
Source§impl<V: Variant> Write for Ciphertext<V>
impl<V: Variant> Write for Ciphertext<V>
Source§fn write_bufs(&self, buf: &mut impl BufsMut)
fn write_bufs(&self, buf: &mut impl BufsMut)
Writes to a
BufsMut, allowing existing byte chunks to be
appended via BufsMut::push instead of written inline. Must encode
to the same format as Write::write. Defaults to Write::write.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> UnsafeUnpin 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