mirror of https://github.com/zcash/orchard.git
Address review comments.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
2962115aef
commit
ff504c1a3f
|
@ -290,7 +290,7 @@ impl<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> Point<C,
|
||||||
mut layouter: impl Layouter<C::Base>,
|
mut layouter: impl Layouter<C::Base>,
|
||||||
by: &ScalarVar<C, EccChip>,
|
by: &ScalarVar<C, EccChip>,
|
||||||
) -> Result<Self, Error> {
|
) -> Result<Self, Error> {
|
||||||
assert_eq!(format!("{:?}", self.chip), format!("{:?}", by.chip));
|
assert_eq!(self.chip, by.chip);
|
||||||
self.chip
|
self.chip
|
||||||
.mul(&mut layouter, &by.inner, &self.inner)
|
.mul(&mut layouter, &by.inner, &self.inner)
|
||||||
.map(|inner| Point {
|
.map(|inner| Point {
|
||||||
|
@ -315,8 +315,8 @@ impl<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> X<C, EccC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A constant elliptic curve point over the given curve, for which scalar multiplication
|
/// A constant elliptic curve point over the given curve, for which window tables have
|
||||||
/// is more efficient.
|
/// been provided to make scalar multiplication more efficient.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct FixedPoint<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> {
|
pub struct FixedPoint<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> {
|
||||||
chip: EccChip,
|
chip: EccChip,
|
||||||
|
@ -336,7 +336,7 @@ impl<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> FixedPoin
|
||||||
mut layouter: impl Layouter<C::Base>,
|
mut layouter: impl Layouter<C::Base>,
|
||||||
by: &ScalarFixed<C, EccChip>,
|
by: &ScalarFixed<C, EccChip>,
|
||||||
) -> Result<Point<C, EccChip>, Error> {
|
) -> Result<Point<C, EccChip>, Error> {
|
||||||
assert_eq!(format!("{:?}", self.chip), format!("{:?}", by.chip));
|
assert_eq!(self.chip, by.chip);
|
||||||
self.chip
|
self.chip
|
||||||
.mul_fixed(&mut layouter, &by.inner, &self.inner)
|
.mul_fixed(&mut layouter, &by.inner, &self.inner)
|
||||||
.map(|inner| Point {
|
.map(|inner| Point {
|
||||||
|
@ -367,7 +367,7 @@ impl<C: CurveAffine, EccChip: EccInstructions<C> + Clone + Debug + Eq> FixedPoin
|
||||||
mut layouter: impl Layouter<C::Base>,
|
mut layouter: impl Layouter<C::Base>,
|
||||||
by: &ScalarFixedShort<C, EccChip>,
|
by: &ScalarFixedShort<C, EccChip>,
|
||||||
) -> Result<Point<C, EccChip>, Error> {
|
) -> Result<Point<C, EccChip>, Error> {
|
||||||
assert_eq!(format!("{:?}", self.chip), format!("{:?}", by.chip));
|
assert_eq!(self.chip, by.chip);
|
||||||
self.chip
|
self.chip
|
||||||
.mul_fixed_short(&mut layouter, &by.inner, &self.inner)
|
.mul_fixed_short(&mut layouter, &by.inner, &self.inner)
|
||||||
.map(|inner| Point {
|
.map(|inner| Point {
|
||||||
|
|
Loading…
Reference in New Issue