Rev 1334 | Rev 1342 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1334 | Rev 1336 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | # OIDplus Information Object GUID format |
1 | # OIDplus Information Object GUID format |
2 | 2 | ||
- | 3 | ## OIDplus Information Object GUID |
|
- | 4 | ||
3 | OIDplus automatically assigns a UUID to every object it manages. It is based on the custom UUID type (UUIDv8) which was defined in the new version of RFC 4122. |
5 | OIDplus automatically assigns a UUID to every object it manages. It is based on the custom UUID type (UUIDv8) which was defined in the new version of RFC 4122. |
4 | 6 | ||
5 | |Block| Byte | Length | Description | |
7 | |Block| Byte | Length | Description | |
6 | |-----|------|---------|----------------------| |
8 | |-----|------|---------|----------------------| |
7 | | 1 | 0-3 | 1 bit | Reserved, must be 0. |
9 | | 1 | 0-3 | 1 bit | Reserved, must be 0. |
8 | | | | 31 bits | OIDplus SystemID (lower 31 bits of SHA1 of Public Key); 0 if not available |
10 | | | | 31 bits | OIDplus SystemID (lower 31 bits of SHA1 of Public Key) |
9 | | 2 | 4-5 | 16 bits | Creation timestamp: Days since 01.01.1970 00:00 GMT; 0 if unknown. Max possible: 0xFFFF = 06 June 2149 |
11 | | 2 | 4-5 | 16 bits | Creation timestamp: Days since 01.01.1970 00:00 GMT; 0 if unknown. Max possible: 0xFFFF = 06 June 2149 |
10 | | 3 | 6-7 | 4 bits | UUID Version, must be 0x8 (Custom UUID) |
12 | | 3 | 6-7 | 4 bits | UUID Version, must be 0x8 (Custom UUID) |
11 | | | | 12 bits | Reserved, must be 0x0000 |
13 | | | | 12 bits | Reserved, must be 0x0000 |
12 | | 4 | 8-9 | 2 bits | UUID Variant, must be 0b10 (RFC 4122) |
14 | | 4 | 8-9 | 2 bits | UUID Variant, must be 0b10 (RFC 4122) |
13 | | | | 14 bits | Namespace (lower 14 bits of SHA1 of Namespace OID) |
15 | | | | 14 bits | Namespace (lower 14 bits of SHA1 of Namespace OID) |
14 | | 5 |10-15 | 48 bits | Object name (lower 48 bits of SHA1 of canonical object name) |
16 | | 5 |10-15 | 48 bits | Object name (lower 48 bits of SHA1 of canonical object name) |
15 | 17 | ||
16 | - | ||
17 | ## Example |
18 | ### Example |
18 | 19 | ||
19 | The object **java:com.example**, created 30 September 2018 on system #1855139287 has the following UUID: |
20 | The object **java:com.example**, created 30 September 2018 on system #1855139287 has the following UUID: |
20 | 21 | ||
21 | 6e932dd7-458c-8000-b9e9-c1e3894d1105 |
22 | 6e932dd7-458c-8000-b9e9-c1e3894d1105 |
22 | 23 | ||
Line 28... | Line 29... | ||
28 | | 2 | Timestamp | 0x458C | 30 September 2018 (17804 days since 1 January 1970) |
29 | | 2 | Timestamp | 0x458C | 30 September 2018 (17804 days since 1 January 1970) |
29 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
30 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
30 | | 4 | Namespace+Variant | 0xB9E9 | SHA1('1.3.6.1.4.1.37476.2.5.2.4.8.6') & 0x3FFF \| 0x8000 |
31 | | 4 | Namespace+Variant | 0xB9E9 | SHA1('1.3.6.1.4.1.37476.2.5.2.4.8.6') & 0x3FFF \| 0x8000 |
31 | | 5 | Object Name | 0xC1E3894D1105 | SHA1('com.example') & 0xFFFF.FFFF.FFFF |
32 | | 5 | Object Name | 0xC1E3894D1105 | SHA1('com.example') & 0xFFFF.FFFF.FFFF |
32 | 33 | ||
- | 34 | ||
- | 35 | ## OIDplus System GUID |
|
- | 36 | ||
- | 37 | Every OIDplus system can be identified by a UUID generated using this schema based on the Information Object UUID. |
|
- | 38 | ||
- | 39 | |Block| Byte | Length | Description | |
|
- | 40 | |-----|------|---------|----------------------| |
|
- | 41 | | 1 | 0-3 | 1 bit | Reserved, must be 0. |
|
- | 42 | | | | 31 bits | OIDplus SystemID (lower 31 bits of SHA1 of Public Key) |
|
- | 43 | | 2 | 4-5 | 16 bits | Reserved for system creation timestamp. Currently 0 because OIDplus does not track the timestamp of a new system. |
|
- | 44 | | 3 | 6-7 | 4 bits | UUID Version, must be 0x8 (Custom UUID) |
|
- | 45 | | | | 12 bits | Reserved, must be 0x0000 |
|
- | 46 | | 4 | 8-9 | 2 bits | UUID Variant, must be 0b10 (RFC 4122) |
|
- | 47 | | | | 14 bits | Namespace: Fix value of 0. |
|
- | 48 | | 5 |10-15 | 48 bits | Object name: Fix 0x1890afd80709 (lower 48 bits of SHA1 of an empty string) |
|
- | 49 | ||
- | 50 | ### Example |
|
- | 51 | ||
- | 52 | The system #1855139287 has the following UUID: |
|
- | 53 | ||
- | 54 | 6e932dd7-0000-8000-8000-1890afd80709 |
|
- | 55 | ||
- | 56 | It contains the information as follows: |
|
- | 57 | ||
- | 58 | |Block| Description | Value | Interpretation | |
|
- | 59 | |-----|-------------------|----------------|----------------| |
|
- | 60 | | 1 | System ID | 0x6E932DD7 | SHA1(PubKey) & 0x7FFF.FFFF = 1855139287 |
|
- | 61 | | 2 | Timestamp | 0x0000 | Unknown |
|
- | 62 | | 3 | Reserved+Version | 0x8000 | 0x0000 \| 0x8000 |
|
- | 63 | | 4 | Namespace+Variant | 0x8000 | 0x0000 \| 0x8000 |
|
- | 64 | | 5 | Object Name | 0xC1E3894D1105 | SHA1('') & 0xFFFF.FFFF.FFFF |
|
- | 65 | ||
- | 66 | ||
33 | ## Known namespaces |
67 | ## Known namespaces |
34 | 68 | ||
35 | | Vendor |Namespace| OID | SHA1 hash | Block 4| Notes | |
69 | | Vendor |Namespace| OID | SHA1 hash | Block 4| Notes | |
36 | |--------------|---------|--------------------------------|-----------|--------|--------------| |
70 | |--------------|---------|--------------------------------|-----------|--------|--------------| |
- | 71 | | n/a | n/a | n/a | n/a | 0x8000 | System |
|
37 | | ViaThinkSoft | doi | 1.3.6.1.4.1.37476.2.5.2.4.8.1 | 0x...2259 | 0xA259 | |
72 | | ViaThinkSoft | doi | 1.3.6.1.4.1.37476.2.5.2.4.8.1 | 0x...2259 | 0xA259 | |
38 | | ViaThinkSoft | gs1 | 1.3.6.1.4.1.37476.2.5.2.4.8.2 | 0x...021E | 0x821E | |
73 | | ViaThinkSoft | gs1 | 1.3.6.1.4.1.37476.2.5.2.4.8.2 | 0x...021E | 0x821E | |
39 | | ViaThinkSoft | guid | 1.3.6.1.4.1.37476.2.5.2.4.8.3 | 0x...B924 | 0xB924 | In OIDplus, only the UUID itself will be shown |
74 | | ViaThinkSoft | guid | 1.3.6.1.4.1.37476.2.5.2.4.8.3 | 0x...B924 | 0xB924 | In OIDplus, only the UUID itself will be shown |
40 | | ViaThinkSoft | ipv4 | 1.3.6.1.4.1.37476.2.5.2.4.8.4 | 0x...5AF9 | 0x9AF9 | |
75 | | ViaThinkSoft | ipv4 | 1.3.6.1.4.1.37476.2.5.2.4.8.4 | 0x...5AF9 | 0x9AF9 | |
41 | | ViaThinkSoft | ipv6 | 1.3.6.1.4.1.37476.2.5.2.4.8.5 | 0x...55DB | 0x95DB | |
76 | | ViaThinkSoft | ipv6 | 1.3.6.1.4.1.37476.2.5.2.4.8.5 | 0x...55DB | 0x95DB | |
Line 253... | Line 288... | ||
253 | $coll = []; |
288 | $coll = []; |
254 | for ($i = 1; $i <= 185; $i++) { |
289 | for ($i = 1; $i <= 185; $i++) { |
255 | $block4 = dechex(hexdec(substr(sha1('1.3.6.1.4.1.37476.2.5.2.4.8.'.$i), -4)) & 0x3FFF | 0x8000); |
290 | $block4 = dechex(hexdec(substr(sha1('1.3.6.1.4.1.37476.2.5.2.4.8.'.$i), -4)) & 0x3FFF | 0x8000); |
256 | $coll[] = $block4; |
291 | $coll[] = $block4; |
257 | } |
292 | } |
- | 293 | $coll[] = dechex(0x8000); // System |
|
258 | $block4 = dechex(hexdec(substr(sha1($plugin_oid), -4)) & 0x3FFF | 0x8000); |
294 | $block4 = dechex(hexdec(substr(sha1($plugin_oid), -4)) & 0x3FFF | 0x8000); |
259 | if (in_array($block4, $coll)) { |
295 | if (in_array($block4, $coll)) { |
260 | echo "HASH CONFLICT\n"; |
296 | echo "HASH CONFLICT\n"; |
261 | } else { |
297 | } else { |
262 | echo "| (Author) | (NSName) | $plugin_oid | 0x...".strtoupper(substr(sha1($plugin_oid), -4))." | 0x".strtoupper($block4)." |\n"; |
298 | echo "| (Author) | (NSName) | $plugin_oid | 0x...".strtoupper(substr(sha1($plugin_oid), -4))." | 0x".strtoupper($block4)." |\n"; |