curve25519_dalek::traits

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§