libsnark: Use mp_limb_t cast instead of uint64_t when masking bigint.data
This commit is contained in:
@@ -690,7 +690,7 @@ Fp_model<n, modulus> Fp_model<n,modulus>::random_element() /// returns random el
|
|||||||
const std::size_t part = bitno/GMP_NUMB_BITS;
|
const std::size_t part = bitno/GMP_NUMB_BITS;
|
||||||
const std::size_t bit = bitno - (GMP_NUMB_BITS*part);
|
const std::size_t bit = bitno - (GMP_NUMB_BITS*part);
|
||||||
|
|
||||||
r.mont_repr.data[part] &= ~(UINT64_C(1)<<bit);
|
r.mont_repr.data[part] &= ~(((mp_limb_t) 1)<<bit);
|
||||||
|
|
||||||
bitno--;
|
bitno--;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ Fp12_2over3over2_model<n, modulus> Fp12_2over3over2_model<n,modulus>::cyclotomic
|
|||||||
res = res.cyclotomic_squared();
|
res = res.cyclotomic_squared();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exponent.data[i] & (UINT64_C(1)<<j))
|
if (exponent.data[i] & (((mp_limb_t) 1)<<j))
|
||||||
{
|
{
|
||||||
found_one = true;
|
found_one = true;
|
||||||
res = res * (*this);
|
res = res * (*this);
|
||||||
|
|||||||
Reference in New Issue
Block a user