diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/bn/old | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) | |
download | openssl-6b691a5c85ddc4e407e32781841fee5c029506cd.zip openssl-6b691a5c85ddc4e407e32781841fee5c029506cd.tar.gz openssl-6b691a5c85ddc4e407e32781841fee5c029506cd.tar.bz2 |
Change functions to ANSI C.
Diffstat (limited to 'crypto/bn/old')
-rw-r--r-- | crypto/bn/old/b_sqr.c | 10 | ||||
-rw-r--r-- | crypto/bn/old/bn_high.c | 4 | ||||
-rw-r--r-- | crypto/bn/old/bn_ka.c | 29 | ||||
-rw-r--r-- | crypto/bn/old/bn_low.c | 13 | ||||
-rw-r--r-- | crypto/bn/old/bn_m.c | 7 | ||||
-rw-r--r-- | crypto/bn/old/bn_wmul.c | 14 |
6 files changed, 20 insertions, 57 deletions
diff --git a/crypto/bn/old/b_sqr.c b/crypto/bn/old/b_sqr.c index e1a61b8..715cb1c 100644 --- a/crypto/bn/old/b_sqr.c +++ b/crypto/bn/old/b_sqr.c @@ -64,10 +64,7 @@ static int bn_mm(BIGNUM *m,BIGNUM *A,BIGNUM *B, BIGNUM *sk,BN_CTX *ctx); /* r must be different to a and b */ /* int BN_mmul(r, a, b) */ -int BN_mul(r, a, b) -BIGNUM *r; -BIGNUM *a; -BIGNUM *b; +int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b) { BN_ULONG *ap,*bp,*rp; BIGNUM *sk; @@ -132,10 +129,7 @@ printf("BN_mul(%d,%d)\n",a->top,b->top); #define blbh (sk[1]) /* r must be different to a and b */ -int bn_mm(m, A, B, sk,ctx) -BIGNUM *m,*A,*B; -BIGNUM *sk; -BN_CTX *ctx; +int bn_mm(BIGNUM *m, BIGNUM *A, BIGNUM *B, BIGNUM *sk, BN_CTX *ctx) { int n,num,sqr=0; int an,bn; diff --git a/crypto/bn/old/bn_high.c b/crypto/bn/old/bn_high.c index 90268fb..763bcb6 100644 --- a/crypto/bn/old/bn_high.c +++ b/crypto/bn/old/bn_high.c @@ -15,9 +15,7 @@ int BN_mul_high(BIGNUM *r,BIGNUM *a,BIGNUM *b,BIGNUM *low, int words); #undef t1 #undef t2 -int BN_mul_high(r,a,b,low,words) -BIGNUM *r,*a,*b,*low; -int words; +int BN_mul_high(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *low, int words) { int w2,borrow=0,full=0; BIGNUM t1,t2,t3,h,ah,al,bh,bl,m,s0,s1; diff --git a/crypto/bn/old/bn_ka.c b/crypto/bn/old/bn_ka.c index b49a52a..378c94d 100644 --- a/crypto/bn/old/bn_ka.c +++ b/crypto/bn/old/bn_ka.c @@ -13,10 +13,8 @@ * a[0]*b[0]+a[1]*b[1]+(a[0]-a[1])*(b[1]-b[0]) * a[1]*b[1] */ -void bn_mul_recursive(r,a,b,n2,t) -BN_ULONG *r,*a,*b; -int n2; -BN_ULONG *t; +void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, + BN_ULONG *t) { int n=n2/2; int neg,zero,c1,c2; @@ -145,10 +143,8 @@ printf(" bn_mul_recursive %d * %d\n",n2,n2); /* n+tn is the word length * t needs to be n*4 is size, as does r */ -void bn_mul_part_recursive(r,a,b,tn,n,t) -BN_ULONG *r,*a,*b; -int tn,n; -BN_ULONG *t; +void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn, + int n, BN_ULONG *t) { int n2=n*2,i,j; int c1; @@ -265,10 +261,7 @@ printf(" bn_mul_part_recursive %d * %d\n",tn+n,tn+n); * a[0]*b[0]+a[1]*b[1]+(a[0]-a[1])*(b[1]-b[0]) * a[1]*b[1] */ -void bn_sqr_recursive(r,a,n2,t) -BN_ULONG *r,*a; -int n2; -BN_ULONG *t; +void bn_sqr_recursive(BN_ULONG *r, BN_ULONG *a, int n2, BN_ULONG *t) { int n=n2/2; int zero,c1; @@ -367,10 +360,8 @@ printf(" bn_sqr_recursive %d * %d\n",n2,n2); /* a and b must be the same size, which is n2. * r needs to be n2 words and t needs to be n2*2 */ -void bn_mul_low_recursive(r,a,b,n2,t) -BN_ULONG *r,*a,*b; -int n2; -BN_ULONG *t; +void bn_mul_low_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, + BN_ULONG *t) { int n=n2/2; @@ -400,10 +391,8 @@ printf(" bn_mul_low_recursive %d * %d\n",n2,n2); * l is the low words of the output. * t needs to be n2*3 */ -void bn_mul_high(r,a,b,l,n2,t) -BN_ULONG *r,*a,*b,*l; -int n2; -BN_ULONG *t; +void bn_mul_high(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, BN_ULONG *l, int n2, + BN_ULONG *t) { int j,i,n,c1,c2; int neg,oneg,zero; diff --git a/crypto/bn/old/bn_low.c b/crypto/bn/old/bn_low.c index 217c8c2..cbc4067 100644 --- a/crypto/bn/old/bn_low.c +++ b/crypto/bn/old/bn_low.c @@ -65,11 +65,7 @@ static int bn_mm_low(BIGNUM *m,BIGNUM *A,BIGNUM *B, int num, int BN_mul_low(BIGNUM *r, BIGNUM *a, BIGNUM *b,int words); /* r must be different to a and b */ -int BN_mul_low(r, a, b, num) -BIGNUM *r; -BIGNUM *a; -BIGNUM *b; -int num; +int BN_mul_low(BIGNUM *r, BIGNUM *a, BIGNUM *b, int num) { BN_ULONG *ap,*bp,*rp; BIGNUM *sk; @@ -142,11 +138,8 @@ printf("BN_mul_low(%d,%d,%d)\n",a->top,b->top,num); #define t2 (sk[1]) /* r must be different to a and b */ -int bn_mm_low(m, A, B, num, sk,ctx) -BIGNUM *m,*A,*B; -int num; -BIGNUM *sk; -BN_CTX *ctx; +int bn_mm_low(BIGNUM *m, BIGNUM *A, BIGNUM *B, int num, BIGNUM *sk, + BN_CTX *ctx) { int n; /* ,sqr=0; */ int an,bn; diff --git a/crypto/bn/old/bn_m.c b/crypto/bn/old/bn_m.c index 1cf51e8..522beb0 100644 --- a/crypto/bn/old/bn_m.c +++ b/crypto/bn/old/bn_m.c @@ -63,8 +63,7 @@ #define limit_bits 5 /* 2^5, or 32 words */ #define limit_num (1<<limit_bits) -int BN_m(r,a,b) -BIGNUM *r,*a,*b; +int BN_m(BIGNUM *r, BIGNUM *a, BIGNUM *b) { BIGNUM *sk; int i,n; @@ -82,9 +81,7 @@ BIGNUM *r,*a,*b; #define blbh (sk[1]) /* r must be different to a and b */ -int BN_mm(m, A, B, sk) -BIGNUM *m,*A,*B; -BIGNUM *sk; +int BN_mm(BIGNUM *m, BIGNUM *A, BIGNUM *B, BIGNUM *sk) { int i,num,anum,bnum; int an,bn; diff --git a/crypto/bn/old/bn_wmul.c b/crypto/bn/old/bn_wmul.c index e3ce107..a467b2f 100644 --- a/crypto/bn/old/bn_wmul.c +++ b/crypto/bn/old/bn_wmul.c @@ -5,9 +5,7 @@ int bn_mull(BIGNUM *r,BIGNUM *a,BIGNUM *b, BN_CTX *ctx); -int bn_mull(r,a,b,ctx) -BIGNUM *r,*a,*b; -BN_CTX *ctx; +int bn_mull(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) { int top,i,j,k,al,bl; BIGNUM *t; @@ -114,11 +112,7 @@ end: } #endif -void bn_mul_normal(r,a,na,b,nb) -BN_ULONG *r,*a; -int na; -BN_ULONG *b; -int nb; +void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb) { BN_ULONG *rr; @@ -155,9 +149,7 @@ printf(" bn_mul_normal %d * %d\n",na,nb); } #if 1 -void bn_mul_low_normal(r,a,b,n) -BN_ULONG *r,*a,*b; -int n; +void bn_mul_low_normal(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) { #ifdef BN_COUNT printf(" bn_mul_low_normal %d * %d\n",n,n); |