diff options
author | Ben Laurie <ben@openssl.org> | 1999-06-04 22:23:10 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-06-04 22:23:10 +0000 |
commit | 84c15db551ce1d167b901a3bde2b21880b084384 (patch) | |
tree | 77daf2efeb616ef657009c821046a6bd756e0c54 /crypto/bn/bn_exp.c | |
parent | ca570cfdbcaf35ba7e2554fd18eda8cfab2176e4 (diff) |
Some constification and stacks that slipped through the cracks (how?).
Diffstat (limited to 'crypto/bn/bn_exp.c')
-rw-r--r-- | crypto/bn/bn_exp.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c index 9833037384..2df1614ada 100644 --- a/crypto/bn/bn_exp.c +++ b/crypto/bn/bn_exp.c @@ -63,7 +63,7 @@ #define TABLE_SIZE 16 /* slow but works */ -int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, BIGNUM *m, BN_CTX *ctx) +int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx) { BIGNUM *t; int r=0; @@ -154,7 +154,8 @@ err: return(ret); } -int BN_mod_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, BN_CTX *ctx) +int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, + BN_CTX *ctx) { int ret; @@ -183,7 +184,8 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, BN_CTX *ctx) } /* #ifdef RECP_MUL_MOD */ -int BN_mod_exp_recp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, BN_CTX *ctx) +int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx) { int i,j,bits,ret=0,wstart,wend,window,wvalue; int start=1,ts=0; @@ -296,12 +298,13 @@ err: /* #endif */ /* #ifdef MONT_MUL_MOD */ -int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, BIGNUM *p, BIGNUM *m, BN_CTX *ctx, - BN_MONT_CTX *in_mont) +int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) { int i,j,bits,ret=0,wstart,wend,window,wvalue; int start=1,ts=0; - BIGNUM *d,*aa,*r; + BIGNUM *d,*r; + BIGNUM *aa; BIGNUM val[TABLE_SIZE]; BN_MONT_CTX *mont=NULL; |