Struct chain_vote::Ciphertext
source · pub struct Ciphertext {
pub(crate) e1: GroupElement,
pub(crate) e2: GroupElement,
}
Expand description
ElGamal ciphertext. Given a message M represented by a group element, and ElGamal
ciphertext consists of (r * G; M + r * PublicKey
), where r is a random Scalar
.
Fields§
§e1: GroupElement
§e2: GroupElement
Implementations§
source§impl Ciphertext
impl Ciphertext
Trait Implementations§
source§impl<'a, 'b> Add<&'b Ciphertext> for &'a Ciphertext
impl<'a, 'b> Add<&'b Ciphertext> for &'a Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
+
operator.source§fn add(self, other: &'b Ciphertext) -> Ciphertext
fn add(self, other: &'b Ciphertext) -> Ciphertext
Performs the
+
operation. Read moresource§impl<'b> Add<&'b Ciphertext> for Ciphertext
impl<'b> Add<&'b Ciphertext> for Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
+
operator.source§impl<'a> Add<Ciphertext> for &'a Ciphertext
impl<'a> Add<Ciphertext> for &'a Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
+
operator.source§impl Add<Ciphertext> for Ciphertext
impl Add<Ciphertext> for Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
+
operator.source§impl Clone for Ciphertext
impl Clone for Ciphertext
source§fn clone(&self) -> Ciphertext
fn clone(&self) -> Ciphertext
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 moresource§impl Debug for Ciphertext
impl Debug for Ciphertext
source§impl Hash for Ciphertext
impl Hash for Ciphertext
source§impl<'a, 'b> Mul<&'b Scalar> for &'a Ciphertext
impl<'a, 'b> Mul<&'b Scalar> for &'a Ciphertext
source§impl<'b> Mul<&'b Scalar> for Ciphertext
impl<'b> Mul<&'b Scalar> for Ciphertext
source§impl<'a> Mul<Scalar> for &'a Ciphertext
impl<'a> Mul<Scalar> for &'a Ciphertext
source§impl Mul<Scalar> for Ciphertext
impl Mul<Scalar> for Ciphertext
source§impl<'a> Mul<u64> for &'a Ciphertext
impl<'a> Mul<u64> for &'a Ciphertext
source§impl PartialEq<Ciphertext> for Ciphertext
impl PartialEq<Ciphertext> for Ciphertext
source§fn eq(&self, other: &Ciphertext) -> bool
fn eq(&self, other: &Ciphertext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a, 'b> Sub<&'b Ciphertext> for &'a Ciphertext
impl<'a, 'b> Sub<&'b Ciphertext> for &'a Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
-
operator.source§fn sub(self, other: &'b Ciphertext) -> Ciphertext
fn sub(self, other: &'b Ciphertext) -> Ciphertext
Performs the
-
operation. Read moresource§impl<'b> Sub<&'b Ciphertext> for Ciphertext
impl<'b> Sub<&'b Ciphertext> for Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
-
operator.source§impl<'a> Sub<Ciphertext> for &'a Ciphertext
impl<'a> Sub<Ciphertext> for &'a Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
-
operator.source§impl Sub<Ciphertext> for Ciphertext
impl Sub<Ciphertext> for Ciphertext
§type Output = Ciphertext
type Output = Ciphertext
The resulting type after applying the
-
operator.impl Eq for Ciphertext
impl StructuralEq for Ciphertext
impl StructuralPartialEq for Ciphertext
Auto Trait Implementations§
impl RefUnwindSafe for Ciphertext
impl Send for Ciphertext
impl Sync for Ciphertext
impl Unpin for Ciphertext
impl UnwindSafe for Ciphertext
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