pub trait MulBackend<C: PrimeCurveParams> {
// Provided methods
fn mul_by_generator(k: &Scalar<C>) -> ProjectivePoint<C> { ... }
fn mul_by_generator_vartime(k: &Scalar<C>) -> ProjectivePoint<C> { ... }
fn mul_by_generator_and_mul_add_vartime(
a: &Scalar<C>,
b_scalar: &Scalar<C>,
b_point: &ProjectivePoint<C>,
) -> ProjectivePoint<C> { ... }
}Expand description
Scalar multiplication backend.
Provided Methods§
Sourcefn mul_by_generator(k: &Scalar<C>) -> ProjectivePoint<C>
fn mul_by_generator(k: &Scalar<C>) -> ProjectivePoint<C>
Multiplication by the generator.
This is overridable to make it possible to plug in a basepoint table.
Sourcefn mul_by_generator_vartime(k: &Scalar<C>) -> ProjectivePoint<C>
fn mul_by_generator_vartime(k: &Scalar<C>) -> ProjectivePoint<C>
Variable-time multiplication by the generator.
This is overridable to make it possible to plug in a basepoint table.
Sourcefn mul_by_generator_and_mul_add_vartime(
a: &Scalar<C>,
b_scalar: &Scalar<C>,
b_point: &ProjectivePoint<C>,
) -> ProjectivePoint<C>
fn mul_by_generator_and_mul_add_vartime( a: &Scalar<C>, b_scalar: &Scalar<C>, b_point: &ProjectivePoint<C>, ) -> ProjectivePoint<C>
Multiply a by the generator of the prime-order subgroup, adding the result to the point
P multiplied by the scalar b, i.e. compute aG + bP.
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.