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

Method verify_using_randomized_mult_checker

schnorr_pok/src/partial.rs:170–186  ·  view source on GitHub ↗

Same as `Self::is_valid` except it uses `RandomizedMultChecker` to combine the scalar multiplication checks into a single

(
        &self,
        bases: Vec<G>,
        y: G,
        t: G,
        challenge: &G::ScalarField,
        missing_responses: BTreeMap<usize, G::ScalarField>,
        rmc: &mut RandomizedMultChec

Source from the content-addressed store, hash-verified

168
169 /// Same as `Self::is_valid` except it uses `RandomizedMultChecker` to combine the scalar multiplication checks into a single
170 pub fn verify_using_randomized_mult_checker(
171 &self,
172 bases: Vec<G>,
173 y: G,
174 t: G,
175 challenge: &G::ScalarField,
176 missing_responses: BTreeMap<usize, G::ScalarField>,
177 rmc: &mut RandomizedMultChecker<G>,
178 ) -> Result<(), SchnorrError> {
179 let full_resp = self.pre_verify(&bases, missing_responses)?;
180 rmc.add_many(
181 bases.into_iter().chain(iter::once(y)),
182 full_resp.iter().chain(iter::once(&-*challenge)),
183 t,
184 );
185 Ok(())
186 }
187
188 /// Get indices for which it does not have any response. These responses will be fetched from other protocols.
189 pub fn get_missing_response_indices(&self) -> BTreeSet<usize> {

Calls 6

add_manyMethod · 0.80
add_2Method · 0.80
add_3Method · 0.80
pre_verifyMethod · 0.45
into_iterMethod · 0.45
iterMethod · 0.45

Tested by 2

discrete_log_partialFunction · 0.36
ped_comm_partialFunction · 0.36