1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use core::ops::Mul;
use super::{
comp::ParityCmp,
curve::{Affine, Projective},
field::PrimeField,
};
#[cfg(feature = "std")]
use super::{algebra::Ring, comp::ParallelCmp};
pub trait PairingField: PrimeField + ParityCmp {}
#[cfg(feature = "std")]
pub trait FftField: PrimeField + ParallelCmp + From<u64> {
const S: usize;
const ROOT_OF_UNITY: Self;
fn one() -> Self;
}
#[cfg(feature = "std")]
pub trait Polynomial: Ring + ParallelCmp {
type Domain: FftField;
fn evaluate(self, at: Self::Domain) -> Self::Domain;
}
pub trait Commitment {
type G1Affine: Affine + From<Self::G1Projective>;
type G1Projective: Projective
+ From<Self::G1Affine>
+ Mul<Self::ScalarField, Output = Self::G1Projective>;
type G2Affine: Affine;
type G2Projective: Projective;
type ScalarField: PrimeField;
}