pub struct VartimeRistrettoPrecomputation(_);
Expand description
Precomputation for variable-time multiscalar multiplication with RistrettoPoint
s.
Trait Implementations
sourceimpl VartimePrecomputedMultiscalarMul for VartimeRistrettoPrecomputation
impl VartimePrecomputedMultiscalarMul for VartimeRistrettoPrecomputation
type Point = RistrettoPoint
type Point = RistrettoPoint
The type of point to be multiplied, e.g., RistrettoPoint
.
sourcefn new<I>(static_points: I) -> Self where
I: IntoIterator,
I::Item: Borrow<Self::Point>,
fn new<I>(static_points: I) -> Self where
I: IntoIterator,
I::Item: Borrow<Self::Point>,
Given the static points \( B_i \), perform precomputation and return the precomputation data. Read more
sourcefn optional_mixed_multiscalar_mul<I, J, K>(
&self,
static_scalars: I,
dynamic_scalars: J,
dynamic_points: K
) -> Option<Self::Point> where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Scalar>,
K: IntoIterator<Item = Option<Self::Point>>,
fn optional_mixed_multiscalar_mul<I, J, K>(
&self,
static_scalars: I,
dynamic_scalars: J,
dynamic_points: K
) -> Option<Self::Point> where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Scalar>,
K: IntoIterator<Item = Option<Self::Point>>,
Given static_scalars
, an iterator of public scalars
\(b_i\), dynamic_scalars
, an iterator of public scalars
\(a_i\), and dynamic_points
, an iterator of points
\(A_i\), compute
$$
Q = a_1 A_1 + \cdots + a_n A_n + b_1 B_1 + \cdots + b_m B_m,
$$
where the \(B_j\) are the points that were supplied to new
. Read more
sourcefn vartime_multiscalar_mul<I>(&self, static_scalars: I) -> Self::Point where
I: IntoIterator,
I::Item: Borrow<Scalar>,
fn vartime_multiscalar_mul<I>(&self, static_scalars: I) -> Self::Point where
I: IntoIterator,
I::Item: Borrow<Scalar>,
Given static_scalars
, an iterator of public scalars
\(b_i\), compute
$$
Q = b_1 B_1 + \cdots + b_m B_m,
$$
where the \(B_j\) are the points that were supplied to new
. Read more
sourcefn vartime_mixed_multiscalar_mul<I, J, K>(
&self,
static_scalars: I,
dynamic_scalars: J,
dynamic_points: K
) -> Self::Point where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Scalar>,
K: IntoIterator,
K::Item: Borrow<Self::Point>,
fn vartime_mixed_multiscalar_mul<I, J, K>(
&self,
static_scalars: I,
dynamic_scalars: J,
dynamic_points: K
) -> Self::Point where
I: IntoIterator,
I::Item: Borrow<Scalar>,
J: IntoIterator,
J::Item: Borrow<Scalar>,
K: IntoIterator,
K::Item: Borrow<Self::Point>,
Given static_scalars
, an iterator of public scalars
\(b_i\), dynamic_scalars
, an iterator of public scalars
\(a_i\), and dynamic_points
, an iterator of points
\(A_i\), compute
$$
Q = a_1 A_1 + \cdots + a_n A_n + b_1 B_1 + \cdots + b_m B_m,
$$
where the \(B_j\) are the points that were supplied to new
. Read more
Auto Trait Implementations
impl RefUnwindSafe for VartimeRistrettoPrecomputation
impl Send for VartimeRistrettoPrecomputation
impl Sync for VartimeRistrettoPrecomputation
impl Unpin for VartimeRistrettoPrecomputation
impl UnwindSafe for VartimeRistrettoPrecomputation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more