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

Method verify

utils/src/randomized_pairing_check.rs:204–214  ·  view source on GitHub ↗

Verify that all added pairing equations are satisfied.

(&self)

Source from the content-addressed store, hash-verified

202
203 /// Verify that all added pairing equations are satisfied.
204 pub fn verify(&self) -> bool {
205 debug_assert_eq!(self.pending.0.len(), self.pending.1.len());
206 let left = if !self.pending.0.is_empty() {
207 let mut p = E::multi_miller_loop(self.pending.0.clone(), self.pending.1.clone());
208 p.0.mul_assign(self.left.0);
209 p
210 } else {
211 self.left
212 };
213 E::final_exponentiation(left).unwrap() == self.right
214 }
215}
216
217#[cfg(test)]

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected