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 duplicate 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
Available on crate feature precomputed-tables only.
impl<'a, 'b> Mul<&'a RistrettoBasepointTable> for &'b Scalar
Available on crate feature
precomputed-tables only.Source§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
Available on crate feature precomputed-tables only.
impl<'a, 'b> Mul<&'b Scalar> for &'a RistrettoBasepointTable
Available on crate feature
precomputed-tables only.Source§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 UnsafeUnpin 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