mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-14 10:45:47 +00:00
Add ScalarEngine trait
This is extracted from pairing's Engine trait.
This commit is contained in:
parent
0eb9f5040b
commit
2067360930
@ -290,6 +290,14 @@ pub trait PrimeField: Field {
|
|||||||
fn root_of_unity() -> Self;
|
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)]
|
#[derive(Debug)]
|
||||||
pub struct BitIterator<E> {
|
pub struct BitIterator<E> {
|
||||||
t: E,
|
t: E,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user