pub struct RistrettoBasepointTable(/* private fields */);
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 Freeze for RistrettoBasepointTable
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)