arnaucube
arnaucube/shockwave-plusPublic Self-hosted repository
fix: properly get challenge point
Daniel Tehrani contact@dantehrani.com
Sat, 29 Jul 2023 16:15:33 -0700
commit

adf7ba6108ef139f16aeed891554455317c15654

parent

cda41a937434b1247fa3e29db9fe2d313dedf1d4

1 files changed, 2 insertions(+), 3 deletions(-)

jump to
M tensor_pcs/src/transcript.rs → tensor_pcs/src/transcript.rs

@@ -36,10 +36,9 @@ .collect()

} pub fn challenge_fe(&mut self) -> F { - // TODO: This is insecure - let mut bytes = [0u8; 32]; + let mut bytes = [0u8; 64]; self.transcript_inner.challenge_bytes(b"", &mut bytes); - F::from_repr(bytes).unwrap() + F::from_uniform_bytes(&bytes) } pub fn challenge_bytes(&mut self, bytes: &mut [u8]) {