Struct curve25519_dalek::backend::vector::scalar_mul::straus::Straus [−][src]
pub struct Straus {}
simd_backend
and (target features avx2
or avx512ifma
) only.Expand description
Multiscalar multiplication using interleaved window / Straus’
method. See the Straus
struct in the serial backend for more
details.
This exists as a seperate implementation from that one because the AVX2 code uses different curve models (it does not pass between multiple models during scalar mul), and it has to convert the point representation on the fly.
Trait Implementations
type Point = EdwardsPoint
type Point = EdwardsPoint
The type of point being multiplied, e.g., RistrettoPoint
.
fn multiscalar_mul<I, J>(scalars: I, points: J) -> EdwardsPoint where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<EdwardsPoint>,
fn multiscalar_mul<I, J>(scalars: I, points: J) -> EdwardsPoint where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<EdwardsPoint>,
Given an iterator of (possibly secret) scalars and an iterator of public points, compute $$ Q = c_1 P_1 + \cdots + c_n P_n. $$ Read more
type Point = EdwardsPoint
type Point = EdwardsPoint
The type of point being multiplied, e.g., RistrettoPoint
.
fn optional_multiscalar_mul<I, J>(scalars: I, points: J) -> Option<EdwardsPoint> where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator<Item = Option<EdwardsPoint>>,
fn optional_multiscalar_mul<I, J>(scalars: I, points: J) -> Option<EdwardsPoint> where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator<Item = Option<EdwardsPoint>>,
Given an iterator of public scalars and an iterator of
Option
s of points, compute either Some(Q)
, where
$$
Q = c_1 P_1 + \cdots + c_n P_n,
$$
if all points were Some(P_i)
, or else return None
. Read more
fn vartime_multiscalar_mul<I, J>(scalars: I, points: J) -> Self::Point where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Self::Point>,
Self::Point: Clone,
fn vartime_multiscalar_mul<I, J>(scalars: I, points: J) -> Self::Point where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Self::Point>,
Self::Point: Clone,
Given an iterator of public scalars and an iterator of public points, compute $$ Q = c_1 P_1 + \cdots + c_n P_n, $$ using variable-time operations. Read more
Auto Trait Implementations
impl RefUnwindSafe for Straus
impl UnwindSafe for Straus
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast(self) -> U
pub fn cast(self) -> U
Numeric cast from self
to T
.
pub fn from_bits(t: T) -> T
pub fn from_bits(t: T) -> T
Safe lossless bitwise transmute from T
to Self
.
pub fn from_cast(t: T) -> T
pub fn from_cast(t: T) -> T
Numeric cast from T
to Self
.
pub fn into_bits(self) -> U
pub fn into_bits(self) -> U
Safe lossless bitwise transmute from self
to T
.