Struct curve25519_dalek::backend::vector::scalar_mul::straus::spec_avx2::Straus
source · pub struct Straus {}
Available on
curve25519_dalek_backend="simd"
and crate feature alloc
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§
source§impl MultiscalarMul for Straus
impl MultiscalarMul for Straus
§type Point = EdwardsPoint
type Point = EdwardsPoint
The type of point being multiplied, e.g.,
RistrettoPoint
.source§fn multiscalar_mul<I, J>(scalars: I, points: J) -> EdwardsPointwhere
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<EdwardsPoint>,
fn multiscalar_mul<I, J>(scalars: I, points: J) -> EdwardsPointwhere 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
source§impl VartimeMultiscalarMul for Straus
impl VartimeMultiscalarMul for Straus
§type Point = EdwardsPoint
type Point = EdwardsPoint
The type of point being multiplied, e.g.,
RistrettoPoint
.source§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 moresource§fn vartime_multiscalar_mul<I, J>(scalars: I, points: J) -> Self::Pointwhere
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::Pointwhere 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 Send for Straus
impl Sync for Straus
impl Unpin for Straus
impl UnwindSafe for Straus
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