Deterministic Name-Based Architecture & Standard Namespaces
Standard Reference: IETF RFC 4122 ยง4.3 (Name-Based UUIDs using MD5)
How Deterministic Name Hashing Operates
Unlike Version 4 (random bits) or Version 7 (timestamps), Version 3 is entirely deterministic and idempotent: given the exact same Namespace UUID and the identical input name string, the algorithm will generate the exact same 128-bit UUID on every platform, every programming language, without needing database coordination or distributed lock managers.
- Convert Namespace UUID into raw 16-byte big-endian binary representation.
- Concatenate the UTF-8 encoded name string bytes to the namespace binary.
- Compute standard 128-bit MD5 digest over the combined byte array.
- Set Version 3 bits:
(digest[6] & 0x0f) | 0x30. - Set RFC 4122 Variant bits:
(digest[8] & 0x3f) | 0x80.
Predefined Standard RFC 4122 Namespaces
| Namespace Type | Standard Constant UUID | Typical Example Name Input |
|---|---|---|
| DNS Namespace | 6ba7b810-9dad-11d1-80b4-00c04fd430c8 | Fully qualified domain names (e.g. modernuuid.com) |
| URL Namespace | 6ba7b811-9dad-11d1-80b4-00c04fd430c8 | Absolute web URLs (e.g. https://modernuuid.com/version3) |
| OID Namespace | 6ba7b812-9dad-11d1-80b4-00c04fd430c8 | ISO Object Identifiers (e.g. 1.3.6.1.4.1.343) |
| X500 Namespace | 6ba7b814-9dad-11d1-80b4-00c04fd430c8 | LDAP Distinguished Names (e.g. CN=John Doe,OU=Engineering) |
Cryptographic Security Warning: Why Prefer UUID v5
โ ๏ธ MD5 Hash Collision Risks
Because the MD5 algorithm is susceptible to known mathematical collision attacks, RFC 4122 and RFC 9562 explicitly recommend deploying UUID Version 5 (which uses SHA-1) for all new software systems. Version 3 is primarily maintained for backward compatibility with legacy distributed databases and DCE systems.