Module curve25519_dalek::field [] [src]

Field arithmetic for ℤ/(2²⁵⁵-19).

Based on Adam Langley's curve25519-donna and (Golang) ed25519 implementations.

Structs

FieldElement

FieldElement represents an element of the field GF(2255 - 19). An element t, entries t[0]...t[9], represents the integer t[0]+226 t[1]+251 t[2]+277 t[3]+2102 t[4]+...+2230 t[9]. Bounds on each t[i] vary depending on context.

Functions

load3

Convert an array of (at least) three bytes into an i64.

load4

Convert an array of (at least) four bytes into an i64.

Type Definitions

Limb

FieldElements are represented as an array of ten "Limbs", which are radix 25.5, that is, each Limb of a FieldElement alternates between being represented as a factor of 225 or 226 more than the last corresponding integer.