Generate proof. Post-challenge phase of the protocol.
(
self,
challenge: &E::ScalarField,
)
| 208 | |
| 209 | /// Generate proof. Post-challenge phase of the protocol. |
| 210 | pub fn gen_proof( |
| 211 | self, |
| 212 | challenge: &E::ScalarField, |
| 213 | ) -> Result<PoKOfSignature23G1Proof<E>, BBSPlusError> { |
| 214 | // Schnorr response for relation `g1 + \sum_{i in D}(h_i*m_i)` = `\sum_{j not in D}(h_j*{-m_j})` |
| 215 | let resp = self.sc_comm.response(&self.sc_wits, challenge)?; |
| 216 | |
| 217 | Ok(PoKOfSignature23G1Proof { |
| 218 | A_bar: self.A_bar, |
| 219 | B_bar: self.B_bar, |
| 220 | T: self.sc_comm.t, |
| 221 | sc_resp: resp, |
| 222 | }) |
| 223 | } |
| 224 | |
| 225 | /// Helper that serializes state to get challenge contribution. Serialized the randomized signature, |
| 226 | /// and commitments and instances for both Schnorr protocols |