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 Scalar
s are done using 12 21-bit limbs.
However, in contrast to FieldElement
s, Scalar
s are stored in
memory as bytes, allowing easy access to the bits of the Scalar
when multiplying a point by a scalar. For efficient arithmetic
between two scalars, the UnpackedScalar
struct is stored as
limbs.
Structs
Scalar |
The |
UnpackedScalar |
The |