Browse Source

fix: properly get challenge point

main
Daniel Tehrani 2 years ago
parent
commit
adf7ba6108
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      tensor_pcs/src/transcript.rs

+ 2
- 3
tensor_pcs/src/transcript.rs

@ -36,10 +36,9 @@ impl Transcript {
} }
pub fn challenge_fe(&mut self) -> F { 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); 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]) { pub fn challenge_bytes(&mut self, bytes: &mut [u8]) {

Loading…
Cancel
Save