A scalar in unpacked representation

Fields

limbs: Limbs = undefined,

Functions

fn add(x: Scalar, y: Scalar) Scalar

Return x+y (mod L)

fn fromBytes(bytes: CompressedScalar) Scalar

Unpack a 32-byte representation of a scalar

fn fromBytes64(bytes: [64]u8) Scalar

Unpack a 64-byte representation of a scalar

fn invert(x: Scalar) Scalar

Return the inverse of a scalar (mod L), or 0 if x=0.

fn isZero(n: Scalar) bool

Return true if the scalar is zero

fn mul(x: Scalar, y: Scalar) Scalar

Return x*r (mod L)

fn random() Scalar

Return a random scalar < L.

fn sq(x: Scalar) Scalar

Return x^2 (mod L)

fn toBytes(expanded: *const Scalar) CompressedScalar

Pack a scalar into bytes