From: Ulf M�ller <[EMAIL PROTECTED]>

ulf> That's all fine, but bn_cmp_part_words() operates on chunks of BN_ULONG,
ulf> not on BIGNUMs:
ulf> 
ulf> void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn,
ulf>                  ^^^^^^^^^
ulf>              int n, BN_ULONG *t)
ulf>         {
ulf> 
ulf>    // ...
ulf> 
ulf>         /* r=(a[0]-a[1])*(b[1]-b[0]) */
ulf>         c1=bn_cmp_part_words(a,&(a[n]),tn,n-tn);
ulf>         c2=bn_cmp_part_words(&(b[n]),b,tn,tn-n);
ulf>                                ^^^^

So?  Take a look at how it's called.  For now (I want to change that),
a and b are of the same size, n is the highest power of two closest
above half the size of those two arrays.  So, if a and b are 18 words
long, n will be 16 and tn will be 2.  So, the call that you're
pionting at will be equivalent to the following:

         bn_cmp_part_words({array or 2 words}, {array of 16 words},
                           2, -14)

Which expresses exactly what bn_cmp_part_words() is intended to get.

The whole purpose is to compare two array of different sizes as if
they were two arrays of the larger length with on of them being filled
with a lot of zeroes.

-- 
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]

Reply via email to