Trait proof_of_sql::base::scalar::Scalar

source ·
pub trait Scalar: Clone + Debug + Display + PartialEq + Default + for<'a> From<&'a str> + Sync + Send + One + Sum + Product + Sub<Output = Self> + Copy + MulAssign + AddAssign + Zero + for<'a> From<&'a Self> + for<'a> From<&'a bool> + for<'a> From<&'a i16> + for<'a> From<&'a i32> + for<'a> From<&'a i64> + for<'a> From<&'a i128> + TryInto<i8> + TryInto<i16> + TryInto<i32> + TryInto<i64> + TryInto<i128> + Into<[u64; 4]> + From<[u64; 4]> + Ord + Neg<Output = Self> + Zero + AddAssign + CanonicalSerialize + UniformRand + Inv<Output = Option<Self>> + SubAssign + RefInto<[u64; 4]> + for<'a> From<&'a String> + VarInt + From<String> + From<i128> + From<i64> + From<i32> + From<i16> + From<bool> + TryFrom<BigInt, Error = ConversionError> {
    const MAX_SIGNED: Self;
    const ZERO: Self;
    const ONE: Self;
    const TWO: Self;
}
Expand description

A trait for the scalar field used in Proof of SQL.

Required Associated Constants§

source

const MAX_SIGNED: Self

The value (p - 1) / 2. This is “mid-point” of the field - the “six” on the clock. It is the largest signed value that can be represented in the field with the natural embedding.

source

const ZERO: Self

The 0 (additive identity) element of the field.

source

const ONE: Self

The 1 (multiplicative identity) element of the field.

source

const TWO: Self

1 + 1

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Scalar for DoryScalar

source§

const MAX_SIGNED: Self = _

source§

const ZERO: Self = _

source§

const ONE: Self = _

source§

const TWO: Self = _

source§

impl Scalar for Curve25519Scalar

source§

const MAX_SIGNED: Self = _

source§

const ZERO: Self = _

source§

const ONE: Self = _

source§

const TWO: Self = _