The History of GUIDs/UUIDs
GUIDs (Globally Unique Identifiers) and UUIDs (Universally Unique Identifiers) are identifiers designed to be unique across all space and time, providing a way to uniquely identify entities without the need for central coordination. The terms are often used interchangeably, with UUID being more common in modern contexts.
Origin and motivation
GUIDs were introduced by Microsoft in the early 1990s as part of the Distributed Computing Environment (DCE) standard. The motivation behind their creation was to provide a way to generate unique identifiers for various purposes in a distributed computing environment without relying on a centralized authority.
Structure
GUIDs/UUIDs are typically 128-bit numbers, represented as 32 hexadecimal digits grouped in specific patterns. The structure includes various fields to ensure uniqueness, such as a timestamp, a version number, and a node identifier. The version number indicates the layout and uniqueness properties of the UUID.
Version Evolution
- Version 1 This version uses the computer's MAC address and the current timestamp to create UUIDs. However, privacy concerns and the potential for collisions (due to MAC address reuse) led to other versions being preferred.
- Version 2 This version uses a unique identifier associated with a POSIX user account and a timestamp.
- Version 3 These UUIDs are generated based on the MD5 hash of a namespace identifier and a name. However, MD5's vulnerabilities to collisions have made it less suitable for generating secure UUIDs.
- Version 4 This is the most common version used today. It generates UUIDs using random or pseudo- random numbers. They are statistically very unlikely to collide due to the large UUID space. This is the version used when generating guids here on guid.page.
- Version 5 Similar to version 3, but based on the SHA-1 hash function. It provides better security properties than version 3.
Standardization and Adoption
Microsoft's implementation of GUIDs was later standardized by the Open Software Foundation (OSF), and later by the Internet Engineering Task Force (IETF), under the name UUID. This standardization ensured that UUIDs could be used across different platforms and systems.
Usage
GUIDs/UUIDs have found applications in various domains, including software development, databases, distributed systems, and more. They are used to uniquely identify resources, objects, records, and transactions without the need for centralized coordination.
Collisions and Security
While UUIDs are designed to be highly unique, the possibility of collisions (two UUIDs being the same) cannot be completely eliminated, especially with version 1 and version 3 UUIDs due to weaknesses in the underlying algorithms. Version 4 and version 5 UUIDs offer higher security and collision resistance.
Read more about GUIDs on Wikipedia, or generate some guids for your own use.