Trait commit_verify::ConvolveCommitProof

source ·
pub trait ConvolveCommitProof<Msg, Source, Protocol>
where Self: Sized + VerifyEq, Source: ConvolveCommit<Msg, Self, Protocol>, Protocol: CommitmentProtocol,
{ type Suppl; // Required methods fn restore_original(&self, commitment: &Source::Commitment) -> Source; fn extract_supplement(&self) -> &Self::Suppl; // Provided method fn verify( &self, msg: &Msg, commitment: &Source::Commitment ) -> Result<(), ConvolveVerifyError> where Self: VerifyEq { ... } }
Expand description

Proof type used by ConvolveCommit protocol.

Required Associated Types§

source

type Suppl

Supplement is a part of the proof data provided during commitment procedure.

Required Methods§

source

fn restore_original(&self, commitment: &Source::Commitment) -> Source

Restores the original source before the commitment from the supplement (the self) and commitment.

source

fn extract_supplement(&self) -> &Self::Suppl

Extract supplement from the proof.

Provided Methods§

source

fn verify( &self, msg: &Msg, commitment: &Source::Commitment ) -> Result<(), ConvolveVerifyError>
where Self: VerifyEq,

Verifies commitment using proof (the self) against the message.

Default implementation repeats ConvolveCommit::convolve_commit procedure, restoring the original value out of proof data, checking that the resulting commitment matches the provided one in the commitment parameter.

§Errors

Errors if the commitment doesn’t pass the validation (see ConvolveVerifyError variants for the cases when this may happen).

Object Safety§

This trait is not object safe.

Implementors§