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
sourceimpl 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
sourceimpl Clone for RistrettoBasepointTable
impl Clone for RistrettoBasepointTable
sourcefn clone(&self) -> RistrettoBasepointTable
fn clone(&self) -> RistrettoBasepointTable
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'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.
sourcefn mul(self, basepoint_table: &'a RistrettoBasepointTable) -> RistrettoPoint
fn mul(self, basepoint_table: &'a RistrettoBasepointTable) -> RistrettoPoint
Performs the *
operation. Read more
sourceimpl<'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.
sourcefn mul(self, scalar: &'b Scalar) -> RistrettoPoint
fn mul(self, scalar: &'b Scalar) -> RistrettoPoint
Performs the *
operation. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more