#[repr(transparent)]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::RISTRETTO_BASEPOINT_TABLE;
use curve25519_dalek::scalar::Scalar;
let a = Scalar::from(87329482u64);
let P = &a * 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.Auto Trait Implementations§
impl RefUnwindSafe for RistrettoBasepointTable
impl Send for RistrettoBasepointTable
impl Sync for RistrettoBasepointTable
impl Unpin for RistrettoBasepointTable
impl UnwindSafe for RistrettoBasepointTable
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more