(
&self,
indexed_messages_sorted_by_index: MI,
)
| 104 | } |
| 105 | |
| 106 | pub fn commit_to_messages<'a, MI>( |
| 107 | &self, |
| 108 | indexed_messages_sorted_by_index: MI, |
| 109 | ) -> Result<G, KVACError> |
| 110 | where |
| 111 | MI: IntoIterator<Item = (usize, &'a G::ScalarField)>, |
| 112 | { |
| 113 | let (bases, scalars): (Vec<_>, Vec<_>) = process_results( |
| 114 | pair_valid_items_with_slice::<_, _, _, KVACError, _>( |
| 115 | indexed_messages_sorted_by_index, |
| 116 | CheckLeft(seq_pairs_satisfy(|a, b| a < b)), |
| 117 | &self.g_vec, |
| 118 | ), |
| 119 | |iter| iter.unzip(), |
| 120 | )?; |
| 121 | |
| 122 | Ok(G::Group::msm_unchecked(&bases, &scalars).into_affine()) |
| 123 | } |
| 124 | |
| 125 | /// Used to create whats called `B` in the paper. `B = g_0 + user_public_key + \sum_i{g_i * m_i}` |
| 126 | pub fn b<'a, MI>( |
no test coverage detected