Struct plonkup::proof_system::Verifier
source · [−]pub struct Verifier {
pub verifier_key: Option<VerifierKey>,
pub preprocessed_transcript: Transcript,
/* private fields */
}
Expand description
Abstraction structure designed verify Proof
s.
Fields
verifier_key: Option<VerifierKey>
VerificationKey which is used to verify a specific PLONK circuit
preprocessed_transcript: Transcript
Store the messages exchanged during the preprocessing stage This is copied each time, we make a proof, so that we can use the same verifier to Verify multiple proofs from the same circuit. If this is not copied, then the verification procedure will modify the transcript, making it unusable for future proofs.
Implementations
sourceimpl Verifier
impl Verifier
sourcepub fn with_size(label: &'static [u8], size: usize) -> Verifier
pub fn with_size(label: &'static [u8], size: usize) -> Verifier
Creates a new Verifier
instance with some expected size.
sourcepub fn composer_mut(&mut self) -> &mut TurboComposer
pub fn composer_mut(&mut self) -> &mut TurboComposer
Mutable borrow of the TurboComposer
.
sourcepub fn preprocess(&mut self, commit_key: &CommitKey) -> Result<(), Error>
pub fn preprocess(&mut self, commit_key: &CommitKey) -> Result<(), Error>
Preprocess a circuit to obtain a VerifierKey
and a circuit
descriptor so that the Verifier
instance can verify Proof
s
for this circuit descriptor instance.
sourcepub fn key_transcript(&mut self, label: &'static [u8], message: &[u8])
pub fn key_transcript(&mut self, label: &'static [u8], message: &[u8])
Keys the Transcript
with additional seed information
Wrapper around Transcript::append_message
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnwindSafe for Verifier
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more