add ecc verify to benchmark

This commit is contained in:
toddouska 2013-08-09 17:06:02 -07:00
parent 16db0c234e
commit 840e958ae5

View File

@ -985,6 +985,19 @@ void bench_eccKeyAgree(void)
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);
ecc_free(&genKey);
}