All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

UUIDv47 Library: Combining UUIDv7 Sortable Performance with UUIDv4 Privacy

By

aabbdev

8mo ago· 3 min readenCode

Summary

UUIDv47 is a C library that transforms UUIDv7 (time-sortable UUIDs) into UUIDv4-like identifiers for API boundaries while maintaining the sortable properties internally. It uses SipHash-2-4 encryption to mask the timestamp field with a key derived from the UUID's random bits, providing both the performance benefits of UUIDv7 sorting and the privacy/security appearance of UUIDv4.

Key quotes

· 3 pulled
uuidv47 lets you store sortable UUIDv7 in your database while emitting a UUIDv4-looking façade at your API boundary
It does this by XOR-masking only the UUIDv7 timestamp field with a keyed SipHash-2-4 stream tied to the UUID's own random bits
UUIDv47 = v4 privacy + v7 performance
Snippet from the RSS feed
⚡ UUIDv47 = v4 privacy + v7 performance. Contribute to stateless-me/uuidv47 development by creating an account on GitHub.

You might also wanna read