EccInstructions::mul: take Self::ScalarVar instead of Chip::Var.

This commit is contained in:
therealyingtong 2022-03-22 12:35:06 +08:00
parent 72ff677776
commit 6d83db719e
2 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ pub trait EccInstructions<C: CurveAffine>:
fn mul(
&self,
layouter: &mut impl Layouter<C::Base>,
scalar: &Self::Var,
scalar: &Self::ScalarVar,
base: &Self::NonIdentityPoint,
) -> Result<(Self::Point, Self::ScalarVar), Error>;
@ -259,7 +259,7 @@ impl<C: CurveAffine, EccChip: EccInstructions<C>> NonIdentityPoint<C, EccChip> {
pub fn mul(
&self,
mut layouter: impl Layouter<C::Base>,
by: &EccChip::Var,
by: &EccChip::ScalarVar,
) -> Result<(Point<C, EccChip>, ScalarVar<C, EccChip>), Error> {
self.chip
.mul(&mut layouter, by, &self.inner.clone())

View File

@ -471,7 +471,7 @@ where
fn mul(
&self,
layouter: &mut impl Layouter<pallas::Base>,
scalar: &Self::Var,
scalar: &Self::ScalarVar,
base: &Self::NonIdentityPoint,
) -> Result<(Self::Point, Self::ScalarVar), Error> {
let config = self.config().mul;