std.crypto.ecc.Curve25519.scalar
The entries of std.crypto.ecc.Curve25519.scalar in the Zig reference. This page has 24 cards.
pub fn add(a: CompressedScalar, b: CompressedScalar) CompressedScalar
Return a+b (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn clamp(s: *CompressedScalar) void
Perform the X25519 "clamping" operation.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
A compressed scalar.
- Kind
- type
- Module
std.crypto.ecc.Curve25519.scalar
The scalar field order.
- Kind
- constant
- Module
std.crypto.ecc.Curve25519.scalar
pub fn mul(a: CompressedScalar, b: CompressedScalar) CompressedScalar
Return a*b (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn mul8(s: CompressedScalar) CompressedScalar
Return a*8 (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn mulAdd(a: CompressedScalar, b: CompressedScalar, c: CompressedScalar) CompressedScalar
Return a*b+c (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn neg(s: CompressedScalar) CompressedScalar
Return -s (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn random(io: std.Io) CompressedScalar
Return a random scalar < L.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn reduce(s: CompressedScalar) CompressedScalar
Reduce a scalar to the field size.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn reduce64(s: [64]u8) CompressedScalar
Reduce a 64-bytes scalar to the field size.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn rejectNonCanonical(s: CompressedScalar) NonCanonicalError!void
Reject a scalar whose encoding is not canonical.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
A scalar in unpacked representation.
- Kind
- struct
- Module
std.crypto.ecc.Curve25519.scalar
pub fn add(x: Scalar, y: Scalar) Scalar
Return x+y (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn fromBytes(bytes: CompressedScalar) Scalar
Unpack a 32-byte representation of a scalar.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn fromBytes64(bytes: [64]u8) Scalar
Unpack a 64-byte representation of a scalar.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn invert(x: Scalar) Scalar
Return the inverse of a scalar (mod L), or 0 if x=0.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn isZero(n: Scalar) bool
Return true if the scalar is zero.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn mul(x: Scalar, y: Scalar) Scalar
Return x*r (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn random(io: std.Io) Scalar
Return a random scalar < L.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn sq(x: Scalar) Scalar
Return x^2 (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn toBytes(expanded: *const Scalar) CompressedScalar
Pack a scalar into bytes.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
pub fn sub(a: CompressedScalar, b: CompressedScalar) CompressedScalar
Return (a-b) (mod L).
- Kind
- function
- Module
std.crypto.ecc.Curve25519.scalar
- Kind
- constant
- Module
std.crypto.ecc.Curve25519.scalar