From: Ulf M�ller <[EMAIL PROTECTED]> Subject: Re: cvs commit: openssl/crypto/bn bn.h bn_rand.c bntest.c Date: Sat, 2 Dec 2000 09:31:19 -0500 Message-ID: <[EMAIL PROTECTED]> ulf> On Sat, Dec 02, 2000 at 09:14:49PM +0100, Richard Levitte - VMS Whacker wrote: ulf> ulf> > The whole purpose is to compare two array of different sizes as if ulf> > they were two arrays of the larger length with on of them being filled ulf> > with a lot of zeroes. ulf> ulf> Yes, but you were claiming that somehow the other array should not be ulf> filled with a lot of zeroes. Yes? OK, say that there is a call bn_cmp_part_words(a, b, 2, -14). This means that a is 2 words long and b is 16 words long. The condition of normalisation is that the last word (a[1] and b[15]) will be non-zero (that's what bn_fix_top does). Under those conditions, a is a smaller number than b, and that can be determined by the difference in size alone. The way I expressed things is because bn_cmp_part_words() is derived from bn_cmp_words() which requires that the two arrays are of the same size. This in turn required that one or both of the arrays was expanded to meet that condition, and thus was zero-filled. bn_cmp_part_words() is built solely to avoid that kind of requirement, and can therefore assume that the arrays are from normalised BIGNUMs and work accordingly (and faster). *If* they get arrays with the wrong size according to the rules of normalisation, that is most probably an error in another part of the BIGNUM library... I'll take another look at the whole thing, just to make sure. -- 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: cvs commit: openssl/crypto/bn bn.h bn_rand.c bntest.c
Richard Levitte - VMS Whacker Sat, 02 Dec 2000 13:05:10 -0800
- Re: cvs commit: openssl/crypto/bn bn.h bn_ra... Richard Levitte - VMS Whacker
- Re: cvs commit: openssl/crypto/bn bn.h ... Ulf M�ller
- Re: cvs commit: openssl/crypto/bn bn.h ... Richard Levitte - VMS Whacker
- Re: cvs commit: openssl/crypto/bn bn.h ... Ulf M�ller
- Richard Levitte - VMS Whacker
