mirror of https://github.com/zcash/halo2.git
pasta: Reorganize the curve macro
This will make the migration to group easier to review.
This commit is contained in:
parent
7037d55320
commit
082d66d6e7
|
@ -95,6 +95,11 @@ macro_rules! new_curve_impl {
|
|||
$name::curve_constant_b()
|
||||
}
|
||||
|
||||
fn new_jacobian(x: Self::Base, y: Self::Base, z: Self::Base) -> CtOption<Self> {
|
||||
let p = $name { x, y, z };
|
||||
CtOption::new(p, p.is_on_curve())
|
||||
}
|
||||
|
||||
fn jacobian_coordinates(&self) -> ($base, $base, $base) {
|
||||
(self.x, self.y, self.z)
|
||||
}
|
||||
|
@ -148,11 +153,6 @@ macro_rules! new_curve_impl {
|
|||
*q = $name_affine::conditional_select(&q, &$name_affine::identity(), skip);
|
||||
}
|
||||
}
|
||||
|
||||
fn new_jacobian(x: Self::Base, y: Self::Base, z: Self::Base) -> CtOption<Self> {
|
||||
let p = $name { x, y, z };
|
||||
CtOption::new(p, p.is_on_curve())
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a $name_affine> for $name {
|
||||
|
|
Loading…
Reference in New Issue