Function curve25519_dalek::ristretto::multiscalar_mult [] [src]

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

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

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