mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
pasta: Reorganize the curve macro
This will make the migration to group easier to review.
This commit is contained in:
parent
7037d55320
commit
082d66d6e7
1 changed files with 5 additions and 5 deletions
|
|
@ -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 a new issue