summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_mul.c
diff options
context:
space:
mode:
authordjm <>2011-11-03 02:34:33 +0000
committerdjm <>2011-11-03 02:34:33 +0000
commitfc7396568e61a510b9336d6c220aaa889c03060f (patch)
treea8fc08e33aecdd21cb07aa47c8a3a9db715f2ef3 /src/lib/libcrypto/bn/bn_mul.c
parent1e8701dd2507fadf6d232d93eb4299a8b79c66d5 (diff)
downloadopenbsd-fc7396568e61a510b9336d6c220aaa889c03060f.tar.gz
openbsd-fc7396568e61a510b9336d6c220aaa889c03060f.tar.bz2
openbsd-fc7396568e61a510b9336d6c220aaa889c03060f.zip
openssl-1.0.0e: resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mul.c')
-rw-r--r--src/lib/libcrypto/bn/bn_mul.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bn/bn_mul.c b/src/lib/libcrypto/bn/bn_mul.c
index a0e9ec3b46..12e5be80eb 100644
--- a/src/lib/libcrypto/bn/bn_mul.c
+++ b/src/lib/libcrypto/bn/bn_mul.c
@@ -551,7 +551,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
551 int tna, int tnb, BN_ULONG *t) 551 int tna, int tnb, BN_ULONG *t)
552 { 552 {
553 int i,j,n2=n*2; 553 int i,j,n2=n*2;
554 int c1,c2,neg,zero; 554 int c1,c2,neg;
555 BN_ULONG ln,lo,*p; 555 BN_ULONG ln,lo,*p;
556 556
557# ifdef BN_COUNT 557# ifdef BN_COUNT
@@ -567,7 +567,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
567 /* r=(a[0]-a[1])*(b[1]-b[0]) */ 567 /* r=(a[0]-a[1])*(b[1]-b[0]) */
568 c1=bn_cmp_part_words(a,&(a[n]),tna,n-tna); 568 c1=bn_cmp_part_words(a,&(a[n]),tna,n-tna);
569 c2=bn_cmp_part_words(&(b[n]),b,tnb,tnb-n); 569 c2=bn_cmp_part_words(&(b[n]),b,tnb,tnb-n);
570 zero=neg=0; 570 neg=0;
571 switch (c1*3+c2) 571 switch (c1*3+c2)
572 { 572 {
573 case -4: 573 case -4:
@@ -575,7 +575,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
575 bn_sub_part_words(&(t[n]),b, &(b[n]),tnb,n-tnb); /* - */ 575 bn_sub_part_words(&(t[n]),b, &(b[n]),tnb,n-tnb); /* - */
576 break; 576 break;
577 case -3: 577 case -3:
578 zero=1;
579 /* break; */ 578 /* break; */
580 case -2: 579 case -2:
581 bn_sub_part_words(t, &(a[n]),a, tna,tna-n); /* - */ 580 bn_sub_part_words(t, &(a[n]),a, tna,tna-n); /* - */
@@ -585,7 +584,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
585 case -1: 584 case -1:
586 case 0: 585 case 0:
587 case 1: 586 case 1:
588 zero=1;
589 /* break; */ 587 /* break; */
590 case 2: 588 case 2:
591 bn_sub_part_words(t, a, &(a[n]),tna,n-tna); /* + */ 589 bn_sub_part_words(t, a, &(a[n]),tna,n-tna); /* + */
@@ -593,7 +591,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
593 neg=1; 591 neg=1;
594 break; 592 break;
595 case 3: 593 case 3:
596 zero=1;
597 /* break; */ 594 /* break; */
598 case 4: 595 case 4:
599 bn_sub_part_words(t, a, &(a[n]),tna,n-tna); 596 bn_sub_part_words(t, a, &(a[n]),tna,n-tna);
@@ -1012,7 +1009,6 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
1012 { 1009 {
1013 if (i >= -1 && i <= 1) 1010 if (i >= -1 && i <= 1)
1014 { 1011 {
1015 int sav_j =0;
1016 /* Find out the power of two lower or equal 1012 /* Find out the power of two lower or equal
1017 to the longest of the two numbers */ 1013 to the longest of the two numbers */
1018 if (i >= 0) 1014 if (i >= 0)
@@ -1023,7 +1019,6 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
1023 { 1019 {
1024 j = BN_num_bits_word((BN_ULONG)bl); 1020 j = BN_num_bits_word((BN_ULONG)bl);
1025 } 1021 }
1026 sav_j = j;
1027 j = 1<<(j-1); 1022 j = 1<<(j-1);
1028 assert(j <= al || j <= bl); 1023 assert(j <= al || j <= bl);
1029 k = j+j; 1024 k = j+j;