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

Method add_1

utils/src/randomized_mult_checker.rs:46–50  ·  view source on GitHub ↗

Add a check of the form `p * s = t`. Converts it to `p * s * r - t * r = 0` where `r` is the current randomness.

(&mut self, p: G, s: &G::ScalarField, t: G)

Source from the content-addressed store, hash-verified

44
45 /// Add a check of the form `p * s = t`. Converts it to `p * s * r - t * r = 0` where `r` is the current randomness.
46 pub fn add_1(&mut self, p: G, s: &G::ScalarField, t: G) {
47 self.add(p, self.current_random * s);
48 self.add(t, -self.current_random);
49 self.current_random *= self.random;
50 }
51
52 /// Add a check of the form `p1 * s1 + p2 * s2 = t`. Converts it to `p1 * s1 * r + p2 * s2 * r - t * r = 0` where `r` is the current randomness.
53 pub fn add_2(&mut self, p1: G, s1: &G::ScalarField, p2: G, s2: &G::ScalarField, t: G) {

Callers 1

basicFunction · 0.80

Calls 1

addMethod · 0.45

Tested by 1

basicFunction · 0.64