mirror of
https://github.com/arnaucube/Nova.git
synced 2026-01-11 16:41:28 +01:00
chore: update to ff/group 0.13 (#166)
* chore: update to ff/group 0.13 and associated dependencies Updates: - zkcrypto/ff, zkcrypto/group to 0.13, - bellperson to 0.25, - pasta_curves to 0.5.1, and removes the fil_pasta_curves fork - pasta-msm should no longer need a fork (WIP) Adapts source in function, mostly for const usage and API updates. * expose the portable feature of pasta-MSM * update pointer to pasta-msm * Clippy --------- Co-authored-by: François Garillot <francois@garillot.net>
This commit is contained in:
@@ -73,7 +73,7 @@ where
|
||||
}
|
||||
|
||||
fn mul_bits<B: AsRef<[u64]>>(s: &G::Scalar, bits: BitIterator<B>) -> G::Scalar {
|
||||
let mut x = G::Scalar::zero();
|
||||
let mut x = G::Scalar::ZERO;
|
||||
for bit in bits {
|
||||
x = x.double();
|
||||
|
||||
@@ -88,14 +88,14 @@ where
|
||||
assert_eq!(digest.len(), 64);
|
||||
let mut bits: [u64; 8] = [0; 8];
|
||||
LittleEndian::read_u64_into(digest, &mut bits);
|
||||
Self::mul_bits(&G::Scalar::one(), BitIterator::new(bits))
|
||||
Self::mul_bits(&G::Scalar::ONE, BitIterator::new(bits))
|
||||
}
|
||||
|
||||
pub fn to_uniform_32(digest: &[u8]) -> G::Scalar {
|
||||
assert_eq!(digest.len(), 32);
|
||||
let mut bits: [u64; 4] = [0; 4];
|
||||
LittleEndian::read_u64_into(digest, &mut bits);
|
||||
Self::mul_bits(&G::Scalar::one(), BitIterator::new(bits))
|
||||
Self::mul_bits(&G::Scalar::ONE, BitIterator::new(bits))
|
||||
}
|
||||
|
||||
pub fn hash_to_scalar(persona: &[u8], a: &[u8], b: &[u8]) -> G::Scalar {
|
||||
|
||||
Reference in New Issue
Block a user