MCPcopy Create free account
hub / github.com/docknetwork/crypto / b

Method b

kvac/src/bbs_sharp/setup.rs:126–136  ·  view source on GitHub ↗

Used to create whats called `B` in the paper. `B = g_0 + user_public_key + \sum_i{g_i * m_i}`

(
        &self,
        indexed_messages_sorted_by_index: MI,
        user_public_key: &'a UserPublicKey<G>,
    )

Source from the content-addressed store, hash-verified

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>(
127 &self,
128 indexed_messages_sorted_by_index: MI,
129 user_public_key: &'a UserPublicKey<G>,
130 ) -> Result<G::Group, KVACError>
131 where
132 MI: IntoIterator<Item = (usize, &'a G::ScalarField)>,
133 {
134 let commitment = self.commit_to_messages(indexed_messages_sorted_by_index)?;
135 Ok(commitment + self.g_0 + user_public_key.0)
136 }
137}
138
139impl<G: AffineRepr> MultiMessageSignatureParams for MACParams<G> {

Callers 4

newMethod · 0.45
verifyMethod · 0.45
initMethod · 0.45
initMethod · 0.45

Calls 1

commit_to_messagesMethod · 0.45

Tested by

no test coverage detected