Skip to main content

Protocol

Trait Protocol 

Source
pub trait Protocol<F: Field> {
    type Key;
    type Instance: Message<F>;
    type Proof;
    type Error: Debug + Clone;

    // Required methods
    fn transcript_pattern(
        key: &Self::Key,
        builder: TranscriptBuilder,
    ) -> TranscriptBuilder;
    fn prove(instance: Self::Instance) -> Self::Proof;
    fn verify<S: Duplex<F>>(
        key: &Self::Key,
        instance: MessageGuard<Self::Instance>,
        transcript: TranscriptGuard<'_, F, S, Self::Proof>,
    ) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn transcript_pattern( key: &Self::Key, builder: TranscriptBuilder, ) -> TranscriptBuilder

Source

fn prove(instance: Self::Instance) -> Self::Proof

Source

fn verify<S: Duplex<F>>( key: &Self::Key, instance: MessageGuard<Self::Instance>, transcript: TranscriptGuard<'_, F, S, Self::Proof>, ) -> Result<(), Self::Error>

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§