Struct chain_vote::tally::TallyDecryptShare
source · pub struct TallyDecryptShare {
elements: Vec<ProvenDecryptShare>,
}Expand description
TallyDecryptShare contains one decryption share per existing option. All committee
members (todo: this will change once DKG is completed)
need to submit a TallyDecryptShare in order to successfully decrypt
the EncryptedTally.
Fields§
§elements: Vec<ProvenDecryptShare>Implementations§
sourcepub fn verify(
&self,
encrypted_tally: &EncryptedTally,
pk: &MemberPublicKey
) -> bool
pub fn verify( &self, encrypted_tally: &EncryptedTally, pk: &MemberPublicKey ) -> bool
Given the member’s public key MemberPublicKey, and the EncryptedTally, verifies the
correctness of the TallyDecryptShare.
sourcepub fn options(&self) -> usize
pub fn options(&self) -> usize
Number of voting options this tally decrypt share structure is constructed for.
sourcepub fn bytes_len(options: usize) -> usize
pub fn bytes_len(options: usize) -> usize
Size of the byte representation for a tally decrypt share with the given number of options.
pub fn to_bytes(&self) -> Vec<u8>
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
source§fn clone(&self) -> TallyDecryptShare
fn clone(&self) -> TallyDecryptShare
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§fn eq(&self, other: &TallyDecryptShare) -> bool
fn eq(&self, other: &TallyDecryptShare) -> bool
This method tests for
self and other values to be equal, and is used
by ==.