- Each subidentifier is encoded in 7-bit base 128
- The base 128 digits are encoded in hex (base 16)
- For each value that requires more than one byte to encode, the leftmost bit is 1 in each byte except for the final one. The final byte always has 0 for the leftmost bit.
- The first two values of the OID are combined with the following formula
-
- Given an OID of X.Y.Z, X and Y are combined as: X * 40 + Y
- Combine 2 and 100 as follows: 2 * 40 + 100 = 180
- Now you have 2 numbers: 180 and 3.
- 180 in Base 128 = 128 + 52
-
- converted to hex, 180 in base 128 = 0x01 0x34
- Set the leftmost bit in the first byte: 0x81, 0x34
- 3 in Base 128 = 3
-
- converted to hex, 3 in base 128 = 0x03
- Since this is only one byte long, the lowest bit stays 0
- Combine the results to get: 0x81 0x34 0x03
The following psuedo code explains how to convert the string form of an OID into a binary form that SSL-C can understand:
For example, we'll encode 2.100.3:
Merge the first two values together with this formula: n1 * 40 + n2
/* The first value (n1) is always 0, 1, or 2
2 * 40 + 100 = 180
we are now encoding 180 3 */
For each value
Convert each value to base 128
/* 180 (base 10) = 1 52 (base 128)
3 (base 10) = 3 (base 128)
This can be understood as:
180 = 1 * 128^1 + 52 * 128^0
3 = 3 * 128 ^0
180 = 128 + 52 = 0x01 (128's place) 0x34 (1's place)
3 = 0x03*/
For all bytes except the last one, set the left most bit
/* 0x01 0x34 becomes 0x81 0x34
0x03 stays 0x03 */
Put these into a byte array with a trailing NULL.
/* In C, this looks like:
char oid[4] = { 0x81, 0x34, 0x03, '\0' };
*/
Related Articles
How to minimize outage time when converting from a standalone to a clustered RSA Identity Governance and Lifecycle deployment 38Number of Views Change Requests Do not Include Indirect Entitlements When Users Are Removed From Roles via Rules, Reviews, or User Access … 50Number of Views RSA MFA Agent 2.0 for Epic Hyperdrive Release Notes 51Number of Views How to extract Authentication Manager license files from a new license purchase on my.rsa.com 16Number of Views Convert a file-based RSA SecurID software token from .sdtid (CTF) format to a QR code failed with error "Java is not recog… 194Number of Views
Trending Articles
RSA Authentication Manager 8.9 Patches and Hotfixes Readme RSA Authentication Manager 8.9 Setup and Configuration Guide RSA MFA Agent 2.5 for Microsoft Windows Installation and Administration Guide RSA Authentication Manager Patch Updates How to manipulate imported RSA SecurID Software Token(s) on an iPhone or iPad device