Struct eccoxide::curve::projective::Point [−][src]
pub struct Point<FE> {
pub x: FE,
pub y: FE,
pub z: FE,
}
Expand description
Projective point with field element FE
Affine point associated with (X,Y,Z) : (X/Z, Y/Z)
Note that 2 points are equal if they are in the same equivalence class, which is determined with 4 FieldElement multiplications.
Example: (1,2,1) and (2,4,2) are equal
Fields
x: FE
y: FE
z: FE
Implementations
Check if a point is at infinity
pub fn add_different<'x, 'y, C: WeierstrassCurve<FieldElement = FE>>(
&'x self,
other: &'y Point<FE>,
curve: C
) -> Point<FE> where
for<'a> &'a FE: Add<FE, Output = FE>,
for<'a> &'a FE: Mul<FE, Output = FE>,
for<'a> &'a FE: Sub<FE, Output = FE>,
for<'a, 'b> &'a FE: Add<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Mul<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Sub<&'b FE, Output = FE>,
pub fn add_different_a0<'x, 'y, C: WeierstrassCurve<FieldElement = FE> + WeierstrassCurveA0>(
&'x self,
other: &'y Point<FE>,
curve: C
) -> Point<FE> where
for<'a> &'a FE: Add<FE, Output = FE>,
for<'a> &'a FE: Mul<FE, Output = FE>,
for<'a> &'a FE: Sub<FE, Output = FE>,
for<'a, 'b> &'a FE: Add<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Mul<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Sub<&'b FE, Output = FE>,
pub fn double_a0<C: WeierstrassCurve<FieldElement = FE> + WeierstrassCurveA0>(
&self,
curve: C
) -> Self
pub fn scale_a0<C: WeierstrassCurve<FieldElement = FE> + WeierstrassCurveA0>(
&self,
n: &[u8],
curve: C
) -> Self
pub fn add_or_double<'b, C: WeierstrassCurve<FieldElement = FE>>(
&self,
other: &'b Point<FE>,
curve: C
) -> Point<FE>
pub fn add_or_double_a0<'b, C: WeierstrassCurve<FieldElement = FE> + WeierstrassCurveA0>(
&self,
other: &'b Point<FE>,
curve: C
) -> Point<FE>
Trait Implementations
impl<FE: Field> TryFrom<Point<FE>> for Point<FE> where
for<'a> &'a FE: Add<FE, Output = FE>,
for<'a> &'a FE: Mul<FE, Output = FE>,
for<'a> &'a FE: Sub<FE, Output = FE>,
for<'a, 'b> &'a FE: Add<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Mul<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Sub<&'b FE, Output = FE>,
impl<FE: Field> TryFrom<Point<FE>> for Point<FE> where
for<'a> &'a FE: Add<FE, Output = FE>,
for<'a> &'a FE: Mul<FE, Output = FE>,
for<'a> &'a FE: Sub<FE, Output = FE>,
for<'a, 'b> &'a FE: Add<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Mul<&'b FE, Output = FE>,
for<'a, 'b> &'a FE: Sub<&'b FE, Output = FE>,
Auto Trait Implementations
impl<FE> RefUnwindSafe for Point<FE> where
FE: RefUnwindSafe,
impl<FE> UnwindSafe for Point<FE> where
FE: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more