Skip to main content

MulByGeneratorVartime

Trait MulByGeneratorVartime 

Source
pub trait MulByGeneratorVartime: Group + for<'a> MulVartime<&'a Self::Scalar> {
    // Provided methods
    fn mul_by_generator_vartime(scalar: &Self::Scalar) -> Self { ... }
    fn mul_by_generator_and_mul_add_vartime(
        a: &Self::Scalar,
        b: &Self::Scalar,
        p: &Self,
    ) -> Self { ... }
}
Expand description

Variable-time multiplication by the generator of the curve group.

Security Warning

Variable-time operations should only be used on non-secret values, and may potentially leak secret values!

Provided Methods§

Source

fn mul_by_generator_vartime(scalar: &Self::Scalar) -> Self

Multiply by the generator of the prime-order subgroup.

Variable-time equivalent of Group::mul_by_generator.

Source

fn mul_by_generator_and_mul_add_vartime( a: &Self::Scalar, b: &Self::Scalar, p: &Self, ) -> Self

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.

This operation is the core of many signature verification algorithms.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§