home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / protocol / iso / 1369 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.2 KB  |  59 lines

  1. Newsgroups: comp.protocols.iso
  2. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!enag
  3. From: Erik Naggum <enag@ifi.uio.no>
  4. Message-ID: <19921120.004@erik.naggum.no>
  5. Date: 20 Nov 1992 18:35:04 +0100
  6. References: <1drej9INN8t8@svcase.sp.paramax.com> <1drgg8INN90p@svcase.sp.paramax.com>
  7. Subject: Re: Question on ASN.1 Encodings
  8. Lines: 44
  9.  
  10. Steve,
  11.  
  12. The variable length encoding of the basic encoding rules can only be
  13. used for constructed types.  X.209(88) (== ISO 8825:1987) 6.3.2 reads:
  14.  
  15.     A sender shall
  16.  
  17.     a)  use the definite form if the encoding is primitive;
  18.  
  19.     b)  use either the definite form or the indefinite form, a sender's
  20.         option, if the encoding is constructed and all immediately
  21.         available;
  22.  
  23.     c)  use the indefinite form if the encoding is contructed and is not
  24.         all immediately available.
  25.  
  26. Since the constructed encodings ultimately have objectes with primitive
  27. encoding as their constituents, your problem never arises.
  28.  
  29. In your particular case, you can choose the primitive encoding:
  30.  
  31.         03 06 00 09 00 00 00 09
  32.         -- -- -- --------------
  33.          |  |  |              |
  34.          |  |  |              +-- contents
  35.          |  |  +----------------- number of residual bits in last octet
  36.          |  +-------------------- definite form, length of content
  37.          +----------------------- universal, primitive, bit string
  38.  
  39. or constructed:
  40.  
  41.         23 80 03 06 00 09 00 00 00 09 00 00
  42.         -- -- ----------------------- -----
  43.          |  |                       |     |
  44.          |  |                       |     +-- end of contents marker
  45.          |  |                       +-------- contents of constructed
  46.          |  |                                 encoding (see above!)
  47.          |  +-------------------------------- indefinite form
  48.          +----------------------------------- universal, constructed,
  49.                                               bit string
  50.  
  51. Hope this helps.
  52.  
  53. </Erik>
  54. --
  55. Erik Naggum             :  ISO  8879 SGML     :      +47 295 0313
  56.                         :  ISO 10744 HyTime   :
  57. <erik@naggum.no>        :  ISO 10646 UCS      :      Memento, terrigena.
  58. <enag@ifi.uio.no>       :  ISO  9899 C        :      Memento, vita brevis.
  59.