[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: heimdal-discuss@sics.se*Subject*: handling of negative integers*From*: David Margrave <david.margrave@CyberSafe.COM>*Date*: Mon, 01 Feb 1999 04:37:22 +0000*Sender*: owner-heimdal-discuss@sics.se

Hello, I've noticed that heimdal's ASN.1 code, which is quite clever by the way, doesn't seem to handle encoding/decoding of negative integers correctly. 1 is encoded correctly as 0x01, but -1 is encoded as 0xFFFFFFFF, where it should actually be encoded as 0xFF in the minimum number of octets in two's complement representation (unless I'm mistaken) This isn't really an issue unless you have to start dealing with implementations that use negative values. Microsoft NT5 beta for example, uses negative integers for some of its non-standard encryption types, i.e. -128 is RC4_HMAC. Dave

**Follow-Ups**:**Re: handling of negative integers***From:*Assar Westerlund <assar@sics.se>

- Prev by Date:
**Re: HAVE_GETHOSTBYNAME2 does not imply HAVE_IPV6! (patches)** - Next by Date:
**Re: handling of negative integers** - Prev by thread:
**Re: HAVE_GETHOSTBYNAME2 does not imply HAVE_IPV6! (patches)** - Next by thread:
**Re: handling of negative integers** - Index(es):