[comp.protocols.iso] ASN.1/BER encoding of subidentifiers

andrewf@syacus.acus.oz (Andrew Friedman) (04/09/90)

People in the aus news distribution will have seen this before:

I was arguing with the boss over the encoding of subidentifiers in
object identifiers (ISO 8825 Para 20). The encoding of the 
example in the text:

(2 100 3)

with the result of:

0603FF3503 (hex)

seems to disagree with the text for that section.

The problem is the encoding of the first subidentifer (180, formed by combining
the first two object identifiers viz. 180 = 2 * 40 + 100 -- imagine ISO trying
to save a byte at this late stage).

If you look at the BER above, the first subidentifer is encoded as FF35H.
This seems to be the result of 7FH added with 35H (ignore the first bit
of each octet -- the more data bit),

but the text says nothing about adding octets it says 'groups of bits are
concatenated'.
In my book this means you take 180 = B4H = 10110100 (binary)
and pasting in the more data bits in the correct positions and zero filling
on the left we get:

10000001 0 0110100 
       -   -------         with the original bits marked


equals

8134H

hence (2 100 3) should be encoded

0603813403H

So which is right, example or text? Where does one find the correction?

Thanks.

collin@hpindda.HP.COM (Collin Park) (04/11/90)

> [background and correct explanation deleted]
> 
> hence (2 100 3) should be encoded
> 
> 0603813403H

You are correct.  The example is wrong.

> 
> So which is right, example or text? Where does one find the correction?

When I saw your posting I could hardly believe that this did not get
corrected in the final printing.  I discussed this with the former
Presentation International Rapporteur over 2 years ago, and we both
found the example wrong, and both came up with the encoding you did.

As far as finding an official admission of guilt from ISO, you might
first verify that you have the official final copy of ISO 8825.  When
we saw this error before, it was in an almost-final bootleg copy of
the text as it was going to be sent to ISO CS in Geneve.  If you do
have the absolutely official copy (it should not be a photocopy!)
then you might try contacting your national representative on 
ISO/IEC JTC1/SC21/WG6 to see whether a defect report has been filed.
(If not, you could file one!)

> 
> Thanks.

Cheers,

------------------------------------------------------------------------------
This response does not represent the official position of, or statement by,
the Hewlett-Packard Company.  The above data is provided for informational
purposes only.  It is supplied without warranty of any kind.

collin park			Hewlett-Packard Company
collin%hpda@hplabs.hp.com	19420 Homestead Road -- MS 43LT
				Cupertino, CA  95014  USA

HOOPER@QUCDN.QueensU.CA (Andy Hooper) (04/12/90)

My copy of IS 8825 dated 1987-11-15 shows the encoding 06 03 813403.