pub struct Curve2 {
pub a: Fp2,
pub b: Fp2,
pub p: BigInt,
}Expand description
A Weierstrass curve y² = x³ + ax + b over 𝔽_{p²}.
Fields§
§a: Fp2§b: Fp2§p: BigIntImplementations§
Source§impl Curve2
impl Curve2
pub fn new(a: Fp2, b: Fp2, p: BigInt) -> Curve2
pub fn is_on_curve(&self, pt: &Point2) -> bool
pub fn negate(&self, pt: &Point2) -> Point2
pub fn add(&self, p1: &Point2, p2: &Point2) -> Point2
pub fn double(&self, pt: &Point2) -> Point2
Sourcepub fn mul(&self, k: &BigInt, pt: &Point2) -> Point2
pub fn mul(&self, k: &BigInt, pt: &Point2) -> Point2
Scalar multiplication k·P by double-and-add (k ≥ 0).
Sourcepub fn j_invariant(&self) -> Option<Fp2>
pub fn j_invariant(&self) -> Option<Fp2>
The j-invariant in 𝔽_{p²} — the supersingular-graph vertex this curve sits at.
Trait Implementations§
impl Eq for Curve2
impl StructuralPartialEq for Curve2
Auto Trait Implementations§
impl Freeze for Curve2
impl RefUnwindSafe for Curve2
impl Send for Curve2
impl Sync for Curve2
impl Unpin for Curve2
impl UnsafeUnpin for Curve2
impl UnwindSafe for Curve2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more