News for hackers. Stuff that matters.
Re:A Brief History of the UUID by __s on Wednesday June 07, 2017 @08:51PM (#14511074)
No, UUIDs aren't meant to be cryptographically unique. Session identifiers should be generated by your friendly neighbourhood crypto rng man
Re:A Brief History of the UUID by MichaelGG on Wednesday June 07, 2017 @09:53PM (#14511302)
If you're not specifically requesting a time based ID, any proper uuid lib should just return 16 bytes of randomness from the system rng.
Re:A Brief History of the UUID by veeti on Thursday June 08, 2017 @02:33AM (#14512335)
You need to double check the library you're using. For example, older versions of the Python standard UUID library would fall back to an insecure RNG silently.

It's easier to just read 16 bytes from /dev/urandom and encode it in hex/base64 yourself for a random token.

Re:A Brief History of the UUID by nucleardog on Thursday June 08, 2017 @01:00AM (#14512003)
Getting pedantic, but a proper uuid lib should be returning 122 bits of randomness, and six bits of fixed information that specify the uuid version and generation method ("random").
Re:A Brief History of the UUID by MichaelGG on Thursday June 08, 2017 @02:00AM (#14512225)
For what purpose? Where's the real world reason and interop? Just because an RFC says to set some bits? Is there any code you're likely to hit in your app that actually cares?
Re:A Brief History of the UUID by vog on Thursday June 08, 2017 @04:05AM (#14512679)
I guess the purpose is to be able to put different UUID generation schemes into separate kind-of "namespaces".

That way, a UUIDv4 (random) will never collide with a UUIDv1 (timestamp+mac+...), which again will never collide with UUIDv5 (SHA-1).

So if one of the UUID generation schemes is flawed, these are easily filtered out, and moreover, will never interfere with any other UUID version/scheme.

Re:A Brief History of the UUID by johncolanduoni on Wednesday June 07, 2017 @10:11PM (#14511376)
Not quite, most generate v4 uuids which have a few fixed bits.
Re:A Brief History of the UUID by johncolanduoni on Wednesday June 07, 2017 @10:18PM (#14511401)
The ones most modern UUID libraries generate (v4 UUIDs, variants one or two) have 122 random bits from the OS's csprng and 6 fixed bits.