Bodo Moeller wrote:
>
> On Wed, Nov 29, 2000 at 02:33:29AM +0100, [EMAIL PROTECTED] wrote:
>
> > Log:
> > First alternative primitive type. BIGNUM and CBIGNUM. These convert
> > directly between an ASN1 INTEGER and a BIGNUM. CBIGNUM clears the
> > BIGNUM when it is freed (for sensitive information).
> >
> > These types will interpret an negative INTEGER as positive because
> > this is a common encoding error. Negative INTEGERs are rarely used
> > legitimately for large integers.
>
> No bug compatibility flag for this one? After all, interpreting
> negative INTEGERs as positive is incorrect behaviour and may actually
> lead to problems in some cases; also interoperability testing is more
> meaningful if errors are not tolerated by default.
>
It wont lead to problems in the places where it will be used which is
things like RSA public and private keys.
Handling the negative case is messy at best and probably best placed in
the BIGNUM library itself where its easier to handle, something like
BN_bin2bn() and friends that works properly with ASN1 INTEGER content
encoding.
We could I suppose have some kind of ASN1_STRICT compilation flag that
did reject invalid encodings.
In the case of ASN1 there are so many broken encodings you'd end up
rejecting probably more than 50% of all stuff in current use: some of
which would be from previous versions of OpenSSL. If OpenSSL rejected
everything by default that was an invalid encoding or usage then I
suspect the mailing lists would rapidly approach melt down.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]