cleaner name per Henry’s suggestion

This commit is contained in:
Oleg Andreev 2019-05-24 12:18:10 -07:00
parent ca2926ac89
commit 9836d6622c
3 changed files with 4 additions and 4 deletions

View file

@ -94,7 +94,7 @@ impl VartimeMultiscalarMul for Pippenger {
// (scanning the whole set per digit position).
let scalars = scalars
.into_iter()
.map(|s| s.borrow().to_pippenger_radix(w).0);
.map(|s| s.borrow().to_radix_2w(w).0);
let points = points
.into_iter()

View file

@ -52,7 +52,7 @@ impl VartimeMultiscalarMul for Pippenger {
// (scanning the whole collection per each digit position).
let scalars = scalars
.into_iter()
.map(|s| s.borrow().to_pippenger_radix(w).0);
.map(|s| s.borrow().to_radix_2w(w).0);
let points = points
.into_iter()

View file

@ -979,7 +979,7 @@ impl Scalar {
/// $$
/// with \\(-2\^w/2 \leq a_i < 2\^w/2\\) for \\(0 \leq i < (n-1)\\) and \\(-2\^w/2 \leq a_{n-1} \leq 2\^w/2\\).
///
pub(crate) fn to_pippenger_radix(&self, w: usize) -> ([i8; 43], usize) {
pub(crate) fn to_radix_2w(&self, w: usize) -> ([i8; 43], usize) {
debug_assert!(w >= 6);
debug_assert!(w <= 8);
@ -1519,7 +1519,7 @@ mod test {
// from the produced representation precisely.
for w in 6..9 {
for scalar in (2..100).map(|s| Scalar::from(s as u64).invert() ).chain(iter::once(-Scalar::one())) {
let (digits, digits_count) = scalar.to_pippenger_radix(w);
let (digits, digits_count) = scalar.to_radix_2w(w);
let radix = Scalar::from((1<<w) as u64);
let mut term = Scalar::one();