Live data from Hacker News

Ask HN: We just had an actual UUID v4 collision...

news.ycombinator.com

311–320 of 369 posts

Re: Ask HN: We just had an actual UUID v4 collision...

#311

Earlier quoted context omitted.

Yes, because UUIDv7 gives up some random bits in order to include the timestamp, which is done in a way that makes UUIDv7s quick to sort by timestamp.

How does including the timestamp expose me to adversarial exploitation?

The same way using an auto increment integer ID does, but imagine that integer also leaked your created timestamp column too.

Re: Ask HN: We just had an actual UUID v4 collision...

#312
post #307
post #119

Earlier quoted context omitted.

Sequences, generally.

That depends on your definition of high-availability. If high availability includes distributed writers, (global) sequences are not the best solution because generating unique sequence values requires synchronisation between all writers. In those cases, you might need to explicitly partition the ID space so that individual writers are guaranteed not to get in each others' hair.

That is merely a sequence generation strategy.

Re: Ask HN: We just had an actual UUID v4 collision...

#313

Earlier quoted context omitted.

> you can never have too many sources of entropy This is so true. And the beauty is that with algorithms, we don't even need to know much about the entropy to be able to extract it. There is the Von Neumann method of generating an unbiased coin from a biased coin. Of throwing it twice, and checking if you got HT or TH. And completely discarding all HH or TT results. It doesn't matter if the coin you are using is 20%…

> There is the Von Neumann method of generating an unbiased coin from a biased coin. Of throwing it twice, and checking if you got HT or TH. And completely discarding all HH or TT results. It doesn't matter if the coin you are using is 20% or 80%, the result will be a true 50/50. This blew my mind. Thank you! I had to think about it a bit, so for anyone scratching their head right now trying to figure it out, conside…

I was doubting this for a minute as I wondered with a significantly biased coin towards the head side would you be more likely to get HT. With probability problems like Monty Hall I like to think about extreme cases like say it's 99 heads to every 1 tails. You'd expect HT 0.99% of the time. Ditto TH.

Re: Ask HN: We just had an actual UUID v4 collision...

#314
post #297

Earlier quoted context omitted.

Yes, they also have wave machines, pendulums, and mobiles :) https://blog.cloudflare.com/harnessing-office-chaos/ https://blog.cloudflare.com/chaos-in-cloudflare-lisbon-offic...

Wouldn’t thermal noise in a resistor make more practical sense?

I prefer cosmic microwave background radiation (CMBR) as my RNG of choice

Re: Ask HN: We just had an actual UUID v4 collision...

#315
post #60

According to the many-worlds interpretation of quantum mechanics, there's bound to be one branch of universe where every UUID is the same. Can you imagine what those guys are thinking?

They probably just generate "the UUID" then add an increasing number on the end so it's unique. Problem solved.

Re: Ask HN: We just had an actual UUID v4 collision...

#316

Earlier quoted context omitted.

> There is the Von Neumann method of generating an unbiased coin from a biased coin. Of throwing it twice, and checking if you got HT or TH. And completely discarding all HH or TT results. It doesn't matter if the coin you are using is 20% or 80%, the result will be a true 50/50. This blew my mind. Thank you! I had to think about it a bit, so for anyone scratching their head right now trying to figure it out, conside…

I was doubting this for a minute as I wondered with a significantly biased coin towards the head side would you be more likely to get HT. With probability problems like Monty Hall I like to think about extreme cases like say it's 99 heads to every 1 tails. You'd expect HT 0.99% of the time. Ditto TH.

You can’t flip coins until you get the first different outcome… You have to flip twice each time, until you get a pair with different outcomes.

Re: Ask HN: We just had an actual UUID v4 collision...

#317

This is surprisingly common. The security of UUIDv4 is based on the assumption of a high-quality entropy source. This assumption is invalidated by hardware defects, normal software bugs, and developers not understanding what "high-quality entropy" actually means and that it is required for UUIDv4 to work as advertised. It is relatively expensive to detect when an entropy source is broken, so almost no one ever does.…

Reading the UUID spec leads me to believe that good entropy is not even a requirement for any version: > Implementations SHOULD utilize a cryptographically secure pseudorandom number generator (CSPRNG) to provide values that are both difficult to predict ("unguessable") and have a low likelihood of collision ("unique"). From https://www.rfc-editor.org/rfc/rfc9562.html#unguessability So I don't think technically we ca…

Any PRNG, including a CSPRNG is simple to predict if you know its inputs.

You need entropy to seed your CSPRNG.

Re: Ask HN: We just had an actual UUID v4 collision...

#319
post #292

Earlier quoted context omitted.

I find this so hard to believe, but I've nearly always worked in small groups/companies. Can you, or any of the commenters above, explain why the reasoning that leads to such a service isn't rejected by, well, common sense? Some super-special requirements?

In the case I mentioned at https://news.ycombinator.com/item?id=48062322 , it was because the Infrastructure org had grown out of what had previously been Datacenter Operations. So they had a team of SWEs who knew the system they were responsible for was absurd, but they weren't able to adequately explain that to the senior management folk who came from that DCOps culture and held asset management & configuration tra…

Fortunately, I've neverencountered that. But still, I can see the usefulness of a guaranteed globally unique UUID, at least for certain purposes. However, a service to add numbers baffles me. The operations needed to create, send, receive and check the message are so much more complex than addition...

I must say, I did experience some lousy tech+sales leadership in one company, which was indeed the biggest I ever worked at. A decent product with a well understood scope was completely scrapped and rewritten. Some team spent more than a year on the (waterfall) design of the new system, which was then scrapped too. When I joined, there was an 8 man team for just the message bus for the new new system. Which didn't even work correctly. The whole was flexible, but in nearly every other aspect inferior to the original product. And it needed much heavier hardware.

Re: Ask HN: We just had an actual UUID v4 collision...

#320

This is surprisingly common. The security of UUIDv4 is based on the assumption of a high-quality entropy source. This assumption is invalidated by hardware defects, normal software bugs, and developers not understanding what "high-quality entropy" actually means and that it is required for UUIDv4 to work as advertised. It is relatively expensive to detect when an entropy source is broken, so almost no one ever does.…

> We just had an actual UUID v4 collision...

(...)

> This is surprisingly common

And there goes though the window my blind faith with UUID v4 :)

I recently read about UUID v7 (https://en.wikipedia.org/wiki/Universally_unique_identifier#...) that became my favourite random identifier.

Post reply on HN