This one is very tricky.

Trailing zero bits are not significant when there are named bits.

The size constraint has not been violated by the encoded value. What has been transferred by the encoding, in abstract value terms is a *set* of values of infinite length, all with only the fist bit set and all other bits set to zero. (DER text - canonical - on this stuff gets interesting, if you read it!) All else is encoders options. But the SIZE constraint does indeed restrict the *abstract* values (independently of the named bits specification), and so what is being sent is !1000000000000000', '1000000000000000', etc up to '10000000000000000000000000000000000000000', **all of which carry the same semantics**.

(I hate this stuff - every time we have made a new version since 1984, we have tinkered with the text to try to get a clean model and specification. Basically, the named bits stuff was fundamentally flawed way back in 1982. But I believe that what I say above fits the current text - and indeed most earlier text. The encoding is valid.)

In specific reply to Ed: the restriction of the size constraint is on the abstract values. Not on the way they are encoded.

John L


Ed Day wrote:
It is my opinion that the size constraint in this case must be respected; otherwise, it has no meaning. Clearly, the person who wrote this definition wanted the bit string to be between 15 and 32 bits in length, otherwise the size constraint would not have been added. As to precise language in the standards stating this, I could not find any.
Regards,
Ed Day
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-3020
Fax: +1 (484) 875-2913
Toll-free: (877) 307-6855 (USA only)
mailto:[EMAIL PROTECTED]
http://www.obj-sys.com


    ----- Original Message -----
    From: Wiehe Ulrich <mailto:[EMAIL PROTECTED]>
    To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    Sent: Friday, February 28, 2003 4:27 AM
    Subject: [ASN.1] Question on BER

Dear ASN.1 experts



    In order to solve an interoperability problem resulting from
    different interpretations of ITU-T X.690, your help on the following
    question is very much appreciated:



    A BER encoded message contains a data type for which the abstract
    syntax is defined as



DataType ::= BIT STRING {

bitOne (0),

bitTwo (1),

bitThree (2),

bitSeven (6),

bitEight (7),

bitNine (8),

bitFour (3),

bitFive (4),

bitSix (5),

bitTen (9),

bitEleven (10),

bitTwelve (11),

bitThirteen (12),

bitFourteen (13),

bitFifteen (14),

bitNineteen (18),

bitTwenty (19),

bitTwentyone (20),

bitTwentytwo (21),

bitTwentythree (22),

bitTwentyfour (23),

bitTwentyfive (24),

bitTwentysix (25),

bitTwentyseven (26),

bitTwentyeight (27),

bitTwentynine (28)} (SIZE (15..32))



The entity sending the message encodes this data type as:



03 TAG

02 length

00 no unused bits

80 bitOne set to 1, bitTwo to bitSeven set to 0



    The entity receiving the message does not accept it due to the SIZE
    constraint not being respected and performs the appropriate error
    handling.



    Now designers of the sending entity argue that ITU-T X.690 § 8.6.2.4
    and § 11.2.2 allow the encoder to encode the data type as shown
    above whereas designers of the receiving entity do not share this
    view and insist on the SIZE constraint being respected.



Dear Experts,

    please let me know which of the above interpretations of ITU-T X.690
    is correct and whether or not X.690 is incompatible to X.209 in this
    respect.





Thank you in advance



Ulrich Wiehe



GKS AG

Gesellschaft für

Kommunikations Software Tel:+496621 169139

MMC2 Fax:+49 6621 169 122

Breitenstr. 57 Mobil: +49 151 14016088

    D-36251 Bad Hersfeld                    e-mail:
    [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>









--
   Prof John Larmouth
   Larmouth T&PDS Ltd
   (Training and Protocol Development Services)
   1 Blueberry Road
   Bowdon                               [EMAIL PROTECTED]
   Cheshire WA14 3LS                    Tel: +44 161 928 1605
   England                              Fax: +44 161 928 8069



Reply via email to