pub struct ActiveParticipant<G: Group> { /* private fields */ }
Expand description
Personalized state of a participant of a threshold ElGamal encryption scheme
once the participant receives the secret share from the Dealer
.
At this point, the participant can produce VerifiableDecryption
s.
Implementations§
Source§impl<G: Group> ActiveParticipant<G>
impl<G: Group> ActiveParticipant<G>
Sourcepub fn new(
key_set: PublicKeySet<G>,
index: usize,
secret_share: SecretKey<G>,
) -> Result<Self, Error>
pub fn new( key_set: PublicKeySet<G>, index: usize, secret_share: SecretKey<G>, ) -> Result<Self, Error>
Sourcepub fn key_set(&self) -> &PublicKeySet<G>
pub fn key_set(&self) -> &PublicKeySet<G>
Returns the public key set for the threshold ElGamal encryption scheme this participant is a part of.
Returns share of the secret key for this participant. This is secret information that must not be shared.
Returns share of the public key for this participant.
Sourcepub fn proof_of_possession<R: CryptoRng + RngCore>(
&self,
rng: &mut R,
) -> ProofOfPossession<G>
pub fn proof_of_possession<R: CryptoRng + RngCore>( &self, rng: &mut R, ) -> ProofOfPossession<G>
Generates a ProofOfPossession
of the participant’s
secret_share
.
Creates a VerifiableDecryption
for the specified ciphertext
together with a proof
of its validity. rng
is used to generate the proof.
Trait Implementations§
Source§impl<G: Clone + Group> Clone for ActiveParticipant<G>
impl<G: Clone + Group> Clone for ActiveParticipant<G>
Source§fn clone(&self) -> ActiveParticipant<G>
fn clone(&self) -> ActiveParticipant<G>
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<'de, G: Group> Deserialize<'de> for ActiveParticipant<G>
impl<'de, G: Group> Deserialize<'de> for ActiveParticipant<G>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<G> Freeze for ActiveParticipant<G>
impl<G> RefUnwindSafe for ActiveParticipant<G>
impl<G> Send for ActiveParticipant<G>
impl<G> Sync for ActiveParticipant<G>
impl<G> Unpin for ActiveParticipant<G>
impl<G> UnwindSafe for ActiveParticipant<G>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)