개념 및 지식 허브
암호학적으로 안전한 UUID v4 고유 식별자 생성기
암호학적으로 안전한 UUID v4 고유 식별자 생성기
본 도구는 100% 클라이언트 환경(브라우저)에서 작동합니다. 소스 코드, 토큰, 기밀 데이터가 외부 서버로 절대 전송되지 않습니다.
핵심 아키텍처 및 수학 공식
UUID v4 = 32 Hexadecimal Characters (128 bits) driven by Cryptographic Pseudorandom Number Generators (CPRNG)
A standard UUID looks like this: `123e4567-e89b-12d3-a456-426614174000`. In a Version 4 UUID, the 13th character is always '4', and the 17th character is always '8', '9', 'a', or 'b'.
모범 사례 및 필수 지침
- Avoid UUIDs for Clustered Indexes: Because Version 4 UUIDs are completely random, inserting them into a standard SQL database causes massive index fragmentation. Use them as secondary keys, or use sequential UUIDs (ULID/UUIDv7) for primary keys.
- Never Use Math.random(): Standard programming random functions are highly predictable. Always ensure your UUID generator uses a secure cryptographic library to prevent attackers from guessing future session IDs.
- Store as BINARY(16) to Save Space: Storing a UUID as a 36 character string (VARCHAR) wastes massive database space. Converting the UUID to raw binary reduces the storage footprint from 36 bytes down to just 16 bytes.
자주 묻는 질문 (FAQ)
What is the chance of generating a duplicate UUID?
Astronomically low. You would need to generate 1 billion UUIDs per second for roughly 85 years to reach a 50 percent probability of a single collision.
What is the difference between UUID and GUID?
They are conceptually the exact same thing. UUID is the open standard name, while GUID (Globally Unique Identifier) is the specific terminology historically pushed by Microsoft.
What does Version 4 mean?
Version 4 means the UUID is generated using completely random numbers. Version 1 uses the computer's MAC address and current timestamp, which can inadvertently leak the user's hardware identity.