Re: memory corruption after usin BN_mod_inverse

2008-01-31 Thread Martin Simmons
Hi, Yair Elharrar! For me it looks bad. :-/ Because, BN_sub doesn't handle this situation (r = b): 1) BN_sub call BN_uadd(r,a,b), but r = b, then 2) BN_sub change r-neg, but r = b, then 3) BN_sub call BN_expand(r), then 4) BN_sub call BN_ucmp(a,b), but b here is not that b that was

RE: memory corruption after usin BN_mod_inverse

2008-01-30 Thread Yair Elharrar
Sorry, I don't think that breaks any const rules. See explanation and example in ISO/IEC 14882 section 7.1.5.1. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, January 30, 2008 3:59 PM To: openssl-dev@openssl.org

Re: memory corruption after usin BN_mod_inverse

2008-01-30 Thread Евгений Ломовский
Hi, Yair Elharrar! Sorry, I don't think that breaks any const rules. See explanation and example in ISO/IEC 14882 section 7.1.5.1. First of all, OpenSSL was written in C, so ISO/IEC 14882 is not a subject to reffer to (it is the C++ standard). Let's see in ISO/IEC 9899 section 6.7.3: The

RE: memory corruption after usin BN_mod_inverse

2008-01-30 Thread Yair Elharrar
To: openssl-dev@openssl.org Subject: Re: memory corruption after usin BN_mod_inverse Hi, Yair Elharrar! Sorry, I don't think that breaks any const rules. See explanation and example in ISO/IEC 14882 section 7.1.5.1. First of all, OpenSSL was written in C, so ISO/IEC 14882 is not a subject

Re: memory corruption after usin BN_mod_inverse

2008-01-30 Thread Евгений Ломовский
Hi, Yair Elharrar! For me it looks bad. :-/ Because, BN_sub doesn't handle this situation (r = b): 1) BN_sub call BN_uadd(r,a,b), but r = b, then 2) BN_sub change r-neg, but r = b, then 3) BN_sub call BN_expand(r), then 4) BN_sub call BN_ucmp(a,b), but b here is not that b that was at the