MCPcopy Create free account
hub / github.com/docknetwork/crypto / verify

Method verify

proof_system/src/verifier.rs:128–142  ·  view source on GitHub ↗

Verify the `Proof` given the `ProofSpec`, `nonce` and `config`

(
        self,
        rng: &mut R,
        proof_spec: ProofSpec<E>,
        nonce: Option<Vec<u8>>,
        config: VerifierConfig,
    )

Source from the content-addressed store, hash-verified

126impl<E: Pairing> Proof<E> {
127 /// Verify the `Proof` given the `ProofSpec`, `nonce` and `config`
128 pub fn verify<R: RngCore, D: FullDigest + Digest>(
129 self,
130 rng: &mut R,
131 proof_spec: ProofSpec<E>,
132 nonce: Option<Vec<u8>>,
133 config: VerifierConfig,
134 ) -> Result<(), ProofSystemError> {
135 match config.use_lazy_randomized_pairing_checks {
136 Some(b) => {
137 let pairing_checker = RandomizedPairingChecker::new_using_rng(rng, b);
138 self._verify::<R, D>(rng, proof_spec, nonce, Some(pairing_checker))
139 }
140 None => self._verify::<R, D>(rng, proof_spec, nonce, None),
141 }
142 }
143
144 fn _verify<R: RngCore, D: FullDigest + Digest>(
145 self,

Calls

no outgoing calls