Struct chain_vote::tally::ValidatedTally
source · pub struct ValidatedTally {
r: Vec<Ciphertext>,
decrypt_shares: Vec<TallyDecryptShare>,
max_stake: u64,
}
Expand description
ValidatedTally
can only be constructed by valid TallyDecryptShare
s, and the
corresponding EncryptedTally
. This intermediate structure ensures that only
validated decryptions are used to compute the election outcome, i.e. if the
committee members do not present valid shares, the tally decryption cannot be
computed.
This intermediate structure is particularly of interest during the distributed
decryption protocol, where, in case there is a misbehaving party, one needs to
perform certain actions between the verification of a decryption share, and its
use in the decrypted tally computation.
Fields§
§r: Vec<Ciphertext>
§max_stake: u64
Implementations§
source§impl ValidatedTally
impl ValidatedTally
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
fn decrypt(&self) -> Vec<GroupElement>
sourcepub fn decrypt_tally(
&self,
table: &TallyOptimizationTable
) -> Result<Tally, TallyError>
pub fn decrypt_tally( &self, table: &TallyOptimizationTable ) -> Result<Tally, TallyError>
Given the decrypt_shares
of all committee members, max_votes
, and a tally optimization
table, decrypt_tally
first decrypts self
, and then computes the discrete logarithm
of each resulting plaintext.
Trait Implementations§
source§impl Clone for ValidatedTally
impl Clone for ValidatedTally
source§fn clone(&self) -> ValidatedTally
fn clone(&self) -> ValidatedTally
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ValidatedTally
impl Debug for ValidatedTally
source§impl Hash for ValidatedTally
impl Hash for ValidatedTally
source§impl PartialEq<ValidatedTally> for ValidatedTally
impl PartialEq<ValidatedTally> for ValidatedTally
source§fn eq(&self, other: &ValidatedTally) -> bool
fn eq(&self, other: &ValidatedTally) -> bool
self
and other
values to be equal, and is used
by ==
.