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
50
51
//! Generic curve abstraction.
//!
//! The main goal of this trait is to decouple:
//! 1. the **curve model** (short Weierstrass, Montgomery, Edwards, ...), and
//! 2. the **point representation** (affine, projective, x-only, ...).
//!
//! Each concrete curve type chooses its base field and its native point type
//! through associated types.
use FieldOps;
use cratePointOps;
/// Generic elliptic-curve model.
///
/// A curve model fixes:
/// - the base field,
/// - the point type used with that model,
/// - and the membership test `is_on_curve`.
///
/// This is intentionally minimal so that different models (Montgomery,
/// short/general Weierstrass, Edwards, Hessian, ...)
/// can implement it without being forced into one particular formula set.