[−][src]Trait rcrypto::elliptic::EllipticCurve
A Curve represents a short-form Weierstrass curve with a=-3.
(0, 0) identifies the infinite point.
See https://www.hyperelliptic.org/EFD/g1p/auto-shortw.html
Required methods
fn curve_params(&self) -> &CurveParams
fn is_on_curve(&self, x: &BigInt, y: &BigInt) -> bool
reports whether the given (x,y) lies on the curve
fn add(
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)
(x1, y1) + (x2, y2)
fn double(&self, x: &BigInt, y: &BigInt) -> (BigInt, BigInt)
(x, y) * 2
fn scalar(&self, x: &BigInt, y: &BigInt, k: &Nat) -> (BigInt, BigInt)
(x, y) * k
fn scalar_base_point(&self, k: &Nat) -> (BigInt, BigInt)
base point (gx, gy) * k -> (zx, zy)
Implementors
impl EllipticCurve for CurveP224
[src]
fn curve_params(&self) -> &CurveParams
[src]
fn is_on_curve(&self, x: &BigInt, y: &BigInt) -> bool
[src]
fn add(
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)
[src]
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)
fn double(&self, x: &BigInt, y: &BigInt) -> (BigInt, BigInt)
[src]
fn scalar(&self, x: &BigInt, y: &BigInt, k: &Nat) -> (BigInt, BigInt)
[src]
fn scalar_base_point(&self, k: &Nat) -> (BigInt, BigInt)
[src]
impl EllipticCurve for CurveP256
[src]
fn curve_params(&self) -> &CurveParams
[src]
fn is_on_curve(&self, x: &BigInt, y: &BigInt) -> bool
[src]
fn add(
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)
[src]
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)
fn double(&self, x: &BigInt, y: &BigInt) -> (BigInt, BigInt)
[src]
fn scalar(&self, x: &BigInt, y: &BigInt, k: &Nat) -> (BigInt, BigInt)
[src]
fn scalar_base_point(&self, k: &Nat) -> (BigInt, BigInt)
[src]
impl EllipticCurve for CurveParams
[src]
fn curve_params(&self) -> &CurveParams
[src]
fn is_on_curve(&self, x: &BigInt, y: &BigInt) -> bool
[src]
fn add(
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)
[src]
&self,
x1: &BigInt,
y1: &BigInt,
x2: &BigInt,
y2: &BigInt
) -> (BigInt, BigInt)