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

Method verify

utils/src/randomized_mult_checker.rs:93–101  ·  view source on GitHub ↗

Combine all the checks into a multi-scalar multiplication and return true if the result is 0.

(&self)

Source from the content-addressed store, hash-verified

91
92 /// Combine all the checks into a multi-scalar multiplication and return true if the result is 0.
93 pub fn verify(&self) -> bool {
94 let mut points = Vec::with_capacity(self.len());
95 let mut scalars = Vec::with_capacity(self.len());
96 for (_, (s, point)) in self.args.iter() {
97 points.push(*point);
98 scalars.push(*s);
99 }
100 G::Group::msm_unchecked(&points, &scalars).is_zero()
101 }
102
103 pub fn len(&self) -> usize {
104 self.args.len()

Callers

nothing calls this directly

Calls 3

is_zeroMethod · 0.80
lenMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected