std.crypto.ecc.Edwards25519
The entries of std.crypto.ecc.Edwards25519 in the Zig reference. This page has 23 cards.
pub fn add(p: Edwards25519, q: Edwards25519) Edwards25519
Add two Edwards25519 points.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
The edwards25519 base point.
- Kind
- constant
- Module
std.crypto.ecc.Edwards25519
pub fn clampedMul(p: Edwards25519, s: [32]u8) (IdentityElementError || WeakPublicKeyError)!Edwards25519
Multiply an Edwards25519 point by a scalar after "clamping" it.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn clearCofactor(p: Edwards25519) Edwards25519
Multiply a point by the cofactor.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn dbl(p: Edwards25519) Edwards25519
Double an Edwards25519 point.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn elligator2(r: Fe) struct
Elligator2 map - Returns Montgomery affine coordinates.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
Length in bytes of a compressed representation of a point.
- Kind
- constant
- Module
std.crypto.ecc.Edwards25519
pub fn fromBytes(s: [encoded_length]u8) EncodingError!Edwards25519
Decode an Edwards25519 point from its compressed (Y+sign) coordinates.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn fromHash(h: [64]u8) Edwards25519
Map a 64-bit hash into an Edwards25519 point.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn fromString(comptime random_oracle: bool, ctx: []const u8, s: []const u8) Edwards25519
Hash a context `ctx` and a string `s` into an Edwards25519 point This function implements the edwards25519_XMD:SHA-512_ELL2_RO_ and edwards25519_XMD:SHA-512_ELL2_NU_ methods from the "Hashing to Elliptic Curves" standard document.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn fromUniform(r: [32]u8) Edwards25519
Map a 32 bit uniform bit string into an edwards25519 point.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
- Kind
- constant
- Module
std.crypto.ecc.Edwards25519
pub fn mul(p: Edwards25519, s: [32]u8) (IdentityElementError || WeakPublicKeyError)!Edwards25519
Multiply an Edwards25519 point by a scalar without clamping it.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn mulDoubleBasePublic(p1: Edwards25519, s1: [32]u8, p2: Edwards25519, s2: [32]u8) WeakPublicKeyError!Edwards25519
Double-base multiplication of public parameters - Compute (p1*s1)+(p2*s2) *IN VARIABLE TIME* This can be used for signature verification.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn mulMulti(comptime count: usize, ps: [count]Edwards25519, ss: [count][32]u8) (IdentityElementError || WeakPublicKeyError)!Edwards25519
Multiscalar multiplication *IN VARIABLE TIME* for public data Computes ps0*ss0 + ps1*ss1 + ps2*ss2... faster than doing many of these operations individually.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn mulPublic(p: Edwards25519, s: [32]u8) (IdentityElementError || WeakPublicKeyError)!Edwards25519
Multiply an Edwards25519 point by a *PUBLIC* scalar *IN VARIABLE TIME* This can be used for signature verification.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn neg(p: Edwards25519) Edwards25519
Flip the sign of the X coordinate.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn rejectIdentity(p: Edwards25519) IdentityElementError!void
Reject the neutral element.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn rejectLowOrder(p: Edwards25519) WeakPublicKeyError!void
Check that the point does not generate a low-order group.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn rejectNonCanonical(s: [32]u8) NonCanonicalError!void
Check that the encoding of a point is canonical.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn rejectUnexpectedSubgroup(p: Edwards25519) (WeakPublicKeyError || UnexpectedSubgroupError)!void
Reject a point if it is not in the prime order subgroup generated by the standard base point.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn sub(p: Edwards25519, q: Edwards25519) Edwards25519
Subtract two Edwards25519 points.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519
pub fn toBytes(p: Edwards25519) [encoded_length]u8
Encode an Edwards25519 point.
- Kind
- function
- Module
std.crypto.ecc.Edwards25519