Trait curve25519_dalek::traits::BasepointTable

source ·
pub trait BasepointTable {
    type Point;

    // Required methods
    fn create(basepoint: &Self::Point) -> Self;
    fn basepoint(&self) -> Self::Point;
    fn mul_base(&self, scalar: &Scalar) -> Self::Point;

    // Provided method
    fn mul_base_clamped(&self, bytes: [u8; 32]) -> Self::Point { ... }
}
Expand description

A precomputed table of basepoints, for optimising scalar multiplications.

Required Associated Types§

source

type Point

The type of point contained within this table.

Required Methods§

source

fn create(basepoint: &Self::Point) -> Self

Generate a new precomputed basepoint table from the given basepoint.

source

fn basepoint(&self) -> Self::Point

Retrieve the original basepoint from this table.

source

fn mul_base(&self, scalar: &Scalar) -> Self::Point

Multiply a scalar by this precomputed basepoint table, in constant time.

Provided Methods§

source

fn mul_base_clamped(&self, bytes: [u8; 32]) -> Self::Point

Multiply clamp_integer(bytes) by this precomputed basepoint table, in constant time. For a description of clamping, see clamp_integer.

Object Safety§

This trait is not object safe.

Implementors§