CurveId

Trait CurveId 

Source
pub trait CurveId {
    // Required methods
    fn curve_id() -> u64;
    fn curve_type() -> CurveType;
    fn field() -> BigInt;
}
Expand description

Trait for identifying elliptic curves used in zero-knowledge proof systems.

This trait provides a way to statically identify different elliptic curves through unique numeric identifiers. Each curve type implements this trait to return its specific curve ID, enabling type-safe curve selection and backend specialization.

Curve types are typically used as type parameters to specify which elliptic curve a particular backend or proof system should use.

Required Methods§

Source

fn curve_id() -> u64

Returns the unique numeric identifier for this curve.

Each curve implementation must return a unique ID that distinguishes it from all other supported curves.

Source

fn curve_type() -> CurveType

Source

fn field() -> BigInt

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§