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
| 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> { |