`blindings` specifies the randomness to use. If some index is not present, new randomness is generated for it.
(
&mut self,
rng: &mut R,
mut blindings: BTreeMap<usize, G::ScalarField>,
witnesses: Vec<G::ScalarField>,
)
| 44 | |
| 45 | /// `blindings` specifies the randomness to use. If some index is not present, new randomness is generated for it. |
| 46 | pub fn init<R: RngCore>( |
| 47 | &mut self, |
| 48 | rng: &mut R, |
| 49 | mut blindings: BTreeMap<usize, G::ScalarField>, |
| 50 | witnesses: Vec<G::ScalarField>, |
| 51 | ) -> Result<(), ProofSystemError> { |
| 52 | let blindings = (0..witnesses.len()) |
| 53 | .map(|i| { |
| 54 | blindings |
| 55 | .remove(&i) |
| 56 | .unwrap_or_else(|| G::ScalarField::rand(rng)) |
| 57 | }) |
| 58 | .collect::<Vec<_>>(); |
| 59 | self.init_with_all_blindings_given(blindings, witnesses) |
| 60 | } |
| 61 | |
| 62 | pub fn init_with_all_blindings_given( |
| 63 | &mut self, |
nothing calls this directly
no test coverage detected