Group operations over Edwards25519.

Fields

p: Curve,

Types

Namespaces

Functions

inline fn add(p: Ristretto255, q: Ristretto255) Ristretto255

Add two Ristretto255 elements.

inline fn dbl(p: Ristretto255) Ristretto255

Double a Ristretto255 element.

fn equivalent(p: Ristretto255, q: Ristretto255) bool

Return true if two Ristretto255 elements are equivalent

fn fromBytes(s: [encoded_length]u8) NonCanonicalError || EncodingError!Ristretto255

Decode a Ristretto255 representative.

fn fromUniform(h: [64]u8) Ristretto255

Map a 64-bit string into a Ristretto255 group element

inline fn mul(p: Ristretto255, s: [encoded_length]u8) IdentityElementError || WeakPublicKeyError!Ristretto255

Multiply a Ristretto255 element with a scalar. Return error.WeakPublicKey if th…

Multiply a Ristretto255 element with a scalar. Return error.WeakPublicKey if the resulting element is the identity element.

inline fn rejectIdentity(p: Ristretto255) IdentityElementError!void

Reject the neutral element.

fn toBytes(e: Ristretto255) [encoded_length]u8

Encode to a Ristretto255 representative.

Values

basePoint
Ristretto255

The base point (Ristretto is a curve in desguise).

encoded_length
usize

Length in byte of an encoded element.