1 openssl/crypto/bn/bn_mul.c 1.36.2.1 -> 1.36.2.2
3 --- openssl/crypto/bn/bn_mul.c 2007/07/08 18:54:30 1.36.2.1
4 +++ openssl/crypto/bn/bn_mul.c 2007/11/03 20:09:29 1.36.2.2
6 * a[0]*b[0]+a[1]*b[1]+(a[0]-a[1])*(b[1]-b[0])
9 +/* dnX may not be positive, but n2/2+dnX has to be */
10 void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2,
11 int dna, int dnb, BN_ULONG *t)
17 - fprintf(stderr," bn_mul_recursive %d * %d\n",n2,n2);
18 + fprintf(stderr," bn_mul_recursive %d%+d * %d%+d\n",n2,dna,n2,dnb);
24 /* n+tn is the word length
25 * t needs to be n*4 is size, as does r */
26 +/* tnX may not be negative but less than n */
27 void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
28 int tna, int tnb, BN_ULONG *t)
34 - fprintf(stderr," bn_mul_part_recursive (%d+%d) * (%d+%d)\n",
36 + fprintf(stderr," bn_mul_part_recursive (%d%+d) * (%d%+d)\n",
45 - if (i <= tna && tna == tnb)
46 + /* these simplified conditions work
47 + * exclusively because difference
48 + * between tna and tnb is 1 or 0 */
49 + if (i < tna || i < tnb)
51 - bn_mul_recursive(&(r[n2]),
52 + bn_mul_part_recursive(&(r[n2]),
57 - else if (i < tna || i < tnb)
58 + else if (i == tna || i == tnb)
60 - bn_mul_part_recursive(&(r[n2]),
61 + bn_mul_recursive(&(r[n2]),