diff options
author | Andy Polyakov <appro@openssl.org> | 2012-03-29 18:25:38 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-03-29 18:25:38 +0000 |
commit | 23a05fa0c146b99731b0e83f3928066536c4b1e0 (patch) | |
tree | 6e25772674e66047dfc50582ae0081b002eaa089 | |
parent | 482a7d80cfa87f3506cfba3aacf3e18e842605bf (diff) |
modes/gcm128.c: fix self-test.
-rw-r--r-- | crypto/modes/gcm128.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c index f77aa972ba..025c7f8897 100644 --- a/crypto/modes/gcm128.c +++ b/crypto/modes/gcm128.c @@ -1746,11 +1746,16 @@ int main() ctr_t/(double)sizeof(buf), (gcm_t-ctr_t)/(double)sizeof(buf)); #ifdef GHASH - GHASH(&ctx,buf.c,sizeof(buf)); + { + void (*gcm_ghash_p)(u64 Xi[2],const u128 Htable[16], + const u8 *inp,size_t len) = ctx.ghash; + + GHASH((&ctx),buf.c,sizeof(buf)); start = OPENSSL_rdtsc(); - for (i=0;i<100;++i) GHASH(&ctx,buf.c,sizeof(buf)); + for (i=0;i<100;++i) GHASH((&ctx),buf.c,sizeof(buf)); gcm_t = OPENSSL_rdtsc() - start; printf("%.2f\n",gcm_t/(double)sizeof(buf)/(double)i); + } #endif } #endif |