From 840e958ae523f4bb99cd3717423c981c4e7d2205 Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 9 Aug 2013 17:06:02 -0700 Subject: [PATCH] add ecc verify to benchmark --- ctaocrypt/benchmark/benchmark.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ctaocrypt/benchmark/benchmark.c b/ctaocrypt/benchmark/benchmark.c index dbc30c9ad..e16508d79 100644 --- a/ctaocrypt/benchmark/benchmark.c +++ b/ctaocrypt/benchmark/benchmark.c @@ -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);