diff --git a/src/lib.rs b/src/lib.rs index b662dc4..a9d117f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -290,6 +290,14 @@ pub trait PrimeField: Field { fn root_of_unity() -> Self; } +/// An "engine" is a collection of types (fields, elliptic curve groups, etc.) +/// with well-defined relationships. Specific relationships (for example, a +/// pairing-friendly curve) can be defined in a subtrait. +pub trait ScalarEngine: Sized + 'static + Clone { + /// This is the scalar field of the engine's groups. + type Fr: PrimeField + SqrtField; +} + #[derive(Debug)] pub struct BitIterator { t: E,