The answer is unlimited, AND that BER ***CAN**** encode all values.

The OID encoding uses bit 8 as a more bit (for all components), with the value in the concatenation of the bottom seven bits of as many (the minimum number) of bits that it takes.

So OID {2 xxxx}

encodes as a single component with a value of 80+xxxx. Encode that into binary, take as many multiples of 7 bits as are needed for a positive integer encoding of that value, put them as the bottom seven bits of octets with all except the last having bit 8 set to zero, and you have the encoding of {2 xxxxx}.

I guess the question is "Why do you think BER encodes it as a single octet?"

Here is the text - notice the "one or more":

8.19.2 Each subidentifier is represented as a series of (one or more) octets. Bit 8 of each octet indicates whether it is the last in the series: bit 8 of the last octet is zero; bit 8 of each preceding octet is one. Bits 7 to 1 of the octets in the series collectively encode the subidentifier. Conceptually, these groups of bits are concatenated to form an unsigned binary number whose most significant bit is bit 7 of the first octet and whose least significant bit is bit 1 of the last octet. The subidentifier shall be encoded in the fewest possible octets, that is, the leading octet of the subidentifier shall not have the value 80subscript16.
8.19.3 The number of subidentifiers (N) shall be one less than the number of object identifier components in the object identifier value being encoded.
8.19.4 The numerical value of the first subidentifier is derived from the values of the first two object identifier components in the object identifier value being encoded, using the formula:
(X*40) + Y
where X is the value of the first object identifier component and Y is the value of the second object identifier component.
NOTE â This packing of the first two object identifier components recognizes that only three values are allocated from the root node, and at most 39 subsequent values from nodes reached by X = 0 and X = 1.
8.19.5 The numerical value of the ith subidentifier, (2  i  N) is that of the (i + 1)th object identifier component.



John L



Hallvard B Furuseth wrote:
Hi,

What is the maximum value of an OBJECT IDENTIFIER's 2nd component,
when 1st component is 2?

I haven't got X.660, all I know is that BER encodes it with one
octet = * 1st component 40 + 2nd component.
So I can think of four possibilities:

- 39, as when 1st component < 2,

- 47, if the BER encoding of 1st*40+2nd is like the other components,
  with 8th bit indicating that there are no more octets,

- 175, if that octet does not have a "(no) more octets" bit,

- no limit, if BER can't encode all OBJECT IDENTIFIERs:-(


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





Reply via email to