Random UUID version 4
02UUIDv4 fills the available layout with random data around fixed version and variant bits.
DIAGRAMRead RFC section 5.4 ↗
RFC 9562 · § 5.4EXAMPLE
3 / 3
03
Issue the identifier
Keep the identifier distinct from an authentication secret.
Key idea: The version and variant leave 122 random bits.
Rules & examples
The version and variant leave 122 random bits.
- The version and variant leave 122 random bits.
- Use a suitable random source; CSPRNG guidance appears in §6.9.
- Collisions remain probabilistic rather than mathematically impossible.
Examples are illustrative. Consult the linked RFC and its errata for implementation details.
Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background
First, agree how to read the message.
An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Read the updated RFC section ↗