3 ms·
This kind of problem is so prevalent that I think directly creating an 128-bit random ID from a CSPRNG is much safer than betting on the saneness of UUID implem
by netheril96 11y ago
This kind of problem is so prevalent that I think directly creating an 128-bit random ID from a CSPRNG is much safer than betting on the saneness of UUID implementers.
- lmm 11y agoThere's nothing insane about using a faster nonsecure PRNG for a library function that you expect to possibly be used on a hot path, as long as the security properties are clearly documented.
- marcosdumay 11y agoCSPRNGs are not much slower than the alternatives, and really, how often the hot path on data creation falls on the processor, instead of memory access or IO? Nope, looks like a really bad choice for generic libraries.
- masklinn 11y agoWell if you just get 122 random bits from a CSPRNG you get an UUIDv4.