pub struct RistrettoBasepointTable(_);
Expand description
A precomputed table of multiples of a basepoint, used to accelerate scalar multiplication.
A precomputed table of multiples of the Ristretto basepoint is
available in the constants
module:
use curve25519_dalek::constants;
use curve25519_dalek::scalar::Scalar;
let a = Scalar::from(87329482u64);
let P = &a * &constants::RISTRETTO_BASEPOINT_TABLE;
Implementations§
source§impl RistrettoBasepointTable
impl RistrettoBasepointTable
sourcepub fn create(basepoint: &RistrettoPoint) -> RistrettoBasepointTable
pub fn create(basepoint: &RistrettoPoint) -> RistrettoBasepointTable
Create a precomputed table of multiples of the given basepoint
.
sourcepub fn basepoint(&self) -> RistrettoPoint
pub fn basepoint(&self) -> RistrettoPoint
Get the basepoint for this table as a RistrettoPoint
.
Trait Implementations§
source§impl Clone for RistrettoBasepointTable
impl Clone for RistrettoBasepointTable
source§fn clone(&self) -> RistrettoBasepointTable
fn clone(&self) -> RistrettoBasepointTable
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, 'b> Mul<&'a RistrettoBasepointTable> for &'b Scalar
impl<'a, 'b> Mul<&'a RistrettoBasepointTable> for &'b Scalar
§type Output = RistrettoPoint
type Output = RistrettoPoint
The resulting type after applying the
*
operator.source§fn mul(self, basepoint_table: &'a RistrettoBasepointTable) -> RistrettoPoint
fn mul(self, basepoint_table: &'a RistrettoBasepointTable) -> RistrettoPoint
Performs the
*
operation. Read moresource§impl<'a, 'b> Mul<&'b Scalar> for &'a RistrettoBasepointTable
impl<'a, 'b> Mul<&'b Scalar> for &'a RistrettoBasepointTable
§type Output = RistrettoPoint
type Output = RistrettoPoint
The resulting type after applying the
*
operator.