Trait sunscreen_zkp_backend::FieldSpec
source · pub trait FieldSpec: Clone {
type BackendField: Add<Self::BackendField, Output = Self::BackendField> + Sub<Self::BackendField, Output = Self::BackendField> + Mul<Self::BackendField, Output = Self::BackendField> + Neg<Output = Self::BackendField> + Clone + TryFrom<BigInt, Error = Error> + ZkpInto<BigInt>;
const FIELD_MODULUS: BigInt;
}
Expand description
Indicates the given type is a field used used in a
ZKP backend. E.g. Bulletproofs uses Ristretto Scalar
values.
Required Associated Types§
sourcetype BackendField: Add<Self::BackendField, Output = Self::BackendField> + Sub<Self::BackendField, Output = Self::BackendField> + Mul<Self::BackendField, Output = Self::BackendField> + Neg<Output = Self::BackendField> + Clone + TryFrom<BigInt, Error = Error> + ZkpInto<BigInt>
type BackendField: Add<Self::BackendField, Output = Self::BackendField> + Sub<Self::BackendField, Output = Self::BackendField> + Mul<Self::BackendField, Output = Self::BackendField> + Neg<Output = Self::BackendField> + Clone + TryFrom<BigInt, Error = Error> + ZkpInto<BigInt>
The underlying field type used in a backend.
Required Associated Constants§
sourceconst FIELD_MODULUS: BigInt
const FIELD_MODULUS: BigInt
The modulus defining the FieldSpec::BackendField
type.