Subject: RE: ABNF of numericoid

From: "Ramsay, Ron" <[email-masked]>
Date: Mon, 8 Nov 2004 14:55:22 +1100

So, how do you parse it? Eg, 44 44 44 (hex)?

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Hallvard B Furuseth
Sent: Sunday, 7 November 2004 03:25
To: [email-masked]
Subject: ABNF of numericoid

I've discovered that I've lost this old thread again.

I had the impression that we landed on using the exact syntax for
numericoid, but maybe I confused the issue too much:-(
Anyway, [bcp64] and [models] say:

    numericoid = number 1*( DOT number )

I wonder if we could change that to Kurt's suggestion (3) in the old
thread, so the syntax expresses exactly which values are valid:

    numericoid = %x30-31 DOT [ %x31-33 ] DIGIT *( DOT number )
               / %x32 1*( DOT number )
               ; Starts with 0-1.0-39 or 2.number

BTW, I think I was not the only one who had the misconception that the
BER encoding's first component (40 * value1 + value2) can be only 1
octet, and therefore that value2 in the syntax was not unlimited even
with value1 = 2.  Where did others get that idea from?  I got it from
RSA's "A Layman's Guide to a Subset of ASN.1, BER, and DER".  On the
Asn1 mailinglist, I was told guide has a number of errors.

-- 
Hallvard

---

From: Hallvard B Furuseth <[email-masked]>
Date: Mon, 8 Nov 2004 12:33:09 +0100

> So, how do you parse it? Eg, 44 44 44 (hex)?

[Summary after a brief exchange with Ron]

a BER 'OBJECT IDENTIFIER' is represented as a list of integers
<(40*value1 + value2), (value3), (value4), ...>.  Each such integer is
represented as an octet sequence of base-128 digits, where 8. bit = 1
except in the last octet.  0x44 has 8.bit = 0, so 44 44 44 hex are 3
such integers.

So the OID is min(0x44/40, 2).(0x44 - 40*value1).0x44.0x44 = 1.28.68.68.

-- 
Hallvard