Trait commit_verify::CommitVerify

source ·
pub trait CommitVerify<Msg, Protocol: CommitmentProtocol>
where Self: Eq + Sized,
{ // Required method fn commit(msg: &Msg) -> Self; // Provided method fn verify(&self, msg: &Msg) -> Result<(), VerifyError> { ... } }
Expand description

Trait for commit-verify scheme.

Required Methods§

source

fn commit(msg: &Msg) -> Self

Creates a commitment to a byte representation of a given message

Provided Methods§

source

fn verify(&self, msg: &Msg) -> Result<(), VerifyError>

Verifies commitment against the message; default implementation just repeats the commitment to the message and check it against the self.

Object Safety§

This trait is not object safe.

Implementors§