Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Universally unique identifier
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Versions 3 and 5 (namespace name-based) ==== Version-3 and version-5 UUIDs are generated by [[Cryptographic hash function|hashing]] a [[namespace]] identifier and name. Version 3 uses [[MD5]] as the hashing algorithm, and version 5 uses [[SHA-1]].<ref name="RFC 9562" /> The namespace identifier is itself a UUID. The specification provides UUIDs to represent the namespaces for [[Uniform Resource Locator|URL]]s, [[fully qualified domain name]]s, [[object identifier]]s, and [[X.500]] [[LDAP|distinguished name]]s; but any desired UUID may be used as a namespace designator. To determine the version-3 UUID corresponding to a given namespace and name, the UUID of the namespace is transformed to a string of bytes, concatenated with the input name, then hashed with MD5, yielding 128 bits. Then 6 or 7 bits are replaced by fixed values, the 4-bit version (e.g. 0011<sub>2</sub> for version 3), and the 2- or 3-bit UUID "variant" (e.g. 10<sub>2</sub> indicating an RFC 9562{{r|RFC 9562}} UUIDs, or 110<sub>2</sub> indicating a legacy Microsoft GUID). Since 6 or 7 bits are thus predetermined, only 121 or 122 bits contribute to the uniqueness of the UUID. Version-5 UUIDs are similar, but SHA-1 is used instead of MD5. Since SHA-1 generates 160-bit digests, the digest is truncated to 128 bits before the version and variant bits are replaced. Version-3 and version-5 UUIDs have the property that the same namespace and name will map to the same UUID. However, neither the namespace nor name can be determined from the UUID, even if one of them is specified, except by brute-force search. RFC 4122 recommends version 5 (SHA-1) over version 3 (MD5), and warns against use of UUIDs of either version as security credentials.<ref name="RFC 4122" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)