std.crypto.ecc.Curve25519.Fe.abs
pub fn abs(a: Fe) Fe
Return the absolute value of a field element.
- Kind
- function
- Module
std.crypto.ecc.Curve25519.Fe
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.crypto.ecc.Curve25519.Fe in the Zig reference. This page has 34 cards.
pub fn abs(a: Fe) Fe
Return the absolute value of a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn add(a: Fe, b: Fe) Fe
Add a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cMov(fe: *Fe, a: Fe, c: u64) void
Conditonally replace a field element with `a` if `c` is positive.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn cSwap2(a0: *Fe, b0: *Fe, a1: *Fe, b1: *Fe, c: u64) void
Conditionally swap two pairs of field elements if `c` is positive.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The Curve25519 base point.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 A.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 A, as a single limb.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 d = 37095705934669439343138083508754565189542113879843219016388785533085940283555.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 2d.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 1-d^2.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 (d-1)^2.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 sqrt(ad-1) with a = -1 (mod p).
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 sqrt(A-2).
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Edwards25519 1/sqrt(a-d).
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn equivalent(a: Fe, b: Fe) bool
Return true if both field elements are equivalent.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromBytes(s: [32]u8) Fe
Unpack a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromBytes64(s: [64]u8) Fe
Map a 64 bytes big endian string into a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn invert(a: Fe) Fe
Return the inverse of a field element, or 0 if a=0.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isNegative(a: Fe) bool
Return true if a field element is negative.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isSquare(a: Fe) bool
Return true if the field element is a square.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn isZero(fe: Fe) bool
Return true if the field element is zero.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mul(a: Fe, b: Fe) callconv(bloaty_inline) Fe
Multiply two field elements.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn mul32(a: Fe, comptime n: u32) Fe
Multiply a field element with a small (32-bit) integer.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn neg(a: Fe) Fe
Negate a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn pow2523(a: Fe) Fe
Return a^((p-5)/8) = a^(2^252-3) Used to compute square roots since we have p=5 (mod 8); see Cohen and Frey.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn rejectNonCanonical(s: [32]u8, comptime ignore_extra_bit: bool) NonCanonicalError!void
Reject non-canonical encodings of an element, possibly ignoring the top bit.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sq(a: Fe) Fe
Square a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sq2(a: Fe) Fe
Square and double a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sqrt(x2: Fe) NotSquareError!Fe
Compute the square root of `x2`, returning `error.NotSquare` if `x2` was not a square.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sub(a: Fe, b: Fe) Fe
Subtract a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn toBytes(fe: Fe) [32]u8
Pack a field element.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.crypto.ecc.Curve25519.FeSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.