Hi Bruno:

 

I guess I was wrong in how I extracted information out of the spec, thanks for pointing out the locations in the spec that claims the 2nd option. It seems that I did not notice the subtle difference between sections 10.6 and 10.9.3.4.

 

Regards,

 

Chamira

 


From: Bruno.KONIK [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 12:48 PM
To: Chamira Perera
Subject: RE: [ASN1] Question about PER for extension additions for a sequence type

 

Hello Chamira,

 

the answer is 2nd option. You have to encode n-1 if n is the number of extensions as stated in :

 

18.7 Let the number of extension additions in the type being encoded be "n", then a bit-field with "n" bits shall be

produced for addition to the field-list. The bits of the bit-field shall, taken in order, encode the presence or absence of an

encoding of each extension addition in the type being encoded. A bit value of 1 shall encode the presence of the

encoding of the extension addition, and a bit value of 0 shall encode the absence of the encoding of the extension

addition. The leading bit in the bit-field shall encode the presence or absence of the first extension addition, and the

trailing bit shall encode the presence or absence of the last extension addition.

NOTE – If conformance is claimed to a particular version of a specification, then the value "n" is always equal to the number of

extension additions in that version.

18.8 The procedures of 10.9 shall be invoked to add this bit-field of "n" bits to the field-list, preceded by a length

determinant equal to "n" as a normally small length.

NOTE – "n" cannot be zero, as this procedure is only invoked if there is at least one extension addition being encoded.

And

10.9.3.4 Where the length determinant is a normally small length and "n" is less than or equal to 64, a single-bit bitfield

shall be appended to the field-list with the bit set to 0, and the value "n–1" shall be encoded as a non-negativebinary-

integer into a 6-bit bit-field. This shall be followed by the associated field, completing these procedures. If "n" is

greater than 64, a single-bit bit-field shall be appended to the field-list with the bit set to 1, followed by the encoding of

"n" as an unconstrained length determinant followed by the associated field, according to the procedures of 10.9.3.5 to

10.9.3.8.4.

NOTE – Normally small lengths are only used to indicate the length of the bitmap that prefixes the extension addition values of a

set or sequence type.

I hope this will help.

Bruno KONIK - uniGone
41-43 rue de Cronstadt
75015 PARIS
web   : http://www.unigone.com

 


De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Chamira Perera
Envoyé : mercredi 8 mars 2006 16:41
À : [email protected]
Objet : [ASN1] Question about PER for extension additions for a sequence type

Hi all:

 

When encoding extension additions for a sequence type using the PER UNALIGNED variant, before the bitmap that indicates the presence or absence of extension additions for the sequence type being encoded, a length determinant needs to be added indicating the length of this bitmap. Therefore my question is the value that has to be encoded for the length determinant,

 

  1. Should indicate the number of extension additions (i.e if there are “n” extension additions for the type defined then the length determinant should be encoded to indicate “n”)?
  2. Or should indicate the number of extension additions – 1 (i.e if there are “n” extension additions for the type defined then the length determinant should be encoded to indicate “n-1”)?

 

The reason for this question is that I was looking at the bit patterns output by an ASN.1 tool and it was encoding the length determinant using the 2nd option that is mentioned above. The folks who maintain the tool pointed out that the length determinant has to indicate a number of at least one (see X.691, the note below 18.8) and hence the length can be normalized by subtracting one from it. Also if the second option is the correct way, can someone please point out where it is in the spec because I was following option 1 as this was what I got by reading clause 18.8. Any help is appreciated!

 

Thanks,

 

Chamira Perera


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to