In message <[EMAIL PROTECTED]> on Mon, 02 Dec 2002 10:51:30 +0100, Andy 
Polyakov <[EMAIL PROTECTED]> said:

appro> > levitte> bn_div_words(0xFFFFC383,0x838B4B53,0x80000000)
appro> > 
appro> > Hmm, a call like that gave me an aruthmetic error on Linux...
appro> 
appro> According to bc 0xFFFFC383838B4B53 / 0x80000000 = 0x1FFFF8707. The
appro> result is 33 bits or in other words the operation *overflows*. According
appro> to IA-32 manual "overflow is indicated with the #DE (divide error)
appro> rather than with the CF flag" which is why it dumps the core. This
appro> behaviour does not constitute a bug as BN_div makes sure the condition
appro> is never met.

Yeah, and I discovered a small bug late last night, as well as the
fact that bn_div_words() is supposed to return FFFFFFFF on error (or
at least if the divisor is 0).

I'm slowly getting there, there's currently another problem going on,
and I think it might have to do with dropping the lowest bit of the
divisor when that one gets diveded by two (because of some quirks with
EDIV)...

-- 
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to