The OID converter is a handy little tool to convert ASN.1 OIDs from readable dotted decimal notation to binary hexadecimal Distinguished Encoding Rules (DER) representation and vice versa. If you're into x.509 certificates, this may be useful to you, too.
OID encoder/decoder - Matthias Gaertner 1999/2001 - Freeware
Usage:
OID [-C] [-o<outfile>] {-i<infile>|1.2.3.4}
converts dotted form to ASCII HEX DER output.
OID -x [-o<outfile>] {-i<infile>|hex-digits}
decodes ASCII HEX DER and gives dotted form.
The OID for rsaSignatureWithripemd160 is 1.3.36.3.3.1.2 (just as an example).
>oid 1.3.36.3.3.1.2
06 06 2B 24 03 03 01 02>oid -C 1.3.36.3.3.1.2
"\x06\x06\x2B\x24\x03\x03\x01\x02">oid -o r160oid.hex 1.3.36.3.3.1.2>oid 1.3.36.3.3.1.2 > r160oid.hex>oid -x -i r160oid.hex
UNIVERSAL OID.1.3.36.3.3.1.2A bug was pointed out to me recently. The original version would not correctly encode OIDs that contain the component 128. Version 1.1 fixes this. As an example, v1.0 would incorrectly encode
>oid 1.3.128
06 02 2B 00 (incorrect!)
while the corrected version will encode this as
>oid 1.3.128
06 03 2B 81 00
(Thanks to Eric Grenier of Cisco for the hint, 24Mar2006)
This code was written by me, Matthias Gärtner. It is freeware. Do with it whatever you want. Use at your own risk. No warranty of any kind.
Back to main page. Back to software page.
| This page was last changed on March 25th, 2006. © Matthias Gärtner 2001 | |