move from rug to num-bigint (#53)

This commit is contained in:
Srinath Setty
2022-05-13 14:20:37 +05:30
committed by GitHub
parent 677fe23673
commit 562fa71027
5 changed files with 43 additions and 40 deletions

View File

@@ -10,7 +10,7 @@ use bellperson::{
};
use bellperson_nonnative::mp::bignat::{nat_to_limbs, BigNat};
use ff::{Field, PrimeField, PrimeFieldBits};
use rug::Integer;
use num_bigint::BigInt;
/// Gets as input the little indian representation of a number and spits out the number
#[allow(dead_code)]
@@ -116,7 +116,7 @@ pub fn scalar_as_base<G: Group>(input: G::Scalar) -> G::Base {
/// Allocate bignat a constant
pub fn alloc_bignat_constant<F: PrimeField, CS: ConstraintSystem<F>>(
mut cs: CS,
val: &Integer,
val: &BigInt,
limb_width: usize,
n_limbs: usize,
) -> Result<BigNat<F>, SynthesisError> {