mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-10 16:01:28 +01:00
Fix base scalar multiplication (#117)
This commit is contained in:
@@ -559,7 +559,7 @@ where
|
||||
.map(|(b, c)| (b.borrow().clone(), *c))
|
||||
.unzip();
|
||||
let base = bases[0];
|
||||
*self = Self::constant(base).scalar_mul_le(bits.iter())?;
|
||||
*self += Self::constant(base).scalar_mul_le(bits.iter())?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ pub trait CurveVar<C: CurveGroup, ConstraintF: Field>:
|
||||
// else, set self = self;
|
||||
result = bit.borrow().select(&self_plus_base, &result)?;
|
||||
}
|
||||
*self = result;
|
||||
*self += result;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user