ecrust-ec
Elliptic-curve abstractions and point arithmetic for the ecrust ecosystem.
This crate builds on ecrust-fp and provides reusable curve and point APIs together with concrete models such as Weierstrass, Montgomery, Edwards, Hessian, and Jacobi forms.
What is in this crate?
CurveOps: trait for curve-level operationsPointOps: trait for generic group operations on points- concrete curve and point types for several models
- scalar multiplication helpers and model-specific arithmetic
Adding it to your project
[]
= { = "ecrust-ec", = "0.1" }
= { = "ecrust-fp", = "0.1" }
Or, with the umbrella crate:
[]
= "0.1"
and then import from ecrust::ec and ecrust::fp.
Minimal example
use ;
use WeierstrassCurve;
use AffinePoint;
use FpElement;
const_prime_monty_params!;
type F19 = ;
let curve = new_short;
let p = new;
assert!;
let q = p.double;
let _r = p.add;
Status
This crate is suitable for experimentation, education, and API exploration. It is not yet a hardened production implementation. In particular, some backends still contain exceptional-case branching and should not be assumed to provide full side-channel resistance.
Related crates
ecrust-fp: finite-field arithmeticecrust-isogeny: isogeny scaffolding on top of this layerecrust-protocol: higher-level protocolsecrust: umbrella crate re-exporting the full stack
Authors
- Gustavo Banegas
- Martin Azon
- Sam Frengley
License
Apache-2.0