Functions
fn add(a: CompressedScalar, b: CompressedScalar, endian: std.builtin.Endian) NonCanonicalError!CompressedScalar
Return a+b (mod L)
fn mul(a: CompressedScalar, b: CompressedScalar, endian: std.builtin.Endian) NonCanonicalError!CompressedScalar
Return a*b (mod L)
fn mulAdd(a: CompressedScalar, b: CompressedScalar, c: CompressedScalar, endian: std.builtin.Endian) NonCanonicalError!CompressedScalar
Return a*b+c (mod L)
fn neg(s: CompressedScalar, endian: std.builtin.Endian) NonCanonicalError!CompressedScalar
Return -s (mod L)
fn reduce48(s: [48]u8, endian: std.builtin.Endian) CompressedScalar
Reduce a 48-bytes scalar to the field size.
fn reduce64(s: [64]u8, endian: std.builtin.Endian) CompressedScalar
Reduce a 64-bytes scalar to the field size.
fn rejectNonCanonical(s: CompressedScalar, endian: std.builtin.Endian) NonCanonicalError!void
Reject a scalar whose encoding is not canonical.
fn sub(a: CompressedScalar, b: CompressedScalar, endian: std.builtin.Endian) NonCanonicalError!CompressedScalar
Return (a-b) (mod L)
Values
encoded_length | comptime_int | Number of bytes required to encode a scalar. |
field_order | undefined | The scalar field order. |