pub trait GroupOperations {
    type Point;
    type Scalar;

    fn add(
        left_point: &Self::Point,
        right_point: &Self::Point
    ) -> Option<Self::Point>; fn subtract(
        left_point: &Self::Point,
        right_point: &Self::Point
    ) -> Option<Self::Point>; fn multiply(
        scalar: &Self::Scalar,
        point: &Self::Point
    ) -> Option<Self::Point>; }

Required Associated Types

Required Methods

Adds two curve points: P_0 + P_1.

Subtracts two curve points: P_0 - P_1.

NOTE: Altneratively, one can consider replacing this with a negate function that maps a curve point P -> -P. Then subtraction can be computed by combining negate and add syscalls. However, subtract is a much more widely used function than negate.

Multiplies a scalar S with a curve point P: S*P

Implementors