Re: [openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-07-02 Thread Andy Polyakov via RT
Discovered this problem while trying to fix https://github.com/joyent/node/issues/7704. Attached is a fix for it. Trouble is that modified code might avoid crash, but it doesn't produce correct result either. [No, not even Adam's suggestion]. Actually bn_mul_mont is abused in bn_exp.c,

Re: [openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-07-02 Thread Fedor Indutny
Andy, I'd still pull Adam's changes, at least for consistency reasons. Other assembly files seems to be using signed comparison for the same kinds of operations. What do you think about it? Cheers, Fedor. On Wed, Jul 2, 2014 at 9:54 PM, Andy Polyakov via RT r...@openssl.org wrote:

Re: [openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-07-02 Thread Fedor Indutny via RT
Andy, I'd still pull Adam's changes, at least for consistency reasons. Other assembly files seems to be using signed comparison for the same kinds of operations. What do you think about it? Cheers, Fedor. On Wed, Jul 2, 2014 at 9:54 PM, Andy Polyakov via RT r...@openssl.org wrote:

Re: [openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-07-02 Thread Andy Polyakov via RT
I'd still pull Adam's changes, at least for consistency reasons. Other assembly files seems to be using signed comparison for the same kinds of operations. What do you think about it? I think it's appropriate to harmonize branches with interface. But it takes deal of concentration and

Re: [openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-07-02 Thread Fedor Indutny via RT
I'm totally willing to cooperate on this, and may have enough skills to do it. Do you think it could be possible for us to collaborate on this topic? Thank you, Fedor. On Wed, Jul 2, 2014 at 11:08 PM, Andy Polyakov via RT r...@openssl.org wrote: I'd still pull Adam's changes, at least for

Re: [openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-07-02 Thread Fedor Indutny
I'm totally willing to cooperate on this, and may have enough skills to do it. Do you think it could be possible for us to collaborate on this topic? Thank you, Fedor. On Wed, Jul 2, 2014 at 11:08 PM, Andy Polyakov via RT r...@openssl.org wrote: I'd still pull Adam's changes, at least for

Re: [openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-07-02 Thread Andy Polyakov via RT
I'm totally willing to cooperate on this, and may have enough skills to do it. Do you think it could be possible for us to collaborate on this topic? Sure! I'd appreciate it. Start by preparing patch harmonizing branches with interface. Still I can't promise swift review and reply, so please

[openssl.org #3397] Fwd: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-06-11 Thread Fedor Indutny via RT
...@indutny.com Date: Fri, 6 Jun 2014 14:33:10 -0700 Subject: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs Fix index overflow in bn_mul_mont and bn_mul_mont_gather5. - --- crypto/bn/asm/x86_64-mont.pl | 4 ++-- crypto/bn/asm/x86_64-mont5.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions

Re: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-06-09 Thread Fedor Indutny
Bump. On Fri, Jun 6, 2014 at 2:35 PM, Fedor Indutny fe...@indutny.com wrote: Hello everyone! Discovered this problem while trying to fix https://github.com/joyent/node/issues/7704. Attached is a fix for it. Cheers, Fedor.

[PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs

2014-06-06 Thread Fedor Indutny
...@indutny.com Date: Fri, 6 Jun 2014 14:33:10 -0700 Subject: [PATCH] x86_64 asm: fix bn_mul_mont on odd-len BNs Fix index overflow in bn_mul_mont and bn_mul_mont_gather5. - --- crypto/bn/asm/x86_64-mont.pl | 4 ++-- crypto/bn/asm/x86_64-mont5.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions