A Rust workspace for finite fields, elliptic curves, isogenies, and higher-level elliptic-curve protocols.
The project is organized as a layered set of crates:
ecrust-fp— finite-field arithmeticecrust-ec— elliptic-curve abstractions and point arithmeticecrust-isogeny— isogeny abstractions and scaffoldingecrust-protocol— protocol-oriented building blocksecrust— umbrella crate re-exporting the full stack
Conceptually, the stack looks like this:
protocol ← ECDH / EC-ElGamal helpers built on curve points
↓
isogeny ← isogeny and kernel abstractions (work in progress)
↓
ec ← elliptic-curve models and point arithmetic
↓
fp ← finite fields: Fp, Fp^m, F2, F2^m
↓
crypto-bigint ← multi-precision integers / Montgomery arithmetic
If you are starting fresh, the simplest option is the umbrella crate:
[dependencies]
ecrust = "0.1"This lets you import modules as:
use ecrust::fp;
use ecrust::ec;If you want finer-grained dependencies, use the layer-specific crates directly. Each crate README shows the recommended Cargo.toml entry.
The workspace is usable for experiments, API exploration, and teaching, with the following caveats:
ecrust-fpis currently the most complete layer.ecrust-eccontains several curve models and point types, but parts of the arithmetic are still evolving.ecrust-isogenyis scaffolding for future work.ecrust-protocolprovides useful building blocks, but should not yet be treated as production-grade cryptographic software.
cargo build --workspace
cargo test --workspaceSee DEMO.md for concrete examples covering:
FieldOpswithFpElementFieldOpswithFpExtFieldOpswithF2Ext- curve and point instantiation
SecretScalar,Ecdh, andEcElGamal- generic helper functions over traits
ecrust/
├── Cargo.toml
├── README.md
├── DEMO.md
├── ecrust/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
├── fp/
├── ec/
├── isogeny/
└── protocol/
This software is currently in alpha. We are actively working toward cleaner APIs and broader constant-time coverage, but the code should still be treated as experimental rather than production-hardened.
- Gustavo Banegas
- Martin Azon
- Sam Frengley
Apache-2.0. See LICENSE.
