These docs are under active development and cover the v0.20 Kobicha security model.
§1.1 1 Introduction

Scope

This specification defines the binary identifier types used across Peios subsystems: the Globally Unique Identifier (GUID) and the Locally Unique Identifier (LUID).

This specification covers:

  • GUID -- binary format, string representation, comparison semantics, and generation requirements
  • LUID -- binary format, comparison semantics, and allocation model

This specification does not cover:

  • Security Identifiers (SIDs) -- defined in PSD-004
  • Well-known GUID or LUID values -- defined in the specifications of the subsystems that declare them
  • Application-specific identifier namespaces
§1.2 1 Introduction

Terminology

  • GUID (Globally Unique Identifier): A 128-bit identifier with global uniqueness guarantees. Used to identify registry hives, layers, object types, and other entities that require stable identity across systems and reboots.

  • LUID (Locally Unique Identifier): A 64-bit identifier with boot-scoped local uniqueness. Used to identify transient entities such as logon sessions and privilege instances that do not persist across reboots.

  • Nil GUID: The GUID with all 128 bits set to zero. A sentinel value meaning "no GUID" or "unset."

  • Nil LUID: The LUID with all 64 bits set to zero. A sentinel value meaning "no LUID" or "unset."

§1.3 1 Introduction

Conventions

This specification conforms to PSD-001.

§1.3.1 Normative keywords

The key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY in this specification are to be interpreted as described in RFC 2119.

§1.3.2 Byte order

All multi-byte integer fields in this specification are little-endian unless explicitly stated otherwise.

§1.3.3 Notation

Byte offsets and sizes in format tables are in bytes. Hex values use the 0x prefix. Byte sequences are written as space-separated hex pairs: 0a 0b 0c.

§1.4 1 Introduction

Prior Art

§1.4.1 MS-DTYP

The GUID and LUID types defined in this specification derive from the Microsoft Data Types specification (MS-DTYP), §2.3.4 (GUID) and §2.3.7 (LUID).

The Peios GUID binary format is identical to the MS-DTYP GUID. The Peios GUID string format follows the same hyphenated hex convention but normalises to lowercase hex digits on output, where Microsoft implementations typically produce uppercase.

The Peios LUID binary format diverges from MS-DTYP in one detail: HighPart is an unsigned 32-bit integer (uint32) rather than the signed 32-bit integer (LONG) used in MS-DTYP. The signed type in MS-DTYP is a Win32 API convention with no semantic purpose -- LUID values are never negative. Making the field unsigned simplifies comparison and eliminates a class of sign-extension bugs.

§1.4.2 RFC 4122

RFC 4122 ("A Universally Unique IDentifier (UUID) URN Namespace") defines the UUID format and generation algorithms. The GUID binary layout used by Microsoft and adopted by Peios is the mixed-endian variant of the RFC 4122 UUID: the first three fields are little-endian integers and the last field is a raw byte array. This differs from the RFC 4122 network byte order representation where all fields are big-endian.

Peios generates version 4 (random) GUIDs as defined in RFC 4122 §4.4.

§1.4.3 DCE RPC

The GUID structure originates from the DCE 1.1 RPC specification, which defined the uuid_t type with the same field layout. The mixed-endian encoding reflects the DCE convention of encoding integer fields in the sender's native byte order (little-endian on x86).