Further performance improvements to _ecmult_wnaf

- Initialize 'wnaf' to zeroes using memset
- Add new 'len' arg to speed up smaller scalars (mostly for endo=yes)
This commit is contained in:
Peter Dettman
2015-07-12 17:50:59 +10:00
parent 145cc6ea8f
commit 55399c23f7
3 changed files with 32 additions and 21 deletions

View File

@@ -229,7 +229,7 @@ void bench_ecmult_wnaf(void* arg) {
bench_inv_t *data = (bench_inv_t*)arg;
for (i = 0; i < 20000; i++) {
secp256k1_ecmult_wnaf(data->wnaf, &data->scalar_x, WINDOW_A);
secp256k1_ecmult_wnaf(data->wnaf, 256, &data->scalar_x, WINDOW_A);
secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y);
}
}