1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pub mod nistp256;
pub mod nistp384;
pub mod secp256k1;
pub use self::{nistp256::NistP256, nistp384::NistP384, secp256k1::Secp256k1};
use core::{fmt::Debug, ops::Add};
use generic_array::{
typenum::{Unsigned, U1},
ArrayLength, GenericArray,
};
pub trait Curve: Clone + Debug + Default + Eq + Ord + Send + Sync {
type ScalarSize: ArrayLength<u8> + Add + Add<U1> + Eq + Ord + Unsigned;
}
pub type Scalar<C> = GenericArray<u8, <C as Curve>::ScalarSize>;