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

Method gen_proof

smc_range_proof/src/ccs_range_proof/arbitrary_range.rs:213–243  ·  view source on GitHub ↗
(self, challenge: &E::ScalarField)

Source from the content-addressed store, hash-verified

211 }
212
213 pub fn gen_proof(self, challenge: &E::ScalarField) -> CCSArbitraryRangeProof<E> {
214 let z_v_min = cfg_into_iter!(0..self.V_min.len())
215 .map(|i| self.t_min[i] + (self.v_min[i] * challenge))
216 .collect::<Vec<_>>();
217 let z_v_max = cfg_into_iter!(0..self.V_max.len())
218 .map(|i| self.t_max[i] + (self.v_max[i] * challenge))
219 .collect::<Vec<_>>();
220 let z_sigma_min = cfg_into_iter!(0..self.V_min.len())
221 .map(|i| self.s_min[i] + (self.digits_min[i] * challenge))
222 .collect::<Vec<_>>();
223 let z_sigma_max = cfg_into_iter!(0..self.V_max.len())
224 .map(|i| self.s_max[i] + (self.digits_max[i] * challenge))
225 .collect::<Vec<_>>();
226 let z_r_min = self.m_min + (self.r * challenge);
227 let z_r_max = self.m_max + (self.r * challenge);
228 CCSArbitraryRangeProof {
229 base: self.base,
230 V_min: self.V_min,
231 V_max: self.V_max,
232 a_min: self.a_min,
233 a_max: self.a_max,
234 D_min: self.D_min,
235 D_max: self.D_max,
236 z_v_min,
237 z_v_max,
238 z_sigma_min,
239 z_sigma_max,
240 z_r_min,
241 z_r_max,
242 }
243 }
244
245 pub fn compute_challenge_contribution<W: Write>(
246 V_min: &[E::G1Affine],

Callers 1

Calls 1

mapMethod · 0.80

Tested by 1