Universally Unique Identifier
A Universally Unique Identifier ( UUID) is a standard for identifiers, which is used in software development. He is from the Open Software Foundation (OSF ) as part of the Distributed Computing Environment (DCE ) standardized. The intent of UUIDs is to be able to identify information in distributed systems without central coordination clearly.
A UUID is a 16 -byte number that is listed in hexadecimal, and divided into five groups. In its normal form, a UUID looks like the following example:
- 2.1 Version: Microsoft GUID
RFC 4122 describes the structure of a UUID. The name of each field based on the original UUID version 1 and are now mainly used in the randomly generated UUIDs only of historical interest.
The top 4 bits in time_hi_and_version field indicating the so-called version of the UUID. Strictly speaking this is not a version, but a kind of UUID subtype. The following 5 versions have defined currently:
The timestamp is a 60 -bit value, which counts since October 15, 1582 ( introduction of the current Gregorian calendar ) past 100 -ns intervals. To keep the time stamp clearly, if the system time needs to be reset once, there is a field clock sequence, which is increased in this case, either 1 or is to be set to a new ( pseudo) random value. The node ID is the MAC address to be one of the built- in system network cards or a pseudo-random value if the system does not have a MAC address.
(Pseudo ) randomly generated UUIDs (version 4)
Here are all the bits that are not set by the UUID format to fixed values , occupied by ( pseudo) random values .
Although the uniqueness of such a generated UUID is not guaranteed, the total number of randomly generated UUIDs is so large that the probability of generating two identical UUIDs is very small, if the random number algorithms provide uniformly distributed random numbers. Therefore UUIDs can be generated without any central supervisory body and used for labeling to run without relevant risk that the same UUID is used for something else. Thus can later be merged into a single database with UUID marked information having to dissolve without Bezeichnerkonflikte.
Examples of implementation of the UUID standards are:
- Microsoft's Globally Unique Identifier ( GUID)
- The Java class java.util.UUID
- The Qt class QUuid
- The Linux file / proc / sys / kernel / random / uuid
Name-based UUID (version 3 and 5)
Here, a UUID is generated starting from an unspecified name. Names are assigned within a namespace unique identifier for an object, resource, or the like. Starting from a UUID for the namespace UUID is generated by a sequence of bytes from the namespace UUID and the name itself is formed and this byte sequence is then hashed with MD5 or SHA1 from the name. The hash is then distributed in a defined manner to the available bits UUID.
RFC 4122 contains exemplary namespace UUIDs for the namespaces DNS, URL, ISO OID and " X.500 Distinguished Names ".
If, for example from the DNS name www.example.org a UUID version 5 are generated, then proceed as follows:
History and standardization
UUID, as part of the standard ISO / IEC 11578:1996 " Information technology - Open Systems Interconnection - Remote Procedure Call ( RPC) " and documented as a separate standard ISO / IEC 9834-8:2005. The IETF has published RFC 4122, the UUID -based.
The original (version 1) was generated schema for UUID, the UUID version concatenate with the MAC address of the computer that generated the UUID, and the number of 100- nanosecond intervals since the beginning of the Gregorian calendar. In practice, the actual algorithm is more complicated. This scheme has been criticized because it reveals both the identity of the generating computer as well as the time of generation.
Several other algorithms for generation have been developed and incorporated into the standard, such a scheme, which is based only on random numbers (version 4 UUID), and schemes in which the UUID from any string (eg DNS entry URL, ISO OID, " X.500 Distinguished Names ", but also any other semantics, provided a base UUID is defined for it) via MD5 (version 3 UUID) or SHA-1 (version 5 UUID) hash values is derived.
The release 5.0 of Java provides a class available that generates 128 -bit UUID. The API documentation for the class java.util.UUID refers to RFC 4122nd Many other languages are ready routines for generating UUID ready.
Description: Microsoft GUID
Microsoft used in its Component Object Model also UUIDs, there also called GUID. However, these IDs correspond to the part to a separate specification. The UUIDs described here are the top two bits of the field clock_seq_high_and_reserved recognizable. You always have the value 10; in hexadecimal representation is therefore the first hex-digit number always between the fourth and 8hex Bhex, eg: 5945c961 - e74d - 478f - 8afe - da53cf4189e3. The historical UUIDs used by Microsoft have in the top three bits of this field to the value 110, the hexadecimal representation is therefore the first of the fourth digit hex-digit either Chex or Dhex. Example: The GUID of the IUnknown interfaces in the COM has the UUID 00000000-0000 -0000- C000- 000,000,000,046th