Skip to content

Commit

Permalink
fix-tob-scroll-21 (#59)
Browse files Browse the repository at this point in the history
* fix-tob-scroll-21

* expose param field for re-randomization
  • Loading branch information
zhenfeizhang authored Nov 30, 2023
1 parent cf9765a commit 5f758e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions halo2_proofs/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ pub fn field_to_bn<F: FieldExt>(f: &F) -> BigUint {

/// Input a big integer `bn`, compute a field element `f`
/// such that `f == bn % F::MODULUS`.
/// Require:
/// - bn is less than 512 bits.
/// Return:
/// - bn mod F::MODULUS when bn > F::MODULUS
pub fn bn_to_field<F: FieldExt>(bn: &BigUint) -> F {
let mut buf = bn.to_bytes_le();
buf.resize(64, 0u8);
Expand Down

0 comments on commit 5f758e0

Please sign in to comment.