projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
482a7d8
)
modes/gcm128.c: fix self-test.
author
Andy Polyakov
<appro@openssl.org>
Thu, 29 Mar 2012 18:25:38 +0000
(18:25 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Thu, 29 Mar 2012 18:25:38 +0000
(18:25 +0000)
crypto/modes/gcm128.c
patch
|
blob
|
history
diff --git
a/crypto/modes/gcm128.c
b/crypto/modes/gcm128.c
index f77aa972bab47601774600edfbb73f9e9d892479..025c7f889750914ff97385368a00fba5740c4c5d 100644
(file)
--- 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
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();
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);
gcm_t = OPENSSL_rdtsc() - start;
printf("%.2f\n",gcm_t/(double)sizeof(buf)/(double)i);
+ }
#endif
}
#endif
#endif
}
#endif