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

Method challenge_group_elem

utils/src/transcript.rs:201–215  ·  view source on GitHub ↗
(&mut self, label: &'static [u8])

Source from the content-addressed store, hash-verified

199 }
200
201 fn challenge_group_elem<G: AffineRepr>(&mut self, label: &'static [u8]) -> G {
202 let mut buf = [0; 64];
203 self.merlin.challenge_bytes(label, &mut buf);
204 let mut counter = 0;
205 loop {
206 let c = G::from_random_bytes(&buf);
207 if let Some(chal) = c {
208 return chal;
209 }
210
211 buf[0] = counter;
212 counter += 1;
213 self.merlin.challenge_bytes(label, &mut buf);
214 }
215 }
216
217 fn challenge_group_elem_without_static_label<G: AffineRepr>(&mut self, label: &[u8]) -> G {
218 let mut buf = [0; 64];

Callers

nothing calls this directly

Calls 1

challenge_bytesMethod · 0.45

Tested by

no test coverage detected