Trait 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).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§