Function curve25519_dalek::curve::multiscalar_mult [] [src]

pub fn multiscalar_mult<'a, 'b, I, J>(scalars: I, points: J) -> ExtendedPoint where
    I: IntoIterator<Item = &'a Scalar>,
    J: IntoIterator<Item = &'b ExtendedPoint>, 

Given a vector of (possibly secret) scalars and a vector of (possibly secret) points, compute c_1 P_1 + ... + c_n P_n.

This function has the same behaviour as vartime::multiscalar_mult but is constant-time.

Input

A vector of Scalars and a vector of ExtendedPoints. It is an error to call this function with two vectors of different lengths.