projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8e660a
)
bn_mul_recursive doesn't handle all cases correctly, which results in
author
Andy Polyakov
<appro@openssl.org>
Sun, 8 Jul 2007 18:54:30 +0000
(18:54 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Sun, 8 Jul 2007 18:54:30 +0000
(18:54 +0000)
BN_mul failures at certain key-length mixes [from HEAD].
PR: 1427
crypto/bn/bn_mul.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_mul.c
b/crypto/bn/bn_mul.c
index aec1eafc65fbb25a8fbeda30f8f6025129a3c716..312b467645e8bb20d13375ca3ceebc04bc5ed963 100644
(file)
--- a/
crypto/bn/bn_mul.c
+++ b/
crypto/bn/bn_mul.c
@@
-655,16
+655,16
@@
void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
for (;;)
{
i/=2;
- if (i <
tna && i <
tnb)
+ if (i <
= tna && tna ==
tnb)
{
- bn_mul_
part_
recursive(&(r[n2]),
+ bn_mul_recursive(&(r[n2]),
&(a[n]),&(b[n]),
i,tna-i,tnb-i,p);
break;
}
- else if (i <
= tna && i <=
tnb)
+ else if (i <
tna || i <
tnb)
{
- bn_mul_recursive(&(r[n2]),
+ bn_mul_
part_
recursive(&(r[n2]),
&(a[n]),&(b[n]),
i,tna-i,tnb-i,p);
break;