Skip to content

Commit

Permalink
Rename double_scalar_mult_basepoint to double_scalar_mul_basepoint fo…
Browse files Browse the repository at this point in the history
…r consistency
  • Loading branch information
hdevalence committed Mar 22, 2018
1 parent 296cd16 commit 70eee52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/backend/avx2/edwards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ pub mod vartime {
/// with x positive).
///
/// This is the same as calling the iterator-based function, but slightly faster.
pub fn double_scalar_mult_basepoint(a: &Scalar,
pub fn double_scalar_mul_basepoint(a: &Scalar,
A: &edwards::EdwardsPoint,
b: &Scalar) -> edwards::EdwardsPoint {
let a_naf = a.non_adjacent_form();
Expand Down Expand Up @@ -1019,7 +1019,7 @@ mod bench {
let s2 = Scalar::random(&mut csprng);
let P = &s1 * &constants::ED25519_BASEPOINT_TABLE;

b.iter(|| vartime::double_scalar_mult_basepoint(&s2, &P, &s1) );
b.iter(|| vartime::double_scalar_mul_basepoint(&s2, &P, &s1) );
}

#[bench]
Expand Down
12 changes: 6 additions & 6 deletions src/edwards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ pub mod vartime {
/// \\(aA+bB\\), where \\(B\\) is the Ed25519 basepoint (i.e., \\(B = (x,4/5)\\)
/// with x positive).
#[cfg(feature="precomputed_tables")]
pub fn double_scalar_mult_basepoint(
pub fn double_scalar_mul_basepoint(
a: &Scalar,
A: &EdwardsPoint,
b: &Scalar,
Expand All @@ -1003,7 +1003,7 @@ pub mod vartime {
#[cfg(all(feature="nightly", all(feature="avx2_backend", target_feature="avx2")))] {
use backend::avx2::edwards as edwards_avx2;

edwards_avx2::vartime::double_scalar_mult_basepoint(a, A, b)
edwards_avx2::vartime::double_scalar_mul_basepoint(a, A, b)
}
// Otherwise, proceed as normal:
#[cfg(not(all(feature="nightly", all(feature="avx2_backend", target_feature="avx2"))))] {
Expand Down Expand Up @@ -1356,9 +1356,9 @@ mod test {
/// Test double_scalar_mult_vartime vs ed25519.py
#[test]
#[cfg(feature="precomputed_tables")]
fn double_scalar_mult_basepoint_vs_ed25519py() {
fn double_scalar_mul_basepoint_vs_ed25519py() {
let A = A_TIMES_BASEPOINT.decompress().unwrap();
let result = vartime::double_scalar_mult_basepoint(&A_SCALAR, &A, &B_SCALAR);
let result = vartime::double_scalar_mul_basepoint(&A_SCALAR, &A, &B_SCALAR);
assert_eq!(result.compress(), DOUBLE_SCALAR_MULT_RESULT);
}

Expand Down Expand Up @@ -1535,9 +1535,9 @@ mod bench {
use super::{Bencher, OsRng};

#[bench]
fn bench_double_scalar_mult_basepoint(b: &mut Bencher) {
fn bench_double_scalar_mul_basepoint(b: &mut Bencher) {
let A = A_TIMES_BASEPOINT.decompress().unwrap();
b.iter(|| vartime::double_scalar_mult_basepoint(&A_SCALAR, &A, &B_SCALAR));
b.iter(|| vartime::double_scalar_mul_basepoint(&A_SCALAR, &A, &B_SCALAR));
}

#[bench]
Expand Down

0 comments on commit 70eee52

Please sign in to comment.