pub trait MultiExp {
type CurvePoint: Curve;
// Required methods
fn new<X>(gs: &[X]) -> Self
where X: Borrow<Self::CurvePoint>;
fn multiexp<X>(&self, exps: &[X]) -> Self::CurvePoint
where X: Borrow<<Self::CurvePoint as Curve>::Scalar>;
}Expand description
An abstraction over a multiexp algorithm.
Required Associated Types§
type CurvePoint: Curve
Required Methods§
Sourcefn new<X>(gs: &[X]) -> Selfwhere
X: Borrow<Self::CurvePoint>,
fn new<X>(gs: &[X]) -> Selfwhere
X: Borrow<Self::CurvePoint>,
Create new algorithm instance by providing initial points. Can be used to precompute a lookup table.
Sourcefn multiexp<X>(&self, exps: &[X]) -> Self::CurvePoint
fn multiexp<X>(&self, exps: &[X]) -> Self::CurvePoint
Multiexp algorithm that uses points provided at the instantiation step and scalars provided as a parameter.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl MultiExp for VartimeRistrettoPrecomputation
An instance of multiexp algorithm from the Dalek library that uses
precomputed table of points. Precomputing is slow, so it makes sense to use
this implementation when one wants to share the precomputed table with many
subsequent computations. For our current use cases it seems not relevant.
impl MultiExp for VartimeRistrettoPrecomputation
An instance of multiexp algorithm from the Dalek library that uses precomputed table of points. Precomputing is slow, so it makes sense to use this implementation when one wants to share the precomputed table with many subsequent computations. For our current use cases it seems not relevant.