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

Method gen_proof

smc_range_proof/src/ccs_range_proof/perfect_range.rs:132–150  ·  view source on GitHub ↗
(self, challenge: &E::ScalarField)

Source from the content-addressed store, hash-verified

130 }
131
132 pub fn gen_proof(self, challenge: &E::ScalarField) -> CCSPerfectRangeProof<E> {
133 // Following is different from the paper, the paper has `-` but here its `+`
134 let z_v = cfg_into_iter!(0..self.V.len())
135 .map(|i| self.t[i] + (self.v[i] * challenge))
136 .collect::<Vec<_>>();
137 let z_sigma = cfg_into_iter!(0..self.V.len())
138 .map(|i| self.s[i] + (self.digits[i] * challenge))
139 .collect::<Vec<_>>();
140 let z_r = self.m + (self.r * challenge);
141 CCSPerfectRangeProof {
142 base: self.base,
143 V: self.V,
144 a: self.a,
145 D: self.D,
146 z_v,
147 z_sigma,
148 z_r,
149 }
150 }
151
152 pub fn compute_challenge_contribution<W: Write>(
153 V: &[E::G1Affine],

Callers 1

Calls 1

mapMethod · 0.80

Tested by 1