generic_ec_curves/rust_crypto/curve_name.rs
1/// Name of the curve
2pub trait CurveName {
3 /// Name of the curve
4 const CURVE_NAME: &'static str;
5}
6
7#[cfg(feature = "secp256r1")]
8impl CurveName for p256::NistP256 {
9 const CURVE_NAME: &'static str = "secp256r1";
10}
11
12#[cfg(feature = "secp256k1")]
13impl CurveName for k256::Secp256k1 {
14 const CURVE_NAME: &'static str = "secp256k1";
15}
16
17#[cfg(feature = "stark")]
18impl CurveName for stark_curve::StarkCurve {
19 const CURVE_NAME: &'static str = "stark";
20}