Re: OID encoding help

Peter Gutmann <[email protected]> Sun, 7 May 2023 13:23:09 +0000
Newsgroups gmane.ietf.x509
Message-ID <SY4PR01MB62511401E87FE05AFCFDB91AEE709@SY4PR01MB6251.ausprd01.prod.outlook.com>
Robert Moskowitz <[email protected]> writes:

>For initial work we will use oid = "1.3.6.1.4.1.6715.2.6.6", with the
>Endorsement as type BIT-STRING.

The 1 3 6 1 4 1 (note, no dots, that's a common IETF error) the encoding is
{ 0x2B x06 x01 x04 x01 }, then for the 6715 it's broken up into 7-bit values,
so { 0x34 0x3B } with the high bit set for a continuation character on the
first one, so 0xB4, then the remaining values as individual bytes.  Finally
prepend an 0x06 and the length in bytes.

So the final value is { 06 0A 2B 06 01 04 01 B4 3B 02 06 02 }.

Peter.