Module curve25519_dalek::scalar [] [src]

Arithmetic for scalar multiplication.

The Ed25519 basepoint P has prime order

l = 2252 + 27742317777372353535851937790883648493.

Thus a multiple aP of the basepoint (with a ∈ ℤ) depends only on the value of a (mod l), or equivalently, the image of a in the quotient ℤ/lℤ.

The Scalar struct represents an element in ℤ/lℤ.

Arithmetic operations on Scalars are done using 12 21-bit limbs. However, in contrast to FieldElements, Scalars are stored in memory as bytes, allowing easy access to the bits of the Scalar.

Structs

Scalar

The Scalar struct represents an element in ℤ/lℤ, where