🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.iso
Article #141

Yet more questions on ASN.1

#141
From: Karl Auerbach
Date: Wed, 14 Jun 1989 22:51
34 lines
1483 bytes
Digging deeper into 8825...

Section 9.2.3 of the ISO 8825:1987(E)... regarding the encoding of
bit strings... says "if the bitstring is empty, there shall be no
subsequent octets, and the initial octet shall be zero."

OK.  So if I have an empty bit string is the preferred encoding:

bitstring	length
03		00

--or--

bitstring	length	unused-bits
03		01	00

Seems like the latter form is the "correct" way according to section 9.2.3.

If so, is the first form legal?  Section 9.2 seems to say that it isn't:
"The contents octets for the primitive encoding shall contain an initial
octet followed by zero, one or more subsequent octets."  I.e. the "initial"
octet does not seem to be optional.

If the first form isn't legal, then how does that comport with section 9.3
which says that "The contents octets for the constructorized encoding shall
consist of *ZERO*, one or more data values."?  (emphasis added)
According to 9.3 I could express my empty bit string as:

bitstring	length
23		0

Which looks a whole lot like the (assumed) illegal non-constructorized form.

			--karl--
Technical Details
Message-ID: <8906142251.AA17376@Hercules.csl.sri.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!CSL.SRI.COM!auerbach

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!CSL.SRI.COM!auerbach
From: auerbach@CSL.SRI.COM (Karl Auerbach)
Newsgroups: comp.protocols.iso
Subject: Yet more questions on ASN.1
Message-ID: <8906142251.AA17376@Hercules.csl.sri.com>
Date: 14 Jun 89 22:51:41 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 34