add ecc verify to benchmark

This commit is contained in:
toddouska 2013-08-09 17:06:02 -07:00
parent 16db0c234e
commit 840e958ae5
1 changed files with 14 additions and 1 deletions

View File

@ -982,7 +982,20 @@ void bench_eccKeyAgree(void)
total = current_time(0) - start;
each = total / agreeTimes; /* per second */
milliEach = each * 1000; /* millisconds */
printf("EC-DSA sign time %6.2f milliseconds, avg over %d"
printf("EC-DSA sign time %6.2f milliseconds, avg over %d"
" iterations\n", milliEach, agreeTimes);
start = current_time(1);
for(i = 0; i < agreeTimes; i++) {
int verify = 0;
ecc_verify_hash(sig, x, digest, sizeof(digest), &verify, &genKey);
}
total = current_time(0) - start;
each = total / agreeTimes; /* per second */
milliEach = each * 1000; /* millisconds */
printf("EC-DSA verify time %6.2f milliseconds, avg over %d"
" iterations\n", milliEach, agreeTimes);
ecc_free(&genKey2);