Skip to content

Commit

Permalink
fix: issue with bit check in from_be_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
madztheo committed Sep 4, 2024
1 parent f60da60 commit 1df2767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime_bignum.nr
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl<let N: u32, Params> BigNumTrait for BigNum<N, Params> where Params: BigNumP
fn from_be_bytes<let NBytes: u32>(x: [u8; NBytes]) -> BigNum<N, Params> {
let num_bits = NBytes * 8;
let modulus_bits = Params::modulus_bits();
assert(num_bits > modulus_bits);
assert(num_bits >= modulus_bits);
assert(num_bits - modulus_bits < 8);
let mut result = BigNum::new();

Expand Down

0 comments on commit 1df2767

Please sign in to comment.