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§

source

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§

source

const FIELD_MODULUS: BigInt

The modulus defining the FieldSpec::BackendField type.

Implementors§