cggmp24/
supported_curves.rs1#[cfg(feature = "curve-secp256k1")]
11pub use generic_ec::curves::Secp256k1;
12#[cfg(feature = "curve-secp256r1")]
13pub use generic_ec::curves::Secp256r1;
14#[cfg(feature = "curve-secp384r1")]
15pub use generic_ec::curves::Secp384r1;
16#[cfg(feature = "curve-stark")]
17pub use generic_ec::curves::Stark;
18
19pub use generic_ec::Curve;
20
21#[cfg(test)]
22#[allow(dead_code)]
23mod check_compatibility {
24 use generic_ec::{coords::AlwaysHasAffineX, Curve, NonZero, Point};
25
26 fn curve_is_compatible<E: Curve>()
27 where
28 NonZero<Point<E>>: AlwaysHasAffineX<E>,
29 {
30 }
31
32 fn supported_curves_are_compatible() {
33 #[cfg(feature = "curve-secp256k1")]
34 curve_is_compatible::<super::Secp256k1>();
35 #[cfg(feature = "curve-secp256r1")]
36 curve_is_compatible::<super::Secp256r1>();
37 #[cfg(feature = "curve-secp384r1")]
38 curve_is_compatible::<super::Secp384r1>();
39 #[cfg(feature = "curve-stark")]
40 curve_is_compatible::<super::Stark>();
41 }
42}