Module curve25519_dalek::constants [] [src]

This module contains various constants, such as the Ristretto and Ed25519 basepoints.

Most of the constants are given with LONG_DESCRIPTIVE_UPPER_CASE_NAMES, but they can be brought into scope using a let binding:

use curve25519_dalek::constants;
use curve25519_dalek::traits::IsIdentity;

let B = &constants::RISTRETTO_BASEPOINT_TABLE;
let l = &constants::BASEPOINT_ORDER;
 
let A = l * B;
assert!(A.is_identity());

Constants

BASEPOINT_ORDER

BASEPOINT_ORDER is the order of base point, i.e. l = 2^252 + 27742317777372353535851937790883648493, in little-endian bytes.

BASEPOINT_ORDER_MINUS_1

BASEPOINT_ORDER_MINUS_1 is the order of base point minus one, i.e. l-1, in little-endian bytes.

BASEPOINT_ORDER_MINUS_2

BASEPOINT_ORDER_MINUS_2 is the order of base point minus two, i.e. l-2, in little-endian bytes.

BASE_CMPRSSD

Basepoint has y = 4/5.

BASE_COMPRESSED_MONTGOMERY

The X25519 basepoint, in compressed Montgomery form.

ED25519_BASEPOINT_POINT

The Ed25519 basepoint has y = 4/5. This is called _POINT to distinguish it from _TABLE, which should be used for scalar multiplication (it's much faster).

ED25519_BASEPOINT_TABLE

Table containing precomputed multiples of the basepoint B = (x,4/5).

EIGHT_TORSION

The 8-torsion subgroup Ɛ[8].

RISTRETTO_BASEPOINT_POINT

The Ed25519 basepoint, as a RistrettoPoint. This is called _POINT to distinguish it from _TABLE, which provides fast scalar multiplication.

RISTRETTO_BASEPOINT_TABLE

The Ed25519 basepoint, as a RistrettoPoint