Functions
inline fn cMov(fe: *Fe, a: Fe, c: u64) void
Conditonally replace a field element with
a
ifc
is positivefn cSwap2(a0: *Fe, b0: *Fe, a1: *Fe, b1: *Fe, c: u64) void
Conditionally swap two pairs of field elements if
c
is positivefn pow2523(a: Fe) Fe
Return a^((p-5)/8) = a^(2^252-3) Used to compute square roots since we have p=5…
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.
fn rejectNonCanonical(s: [32]u8, comptime ignore_extra_bit: bool) NonCanonicalError!void
Reject non-canonical encodings of an element, possibly ignoring the top bit
fn sqrt(x2: Fe) NotSquareError!Fe
Compute the square root of
x2
, returningerror.NotSquare
ifx2
was not a s…Compute the square root of
x2
, returningerror.NotSquare
ifx2
was not a square
Values
curve25519BasePoint | Fe | The Curve25519 base point |
edwards25519a | Fe | Edwards25519 A |
edwards25519a_32 | u32 | Edwards25519 A, as a single limb |
edwards25519d | Fe | Edwards25519 d = 370957059346694393431380835087545651895421138798432190163887855… |
edwards25519d2 | Fe | Edwards25519 2d |
edwards25519eonemsqd | Fe | Edwards25519 1-d^2 |
edwards25519sqdmone | Fe | Edwards25519 (d-1)^2 |
edwards25519sqrtadm1 | Fe | Edwards25519 sqrt(ad-1) with a = -1 (mod p) |
edwards25519sqrtam2 | Fe | Edwards25519 sqrt(A-2) |
edwards25519sqrtamd | Fe | Edwards25519 1/sqrt(a-d) |
one | Fe | 1 |
sqrtm1 | Fe | sqrt(-1) |
zero | Fe | 0 |