Get the response from post-challenge phase of the Schnorr protocol for the given message index `msg_idx`. Used when comparing message equality
(
&self,
msg_idx: usize,
revealed_msg_ids: &BTreeSet<usize>,
)
| 445 | /// Get the response from post-challenge phase of the Schnorr protocol for the given message index |
| 446 | /// `msg_idx`. Used when comparing message equality |
| 447 | pub fn get_resp_for_message( |
| 448 | &self, |
| 449 | msg_idx: usize, |
| 450 | revealed_msg_ids: &BTreeSet<usize>, |
| 451 | ) -> Result<&E::ScalarField, BBSPlusError> { |
| 452 | let adjusted_idx = msg_index_to_schnorr_response_index(msg_idx, revealed_msg_ids) |
| 453 | .ok_or_else(|| BBSPlusError::InvalidMsgIdxForResponse(msg_idx))?; |
| 454 | if let Some(resp) = self.sc_resp_2.as_ref() { |
| 455 | Ok(resp.get_response(adjusted_idx)?) |
| 456 | } else if let Some(resp) = self.sc_partial_resp_2.as_ref() { |
| 457 | Ok(resp.get_response(adjusted_idx)?) |
| 458 | } else { |
| 459 | Err(BBSPlusError::NeedEitherPartialOrCompleteSchnorrResponse) |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | pub fn get_responses( |
| 464 | &self, |
no test coverage detected