News for hackers. Stuff that matters.
Re:Moving Away from UUIDs by jve on Tuesday November 22, 2022 @04:06AM (#33703657)
Well, V4 UUIDS per wiki are pretty random, but your generated UUID could actually use your MAC address and current time to be globally unique. So, less entropy. Just use them as a (globally) unique thing but not as a secret.
Re:Moving Away from UUIDs by whizzter on Tuesday November 22, 2022 @04:51AM (#33703948)
Basically, know your UUID generator type. V1, V2, V6 and V7 are mac/time dependant and more useful for f.ex. DB-keys whilst V4 is more useful for things that should actually be secret.
Re:Moving Away from UUIDs by Gordonjcp on Tuesday November 22, 2022 @06:31AM (#33704610)
So there's nothing actually wrong with UUIDs as secrets, if you know what you're doing and how to mitigate the risks?

So pretty much the same as every other damn thing in software that gets an "X Considered Harmful" article? :-D

Re:Moving Away from UUIDs by mort96 on Tuesday November 22, 2022 @06:41AM (#33704675)
I would trust a reputable cryptographic random number generator library to really care about generating truly unguessable, high entropy cryptography-grade random numbers. I would trust a reputable UUID library to generate a UUIDv4 which is random enough to not produce a collision. I would not trust a reputable UUID library to generate truly unguessable, high entropy cryptography-grade UUIDv4s.
Re:Moving Away from UUIDs by scott_w on Tuesday November 22, 2022 @07:47AM (#33705168)
If you know what you're doing and mitigating the risks, you don't waste your time trying to use UUIDs for secrets. Therefore people using UUIDs for secrets, by definition, don't know what they're doing and certainly aren't mitigating the risks.
Re:Moving Away from UUIDs by layla5alive on Tuesday November 22, 2022 @06:45PM (#33713172)
UUID is fundamentally just a binary --> text encoding for 128-bit numbers.

There's nothing whatsoever wrong with using a cryptographically secure mechanism to generate a random 128-bit number and then representing that as a UIID in plaintext.

The issue would be using a UUID generator (there are many versions, and several of those use MAC addresses and time for a bunch of the "entropy" - so they are not cryptographically secure / random).

Your comment is overly reductive.

Re:Moving Away from UUIDs by scott_w on Thursday November 24, 2022 @02:28PM (#33735281)
You’re splitting hairs and missing the point of the article.

Nobody is referring to “UUID” and just meaning the representation. I would think it’s obvious people are referring to using a UUID generator e.g. `uuid.uuid4()` so no, I’m not being overly reductive. I’m just following the common understanding that everyone has when we say “UUID.”

Re:Moving Away from UUIDs by dahfizz on Tuesday November 22, 2022 @08:07AM (#33705309)
Not really. The articles point is that even a v4 UUID (the random one) doesn't have enough randomness as other options, and it has a much less compact representation.

UUIDs are not designed to be secrets, so they are a poor choice. They'll probably work, but there are better options.