From 4d524040bc81d2db46a5530ba10a98686ab1c3ca Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 22 Oct 2005 17:57:18 +0000 Subject: Change bn_mul_mont declaration and BN_MONT_CTX. Update CHANGES. --- crypto/bn/bn_asm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crypto/bn/bn_asm.c') diff --git a/crypto/bn/bn_asm.c b/crypto/bn/bn_asm.c index cd50b182b7..acb9937504 100644 --- a/crypto/bn/bn_asm.c +++ b/crypto/bn/bn_asm.c @@ -842,9 +842,9 @@ void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a) * versions. Assembler vs. assembler improvement coefficients can * [and are known to] differ and are to be documented elsewhere. */ -int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np,BN_ULONG n0, int num) +int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np,const BN_ULONG *n0p, int num) { - BN_ULONG c0,c1,ml,*tp; + BN_ULONG c0,c1,ml,*tp,n0; #ifdef mul64 BN_ULONG mh; #endif @@ -852,10 +852,12 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U int i=0,j; #if 0 /* template for platform-specific implementation */ - if (ap==bp) return bn_sqr_mont(rp,ap,np,n0,num); + if (ap==bp) return bn_sqr_mont(rp,ap,np,n0p,num); #endif vp = tp = alloca((num+2)*sizeof(BN_ULONG)); + n0 = *n0p; + tp[num] = bn_mul_words(tp,ap,num,bp[0]); tp[num+1] = 0; goto enter; -- cgit v1.2.3