mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Add additional benchmark for further comparison with ed25519-donna.
ed25519-donna includes a "curved25519_scalarmult_basepoint" [sic] function. See https://github.com/isislovecruft/dalek-benchmarks.
This commit is contained in:
parent
be06f5339b
commit
039533d349
1 changed files with 12 additions and 0 deletions
|
|
@ -646,4 +646,16 @@ mod bench {
|
|||
|
||||
b.iter(| | Keypair::generate::<Sha512>(&mut rng));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn underlying_scalar_mult_basepoint(b: &mut Bencher) {
|
||||
use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
|
||||
|
||||
let scalar: Scalar = Scalar([ 20, 130, 129, 196, 247, 182, 211, 102,
|
||||
11, 168, 169, 131, 159, 69, 126, 35,
|
||||
109, 193, 175, 54, 118, 234, 138, 81,
|
||||
60, 183, 80, 186, 92, 248, 132, 13, ]);
|
||||
|
||||
b.iter(| | &scalar * &ED25519_BASEPOINT_TABLE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue