Live data from Hacker News

Every V4 UUID

everyuuid.com

311–320 of 381 posts

Re: Every V4 UUID

#311
post #240

Earlier quoted context omitted.

"Must support 6-digit PINs" is not part of "the spec for secure credit card transaction handling" – which is also not a (or at least one) thing: There are dozens of card networks, and many of them have tons of regional variations. In some markets, issuers only allow 4 digit PINs, and customers don't expect to have to press an "enter" key when they're done entering their 4 digit PIN – so the reasonable implementation…

4 is the minimum number of digits required, but there are over a dozen different PIN block standards, and most allow between 4..9 and 4..16 digits: https://www.eftlab.com/knowledge-base/complete-list-of-pin-b... Making an ATM that can accept cards from multiple issuers (which is the norm these days) and allowing only 4 digits is the same category of error as requiring that the first character of someone's last name s…

> or to block symbol characters in names.

People tend to very very quickly their mind on that one once they get a few right-to-left control characters that flip over the text layout of the entire program.

Re: Every V4 UUID

#312
post #196

Earlier quoted context omitted.

Agreed. Everyone love puzzles that are worthy of an entire section in a blogpost for their interview questions, rather than stuff actually relevant to the job.

So I just brute forced every UUID in existence on my RTX GPU and loaded the dataset into a HA opensearch cluster on AWS. It took about 5 years of calling ‘uuid.Random()’ to effectively cover about 64% of the keyspace which is good enough. To facilitate full-text search I created a langchain application in python, hosted on kubernetes, that takes your search query and generates synonymous UUIDs via GPT o1-preview befo…

I could imagine some candidates starting with their default tools like this, and start complaining about the cluster performance after a few weeks.

You need a certain way of thinking to have a gut feeling "this could be expensive" and then go back, question your assumptions and confirm your requirements. Not everyone does that - better to rule them out.

Re: Every V4 UUID

#313
Great idea and writeup!

One important feature is missing: From a proper search function I would expect to know how often my string is found. It could be that my password is rare, or that it is rather common. I need to know! Could the search also display the number of hits?

Jokes aside - you know the number of digits of the search string and if it is still a valid uuid. So computing the number of "matches found" should be possible...

Re: Every V4 UUID

#315
Feels to me like Pandora's box to UUID collisions. Even though UUID space is so huge human mind is always so tiny, as it is always subject to some bea5 (pronounce it "bias").

Re: Every V4 UUID

#316

Earlier quoted context omitted.

My first thought was to use linear transformations over Z_2 as a field, as that would create a natural interpretation of fixing certain bits as taking a linear subspace. Interestingly this leads to the property that XOR is preserved. I implemented this in a very quick and hacky way for 32 bits. I generated a random boolean matrix M invertible in Z_2. To turn an input number x into a corresponding number y in an N-bit…

I did some fooling around with this and it seems promising. The first problem is that, when your enciphering function is a matrix, f(0) = 0. This looks bad, but we can easily solve that problem by starting the webpage sequence at an index higher than 0. I tried to work through a much smaller version of the problem* by hand, and it looks like this: We have our enciphering matrix N: [[1 1 1 1 1] [1 0 0 1 1] [1 1 1 0 0]…

Following up, using this encipherment scheme and starting from a 5-bit seed of 17, you produce values in this sequence:

5, 7, 31, 10, 18, 16, 8, 11, 19, 17, 9, 28, 4, 6, 30, 0, 24, 26, 2, 23, 15, 13, 21, 22, 14, 12, 20, 1, 25, 27, 3, 29.

This might pass an eyeball test for random when viewed as decimal numbers. (Although there sure are a lot of cases where adjacent values are 2 apart!) It looks much worse as binary. Here's every ones digit, all concatenated into a hex string, starting from 17 again:

    e1e01e1f
Let's note that ~(e1e0) = 1e1f. Start from 16 instead and you'd see f0f00f0f. Here are the eights:

    3332bbbc
Individual bits show pretty striking patterns. Since the UUID is reported in hex, that can be mitigated a little by the fact that each hex digit combines four binary columns. But so far it seems pretty likely that this would result in the list of UUIDs looking decidedly nonrandom. There might be quite a bit of shared material between adjacent UUIDs.

Re: Every V4 UUID

#317
post #221
post #186

Earlier quoted context omitted.

The values are hexidecimal, so all "9s" isn't the biggest UUID, but all "f's". Specifically, I think: `ffffffff-ffff-4fff-bfff-ffffffffffff`. The "4" in the 3rd block is the only permitted value as these UUIDs are using the GUIDv4 format. I'm not sure what's going on in the 4th block, but the references and linked RFC in the Wikipedia article might reveal more details: https://en.wikipedia.org/wiki/Universally_unique…

But if it’s all Fs, that means you have the sign bit set, so it’s not the largest. It’s the smallest that’s less than zero right?

I guess it's pretty subjective, but not all numeric types are signed, so I'm happy with my answer.

Re: Every V4 UUID

#318
"bijectivity", there is a term from high school I thought I would never hear in real live, still remember having injection, surjection & bijection explained in math class 20 years ago.

Re: Every V4 UUID

#319

Earlier quoted context omitted.

The most offensive sentence I could come up with leetspeak/hexspeak is this one: fe11a710-babe-4150-ace5-b19b1accd1cc (Yes it's a valid UUID) (I am so sorry)

Got the rest but what is ace5? Aces?

Yeah. I could have used "aced" instead ... and perhaps "c0ed" instead of "babe". Would have made a bit more sense together. Well.

Re: Every V4 UUID

#320
post #121

Earlier quoted context omitted.

A great example of Teller's observation that "sometimes magic is just someone spending more time on something than anyone else might reasonably expect."

Sufficiently advanced technology is indistinguishable from magic, as the saying goes.

But the Terry Pratchet quote above indicates that magic is only skin deep
Post reply on HN