From: Richard Levitte - VMS Whacker <[EMAIL PROTECTED]>
levitte> > if (al == j)
levitte> > {
levitte> > if (bn_wexpand(a,k*2) == NULL) goto err;
levitte> > if (bn_wexpand(tmp,k*2) == NULL) goto err;
levitte> > bn_sqr_recursive(rr->d,tmp_bn->d,al,tmp->d);
levitte>
levitte>
levitte> The conclusion is that it should be possible to remove the expansion
levitte> of a completely in the code above.
It was sane thinking, although I believe the above code to be overly
careful. Unless I still misunderstand something about bn_sqr_recursive(),
The only thing it requires from the length of a->d is that it's even.
The code above and the log for revision 1.7 indicates that
bn_sqr_recursive() requires a length that is a power of two. Now,
inte teh above code, j is a power of two, unconditionally (because
the value was calculated from '1<<(j-1)', that's why), so it's already
checked that a->d has the correct length to be useful according to the
criteria. Expanding it to twice that size is still, as far as I can
see, completely needless since bn_sqr_recursive() won't look further
than the end of the input data.
I'd still like someone to review my thoughts as a sanity check.
--
Richard Levitte \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47
Redakteur@Stacken \ SWEDEN \ or +46-709-50 36 10
Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, Celo Communications: http://www.celocom.com/
Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
Re: Hmm... (discoveries about BIGNUM code)
Richard Levitte - VMS Whacker Sun, 12 Nov 2000 15:08:00 -0800
- Re: Hmm... (discoveries about BIGNUM code) Richard Levitte - VMS Whacker
- Re: Hmm... (discoveries about BIGNUM co... Richard Levitte - VMS Whacker
- Re: Hmm... (discoveries about BIGNUM co... Richard Levitte - VMS Whacker
- Re: Hmm... (discoveries about BIGNUM co... Geoff Thorpe
- Re: Hmm... (discoveries about BIGNUM co... Richard Levitte - VMS Whacker
- Re: Hmm... (discoveries about BIGNUM co... Richard Levitte - VMS Whacker
- Re: Hmm... (discoveries about BIGNU... Ben Laurie
- Re: Hmm... (discoveries about BIGNUM co... Geoff Thorpe
- Re: Hmm... (discoveries about BIGNUM co... robert bonomi
- Re: Hmm... (discoveries about BIGNUM co... Bodo Moeller
- Re: Hmm... (discoveries about BIGNUM co... Geoff Thorpe
- Re: Hmm... (discoveries about BIGNU... Richard Levitte - VMS Whacker
