summaryrefslogtreecommitdiffstats
path: root/crypto/bn/expspeed.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-11-26 16:42:38 +0000
committerBodo Möller <bodo@openssl.org>2000-11-26 16:42:38 +0000
commit78a0c1f18d5a1f0e51b7467ef7b153b8c29fbb03 (patch)
tree631b1606ee2f90a5fcaf2f141461113d30c7f5a8 /crypto/bn/expspeed.c
parent6cc5e19d4710d7d3355bf6fa05c3d7269e48428f (diff)
modular arithmetics
"make update"
Diffstat (limited to 'crypto/bn/expspeed.c')
-rw-r--r--crypto/bn/expspeed.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/crypto/bn/expspeed.c b/crypto/bn/expspeed.c
index 2044ab9bff..e9c1fee7ab 100644
--- a/crypto/bn/expspeed.c
+++ b/crypto/bn/expspeed.c
@@ -187,9 +187,6 @@ void do_mul_exp(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *c, BN_CTX *ctx)
int i,k;
double tm;
long num;
- BN_MONT_CTX m;
-
- memset(&m,0,sizeof(m));
num=BASENUM;
for (i=0; i<NUM_SIZES; i++)
@@ -200,11 +197,9 @@ void do_mul_exp(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *c, BN_CTX *ctx)
BN_mod(a,a,c,ctx);
BN_mod(b,b,c,ctx);
- BN_MONT_CTX_set(&m,c,ctx);
-
Time_F(START);
for (k=0; k<num; k++)
- BN_mod_exp_mont(r,a,b,c,ctx,&m);
+ BN_mod_exp(r,a,b,c,ctx);
tm=Time_F(STOP);
printf("mul %4d ^ %4d %% %d -> %8.3fms %5.1f\n",sizes[i],sizes[i],sizes[i],tm*1000.0/num,tm*mul_c[i]/num);
num/=7;