Skip to main content

Module field

Module field 

Source
Expand description

Field arithmetic modulo \(p = 2^{255} - 19\).

The curve25519_dalek::field module provides a type alias curve25519_dalek::field::FieldElement to a field element type defined in the backend module; either FieldElement51 or FieldElement2625.

Field operations defined in terms of machine operations, such as field multiplication or squaring, are defined in the backend implementation.

Field operations defined in terms of other field operations, such as field inversion or square roots, are defined here.

Functionsยง

expand_msg_xmd ๐Ÿ”’
Hashes the concatenation of the elements of msg with domain separator equal to the concatenation of domain_sep. The output is an outlen-length slice into buf. Follows https://www.rfc-editor.org/rfc/rfc9380.html#section-5.3.1

Type Aliasesยง

FieldElement ๐Ÿ”’
A FieldElement represents an element of the field \( \mathbb Z / (2^{255} - 19)\).