mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-30 20:11:23 +00:00
Add ScalarEngine trait
This is extracted from pairing's Engine trait.
This commit is contained in:
@@ -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<E> {
|
||||
t: E,
|
||||
|
Reference in New Issue
Block a user