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§
Required Methods§
Sourcefn restore_original(&self, commitment: &Source::Commitment) -> Source
fn restore_original(&self, commitment: &Source::Commitment) -> Source
Restores the original source before the commitment from the supplement
(the self) and commitment.
Sourcefn extract_supplement(&self) -> &Self::Suppl
fn extract_supplement(&self) -> &Self::Suppl
Extract supplement from the proof.
Provided Methods§
Sourcefn verify(
&self,
msg: &Msg,
commitment: &Source::Commitment,
) -> Result<(), ConvolveVerifyError>where
Self: VerifyEq,
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.