Module ec

Source
Expand description

Elliptic Curve Primitives

This module provides constant-time implementations of elliptic curve operations on NIST curves P-224, P-256, P-384, and P-521. These implementations are designed to be resistant to timing attacks and provide a foundation for higher-level protocols like ECDH-KEM. This module now also includes support for Koblitz (secp256k1) and Binary (sect283k1) curves.

Re-exports§

pub use bls12_381::G1Projective as Bls12_381G1;
pub use bls12_381::G2Projective as Bls12_381G2;
pub use bls12_381::Gt as Bls12_381Gt;
pub use bls12_381::Bls12_381Scalar;
pub use bls12_381::pairing as bls12_381_pairing;
pub use b283k::Point as B283kPoint;
pub use b283k::Scalar as B283kScalar;
pub use k256::Point as K256Point;
pub use k256::Scalar as K256Scalar;
pub use p192::Point as P192Point;
pub use p192::Scalar as P192Scalar;
pub use p224::Point as P224Point;
pub use p224::Scalar as P224Scalar;
pub use p256::Point as P256Point;
pub use p256::Scalar as P256Scalar;
pub use p384::Point as P384Point;
pub use p384::Scalar as P384Scalar;
pub use p521::Point as P521Point;
pub use p521::Scalar as P521Scalar;

Modules§

b283k
Koblitz sect283k1 Elliptic Curve Primitives
bls12_381
BLS12-381 pairing-friendly elliptic curve implementation.
k256
Koblitz secp256k1 Elliptic Curve Primitives
p192
NIST P-192 Elliptic Curve Primitives
p224
NIST P-224 Elliptic Curve Primitives
p256
NIST P-256 Elliptic Curve Primitives
p384
NIST P-384 Elliptic Curve Primitives
p521
NIST P-521 Elliptic Curve Primitives

Structs§

Affine
Affine coordinates (x,y)
Jacobian
Jacobian projective coordinates (X:Y:Z) where x = X/Z² and y = Y/Z³

Traits§

CoordinateSystem
Common trait for coordinate systems used in elliptic curve operations