Struct chain_vote::cryptography::elgamal::HybridCiphertext
source · pub struct HybridCiphertext {
pub(crate) e1: GroupElement,
pub(crate) e2: Box<[u8]>,
}
Expand description
Hybrid Ciphertext (which can be found in section 2.1.3 of the Treasury spec) is defined
by (g^r, AESEnd_k(m)), where k = h^r and r is taken uniformly at random from Zp. h is
and ElGamal
public key.
Fields§
§e1: GroupElement
§e2: Box<[u8]>
Implementations§
source§impl HybridCiphertext
impl HybridCiphertext
pub fn to_bytes(&self) -> Vec<u8>
pub fn from_bytes(slice: &[u8]) -> Option<HybridCiphertext>
Trait Implementations§
source§impl Clone for HybridCiphertext
impl Clone for HybridCiphertext
source§fn clone(&self) -> HybridCiphertext
fn clone(&self) -> HybridCiphertext
Returns a copy 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 moreAuto Trait Implementations§
impl RefUnwindSafe for HybridCiphertext
impl Send for HybridCiphertext
impl Sync for HybridCiphertext
impl Unpin for HybridCiphertext
impl UnwindSafe for HybridCiphertext
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