1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # Elliptic Curve Cryptography
//!
//! Classical elliptic curve implementations for signatures.
//!
//! ## Supported Curves
//!
//! - **secp256k1**: 128-bit security, widely used in cryptocurrencies
//! - **Ed25519**: 128-bit security, high performance, RFC 8032 compliant
//!
//! ## Unified API Design
//!
//! All elliptic curve operations follow a consistent trait-based API:
//! - `EcSignature` trait for signature schemes
//! - `EcKeyPair` trait for key management
//! - Result-based error handling
//! - Zeroize for secure memory wiping
/// Unified elliptic curve traits
/// secp256k1 elliptic curve operations. Non-FIPS: not a NIST-approved curve.
/// Ed25519 signature operations (RFC 8032).
///
/// Note: Ed25519 is not NIST-approved for FIPS 140-3 signature generation,
/// but the wrapper module is compiled in both FIPS and non-FIPS builds so
/// higher layers (convenience API, hybrid signatures) can route all Ed25519
/// operations through a single primitives entry point. Callers that need
/// FIPS-approved signatures must use ML-DSA or SLH-DSA instead.
// Re-exports (non-FIPS curves only)
pub use *;
// Ed25519 re-exports are always available so downstream modules (hybrid,
// unified_api::convenience) can delegate to the primitives wrapper without
// duplicating feature gates.
pub use *;
// Traits are always available
pub use ;