What is UUID v3?
UUID version 3 is a namespace-based 128-bit identifier (36-char string) from RFC 4122 that uses MD5 hashing. It consists of:
- Namespace UUID: A predefined or custom UUID namespace
- Name: A user-provided string that gets hashed
- MD5 hash: Applied to the namespace + name combination
Format example: 9125a8dc-52ee-365b-a5aa-81b0b3681cf6
How UUID v3 works
- Select a namespace UUID (predefined or custom)
- Concatenate the namespace UUID bytes with the name string bytes
- Calculate MD5 hash of the concatenated value
- Set version bits to 0011 (version 3)
- Set variant bits to 10 (RFC 4122 standard)
- Assemble as 32 hex digits with hyphens: 8-4-4-4-12 format
Advantages & Considerations
Advantages | Considerations |
---|---|
|
|
UUID v3 Structure
Bits | Content |
---|---|
0-47 | First 48 bits of MD5 hash |
48-51 | Version (0011 for v3) |
52-63 | Next 12 bits of MD5 hash |
64-65 | Variant (10 for RFC4122) |
66-127 | Remaining 62 bits of MD5 hash |
Predefined Namespaces
Name | UUID | Purpose |
---|---|---|
DNS | 6ba7b810-9dad-11d1-80b4-00c04fd430c8 | Domain names |
URL | 6ba7b811-9dad-11d1-80b4-00c04fd430c8 | URLs |
OID | 6ba7b812-9dad-11d1-80b4-00c04fd430c8 | ISO OIDs |
X.500 DN | 6ba7b814-9dad-11d1-80b4-00c04fd430c8 | X.500 Distinguished Names |
UUID v3 vs. other versions
Version | Based on | Use case | Privacy |
---|---|---|---|
UUID v1 | Time + MAC | Time-ordered IDs | ⚠️ Reveals MAC |
UUID v3 | Namespace + MD5 | Deterministic IDs | ✅ Private |
UUID v4 | Random | Secure random IDs | ✅ Private |
UUID v5 | Namespace + SHA-1 | Deterministic IDs | ✅ Private |
UUID v6 | Time (reordered) | Sortable IDs | ⚠️ Reveals MAC |
UUID v7 | Time + random | Sortable IDs | ✅ Private |
Common Use Cases
- URL-based identifiers: Creating UUIDs from URLs
- Domain-specific IDs: Converting DNS names to UUIDs
- Deterministic file IDs: Content addressing
- User IDs: From email or username
- Configuration entries: For consistent keys
- Document references: Content management systems
Frequently Asked Questions
Is UUID v3 cryptographically secure?
Not really. UUID v3 uses MD5, which has known cryptographic weaknesses. For higher security, consider UUID v5 (SHA-1) or UUID v4 (random).
Will the same inputs always produce the same UUID v3?
Yes. UUID v3 is deterministic - the same namespace and name will always produce the identical UUID, making it useful for reproducible IDs.
What's the difference between UUID v3 and v5?
They work identically except v3 uses MD5 while v5 uses SHA-1. UUID v5 is generally preferred as SHA-1 is cryptographically stronger than MD5.
Can I create my own namespaces?
Yes. While RFC 4122 defines standard namespaces (DNS, URL, OID, X.500), you can create custom namespaces using any valid UUID.
Is UUID v3 suitable for security tokens?
No. Due to MD5's weaknesses and the deterministic nature, UUID v3 is not recommended for security tokens or anything requiring unpredictability.