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

Method challenge_group_elem_without_static_label

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

Source from the content-addressed store, hash-verified

215 }
216
217 fn challenge_group_elem_without_static_label<G: AffineRepr>(&mut self, label: &[u8]) -> G {
218 let mut buf = [0; 64];
219 self.merlin
220 .challenge_bytes_with_non_static_label(label, &mut buf);
221 let mut counter = 0;
222 loop {
223 let c = G::from_random_bytes(&buf);
224 if let Some(chal) = c {
225 return chal;
226 }
227
228 buf[0] = counter;
229 counter += 1;
230 self.merlin
231 .challenge_bytes_with_non_static_label(label, &mut buf);
232 }
233 }
234}
235
236impl Write for MerlinTranscript {

Callers

nothing calls this directly

Tested by

no test coverage detected