Banibrata,
I am afraid this is because some standarisers (not to be named!) of 1986 vintage
were inordinate bit-twiddlers (lines were slow in those days). It was felt at
that time that there would never be more than three top-level registration
authorities - ITU-T (CCITT in those days), ISO, and JOINT.
It was therefore decided to restrict the top-level arcs to these three, and to
limit the number of second-level arcs from the first two - essentially
overlaying the OID tree with one in which the top two levels are collapsed into
a single level.
*** The aim was to allow first and second level arcs to encode into a single
octet, not into two octets for the first two first level arcs, and for small
values of second level arcs for the third first level arc. *** It saves one
octet on almost all OIDs.
So .... values of an OID component up to 127 encode in one octet (the top bit is
used as the more bit for each OID component, as I think you know).
127 divided by three is about 40!!!!
So arcs {0 0} to {0 39} are mapped to an arc spanning levels 1 and 2 with
values {0} to {39}. (Value of {0 x} where x>39 are **NOT** allowed or supported.)
Similarly, {1 0} to {1 39} map to {40} to {79} and {2 x} maps to {80+x} for all
x (unlimited). (It will encode into one octet for x<48.)
With hindsight, this was a totally silly thing to do, but it looked good at the
time!
It not only makes the encoding more obscure, but more importantly the limitation
to three top-level arcs has caused us lots of heart-ache ever since. (The
limitation at the second level for the first two top-level arcs has not yet
caused a problem. But it is there, and has to be honoured.)
I hope this explanation helps. (Somewhere in my tutorials - probably also in my
book ASN.1 Complete - thre is a diagram showing the fictitious tree overlaying
the real tree, but hopefully the above is clear enough.)
John L
Banibrata Dutta wrote:
Hi,
I was wondering if someone could help me understand the BER encoding for
an OID type value.
I read the section 8.19 of X.690, (also cut-n-paste here), but couldn't
really figure out how to came up the binary representation of the
example being explained.
8.19.5 The numerical value of the ith sub-identifier, (2 <= i <= N) is
that of the (i + 1)th object identifier component.
EXAMPLE
An OBJECT IDENTIFIER value of:
{joint-iso-itu-t 100 3}
which is the same as:
{2 100 3}
has a first sub-identifier of 180 and a second sub-identifier of 3. The
resulting encoding is:
OBJECT
IDENTIFIER Length Contents
0616 0316 81340316
As explained in the sections 8.19.1-8.19.4, the way I compute the
representation is...
2x40 + 100 = 180 (sub-identifier-1)
3 (sub-identifier-2).
How do these 2 sub-identifiers make up (81340316), is not at all clear
from the prior sections.
thanks & regards,
Bani
------------------------------------------------------------------------
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1
--
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
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1