mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Add example to RistrettoBasepointTable
This commit is contained in:
parent
46048e451b
commit
c99bd62b25
1 changed files with 10 additions and 0 deletions
|
|
@ -832,6 +832,16 @@ pub fn multiscalar_mul<I, J>(scalars: I, points: J) -> RistrettoPoint
|
||||||
|
|
||||||
/// A precomputed table of multiples of a basepoint, used to accelerate
|
/// A precomputed table of multiples of a basepoint, used to accelerate
|
||||||
/// scalar multiplication.
|
/// 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_u64(87329482);
|
||||||
|
/// let P = &a * &constants::RISTRETTO_BASEPOINT_TABLE;
|
||||||
|
/// ```
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct RistrettoBasepointTable(pub(crate) EdwardsBasepointTable);
|
pub struct RistrettoBasepointTable(pub(crate) EdwardsBasepointTable);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue