Re: [w3ctag/design-reviews] Cryptographically secure random UUIDs (#623)

> If the specification were to add support for other UUID types, what would be the path forward? An optional argument to randomUUID()?

As UUIDs are defined today, i.e., a 128-bit number, it's difficult to imagine a better algorithm than version 4 (as it maximizes entropy). However, I can imagine some futures where this might change:

* perhaps the definition of a UUID is [extended to include more bits of entropy](https://neilmadden.blog/2018/08/30/moving-away-from-uuids/), at which point it would be nice to be able to request this `crypto.randomUUID({bitSize: 256})`.
* perhaps an algorithm gains popularity that is [both random, and sequential](https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake.html), for some applications it might be nice to opt into this `crypto.randomUUID({algorithm: 'v?')`;

For potential extensions to the method like this, I like the idea of an options object.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/623#issuecomment-816737101

Received on Friday, 9 April 2021 14:48:51 UTC