Skip to content

Commit 6e39ae5

Browse files
committed
Fix timing and output
1 parent 791eee9 commit 6e39ae5

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ref/sign.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ int crypto_sign_signature(uint8_t *sig,
306306
clock_gettime(CLOCK_MONOTONIC, &end);
307307
double t = (end.tv_sec - start.tv_sec) + (end.tv_nsec - start.tv_nsec) / 1e9;
308308
g_time.sign += t;
309-
g_time.all += t;
310309

311310
return 0;
312311
}
@@ -467,7 +466,6 @@ int crypto_sign_verify(const uint8_t *sig,
467466
clock_gettime(CLOCK_MONOTONIC, &end);
468467
double t = (end.tv_sec - start.tv_sec) + (end.tv_nsec - start.tv_nsec) / 1e9;
469468
g_time.verify += t;
470-
g_time.all += t;
471469

472470
return valid;
473471
}

ref/test/test_dilithium.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int main(void)
7070
printf("Average KeyGen time: %.6fs (%.2f ms)\n", t.keygen / NTESTS, (t.keygen / NTESTS) * 1000);
7171
printf("Average Signing time: %.6fs (%.2f ms)\n", t.sign / NTESTS, (t.sign / NTESTS) * 1000);
7272
printf("Average Verification time: %.6fs (%.2f ms)\n", t.verify / NTESTS, (t.verify / NTESTS) * 1000);
73-
printf("Average sum time (3 stages): %.6fs (%.2f ms)\n", t.temp / NTESTS, (t.temp / NTESTS) * 1000);
73+
//printf("Average sum time (3 stages): %.6fs (%.2f ms)\n", t.temp / NTESTS, (t.temp / NTESTS) * 1000);
7474
printf("Average all time (NIST compliance): %.6fs (%.2f ms)\n", t.all / NTESTS, (t.all / NTESTS) * 1000);
7575
printf("Public key bytes = %d\n", CRYPTO_PUBLICKEYBYTES);
7676
printf("Secret key bytes = %d\n", CRYPTO_SECRETKEYBYTES);

0 commit comments

Comments
 (0)