Fix wrong feature for benchmarks

This commit is contained in:
Henry de Valence 2017-11-19 14:53:21 -08:00
parent 81ecef89ee
commit 841e0d5b64

View file

@ -1054,7 +1054,7 @@ mod test {
/// Test precomputed basepoint mult /// Test precomputed basepoint mult
#[test] #[test]
#[cfg(feature="basepoint_table_creation")] #[cfg(feature="precomputed_tables")]
fn test_precomputed_basepoint_mult() { fn test_precomputed_basepoint_mult() {
let table = EdwardsBasepointTable::create(&constants::ED25519_BASEPOINT_POINT); let table = EdwardsBasepointTable::create(&constants::ED25519_BASEPOINT_POINT);
let aB_1 = &constants::ED25519_BASEPOINT_TABLE * &A_SCALAR; let aB_1 = &constants::ED25519_BASEPOINT_TABLE * &A_SCALAR;
@ -1325,14 +1325,14 @@ mod bench {
} }
#[bench] #[bench]
#[cfg(feature="basepoint_table_creation")] #[cfg(feature="precomputed_tables")]
fn create_basepoint_table(b: &mut Bencher) { fn create_basepoint_table(b: &mut Bencher) {
let aB = &constants::ED25519_BASEPOINT_TABLE * &A_SCALAR; let aB = &constants::ED25519_BASEPOINT_TABLE * &A_SCALAR;
b.iter(|| EdwardsBasepointTable::create(&aB)); b.iter(|| EdwardsBasepointTable::create(&aB));
} }
#[bench] #[bench]
#[cfg(feature="basepoint_table_creation")] #[cfg(feature="precomputed_tables")]
fn ten_fold_scalar_mult(b: &mut Bencher) { fn ten_fold_scalar_mult(b: &mut Bencher) {
let mut csprng: OsRng = OsRng::new().unwrap(); let mut csprng: OsRng = OsRng::new().unwrap();
// Create 10 random scalars // Create 10 random scalars
@ -1356,7 +1356,7 @@ mod bench {
} }
#[bench] #[bench]
#[cfg(feature="basepoint_table_creation")] #[cfg(feature="precomputed_tables")]
fn ten_fold_scalar_mult(b: &mut Bencher) { fn ten_fold_scalar_mult(b: &mut Bencher) {
let mut csprng: OsRng = OsRng::new().unwrap(); let mut csprng: OsRng = OsRng::new().unwrap();
// Create 10 random scalars // Create 10 random scalars