gofrs / uuid

A UUID package for Go
MIT License
1.57k stars 110 forks source link

Does this produce cryptographically strong uuid values? #105

Closed elbek closed 1 year ago

elbek commented 1 year ago

Is it possible to generated cryptographically strong uuid values?

zerkms commented 1 year ago

v4, v6, and v7 use crypto/rand as a source of random data (by default).

cameracker commented 1 year ago

Hey @elbek, all of the UUIDs supported in this library are built to specifications according to the corresponding RFCs for each version, but the "cryptographic strength" of the UUID depends on the version in use. v4 is probably the strongest because of its generation algorithm, but it can also be subject to certain classes of brute force replication attacks.

elbek commented 1 year ago

Thanks guys, that is great!