pasta: Reorganize the curve macro

This will make the migration to group easier to review.
This commit is contained in:
Jack Grigg 2021-02-22 18:41:41 +00:00
parent 7037d55320
commit 082d66d6e7
1 changed files with 5 additions and 5 deletions

View File

@ -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 {