Skip to content

Commit

Permalink
fix timing demo
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaeckel committed Nov 25, 2019
1 parent e3d1fa9 commit 60ae54f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demos/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ static void time_encmacs_(unsigned long MAC_SIZE)
ulong64 t1, t2;
unsigned long x, z;
int err, cipher_idx;
symmetric_key skey;
symmetric_ECB skey;

fprintf(stderr, "\nENC+MAC Timings (zero byte AAD, 16 byte IV, cycles/byte on %luKB blocks):\n", MAC_SIZE);

Expand Down Expand Up @@ -1239,7 +1239,7 @@ static void time_encmacs_(unsigned long MAC_SIZE)
}
fprintf(stderr, "CCM (no-precomp) \t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024));

cipher_descriptor[cipher_idx].setup(key, 16, 0, &skey);
ecb_start(cipher_idx, key, 16, 0, &skey);
t2 = -1;
for (x = 0; x < 10000; x++) {
t_start();
Expand All @@ -1253,7 +1253,7 @@ static void time_encmacs_(unsigned long MAC_SIZE)
if (t1 < t2) t2 = t1;
}
fprintf(stderr, "CCM (precomp) \t\t%9"PRI64"u\n", t2/(ulong64)(MAC_SIZE*1024));
cipher_descriptor[cipher_idx].done(&skey);
ecb_done(&skey);
#endif

#ifdef LTC_GCM_MODE
Expand Down

0 comments on commit 60ae54f

Please sign in to comment.