Function curve25519_dalek::edwards::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 an iterator of (possibly secret) scalars and an iterator of (possibly secret) points, compute $$ Q = c_1 P_1 + \cdots + c_n P_n. $$

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

Input

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