Struct tiny_ped_com::CommitVerifier
[−]
[src]
pub struct CommitVerifier { /* fields omitted */ }
CommitVerifier is the party who is verifying the commitment. They send the first message to the Committer and receive two messages from the sender.
Methods
impl CommitVerifier
[src]
pub fn init<T: Rng>(rng: &mut T) -> (VerifierPublicKey, Self)
[src]
Initialize the Verifier with a random number generator.
pub fn receive_commitment(&mut self, commitment: Commitment)
[src]
Gives the verifier the commitment received from the Committer.
pub fn verify(
&self,
val: &CommitmentValue,
commitment_opening: &CommitmentOpening
) -> bool
[src]
&self,
val: &CommitmentValue,
commitment_opening: &CommitmentOpening
) -> bool
Verifies that the received commitment value and commitment opening are valid given the generated public key from the first round and the received commitment from the second round.