Live data from Hacker News

Every V4 UUID

everyuuid.com

71–80 of 381 posts

Re: Every V4 UUID

#71
post #57

Can someone ELI5? How's he ensuring uniqueness of a UUID when they are randomly generated?

They're not randomly generated. They're generated using a Feistel cipher. [1]

He's ensuring the uniqueness by indexing from 0, and applying the cipher to come up with a more "random" looking UUID.

[1] https://eieio.games/blog/writing-down-every-uuid/#toc:feiste...

Re: Every V4 UUID

#72
post #57

Can someone ELI5? How's he ensuring uniqueness of a UUID when they are randomly generated?

UUID is a 128-bit value, of which 122 bits are available for actual data. UUID was conceived as a way to mark an intersection point between two dimensions, originally for Apollo Computer's RPC system where the two dimensions were time and hardware identifier (originally originally Apollo hardware serial number, later commonly 802.3 address). The additional bits are metadata telling you that a particular 128-bit value is a UUID, not just a coincidental jumble of bits, and which type of UUID.

This site is specifically about “V4” UUIDs where the two dimensions are random and also-random. If you scroll all the way to the bottom you will see that the last table row is numbered the same value as the maximum 122-bit number, so the site is flipping every possible bit-combination within that space combined with the metadata bits that say “Hello I am a V4 UUID”:

  irb> ::Array::new(122, 0b1).reduce { (_1  5316911983139663491615228241121378303

Re: Every V4 UUID

#74

Compression is now so advanced, we can browse web pages weighing over 340 undecillion bytes. We truly live in an age of wonders.

Meh. Years ago I had my bakeries churning out undecillions of units no problem in Cookie Clicker. No big deal!

Re: Every V4 UUID

#76

The fact that the search works impressed me more than anything. Of course, like every great magic trick, it seems so simple once it is explained. For the curious, here's the linked blog post describing how the project works: https://eieio.games/blog/writing-down-every-uuid/ Edit to add: I'd only tried searching for an exact UUID when I wrote this comment. I didn't realize it supports full text search! Now I'm even mo…

Searching is very similar to a common approach for building a naïve spellchecker: given an input, generate all the possible matches it can be part of. You're not searching in a corpus, you're using the input to generate indices into the corpus (list of UUIDs here, list of words in the dictionary in a spellchecker).

Re: Every V4 UUID

#78
post #75
post #17

Seems like some hacker leaked all UUIDs. Check if your UUIDs are part of the leak.

This is the biggest hack since every ATM PIN was leaked: https://pastebin.com/SmJRB8eQ

Holy shit, my PIN is on there. How the hell did that get that?? I was told it was a 1/10,000 chance of someone guessing it.

Re: Every V4 UUID

#79
post #2

Very useful! I'll refer to it when I forget my UUIDs, I use this site all the time to remember my bitcoin private key [0] [0]: https://privatekeys.pw/keys/bitcoin/1

Thanks for this, I didn't know that people create weak BTC keys for fun. I guess some are also used as bot honeypots?

Re: Every V4 UUID

#80
post #57

Can someone ELI5? How's he ensuring uniqueness of a UUID when they are randomly generated?

He has a writeup of it here: https://eieio.games/blog/writing-down-every-uuid/

He's using a bijection between the number on the left (which are ordered) and the UUID that's designed to produce something random-looking. The simple fact that bijection cannot produce the same output out of two inputs (or it's not a bijection) means that all the UUIDs are unique.

Post reply on HN