-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cryptographically secure random UUIDs #623
Comments
Early feedback before a group discussion. If the specification were to add support for other UUID types, what would be the path forward? An optional argument to randomUUID()? Aside from that question, this looks both useful and well-scoped. |
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:
For potential extensions to the method like this, I like the idea of an options object. |
Right, this was a question because several other languages support multiple versions and there might be demand for that after this ships.
Yes, this looks like a sensible path forward. Thanks for the clarification! |
During the review process, I would be grateful if folks could chime in on the discussion regarding secure contexts, on the WICG repository. |
Hi @bcoe 2 questions - one is what does the multi-implementer support look like? Chrome Status currently says "no information"... secondly, what's the proposed venue for this beyond WICG? |
Left our thoughts on secure vs insecure (based on partial consensus) here: WICG/uuid#23 (comment) |
Hey @torgo (I believe we me in London a few years ago, makes me nostalgic for travel), answers below:
A few ideas have been floated:
I don't have strong opinions, and am open to whatever process would create the least friction. |
Thanks for the quick reply @bcoe – we discussed again in our plenary call just now. We think WebAppSec could be a good option - presuming the wg chair agrees. Good to hear there are discussions going on with other engines. |
We discussed this during our plenary this week, and the group is happy with the design. We left our feedback on the secure vs. insecure discussion (WICG/uuid#23 (comment)) with a group conclusion that this feature should be available in insecure contexts to discourage rolling your own crypto. Thanks for bringing this to our attention! |
That conclusion seems rather inconsistent with Web Crypto itself being limited to secure contexts to avoid having the browser crypto internal code be accessible in insecure contexts. (Limited to randomness it would be more reasonable as that's already exposed.) |
That's a good point, maybe we should continue that discussion in the spec repo. |
Not that it really matters now that this feature is already well-established, but as a netizen, I am disappointed that this feature is limited to "secure contexts." I do understand that cryptographic primitives like key generation should not be available in insecure contexts to avoid developers assuming something is secure when a MITM attack could compromise their app. However, I don't think this justification applies to |
Ya ya yawm TAG!
I'm requesting a TAG review of uuid.
We propose adding the randomUUID() method to the crypto interface. This method provides an API for generating RFC 4122 identifiers. Initially, the only version of UUID supported will be the version 4 "Algorithm for Creating a UUID from Truly Random or Pseudo-Random Numbers".
Further details:
You should also know that...
This specification was originally worked on in TC39, but it was determined that the need for a CSRNG made WICG a more appropriate venue, given that WebCryptography is part of the web platform.
We'd prefer the TAG provide feedback as (please delete all but the desired option):
🐛 open issues in our GitHub repo for each point of feedback
CAREFULLY READ AND DELETE CONTENT BELOW THIS LINE BEFORE SUBMITTING
Please preview the issue and check that the links work before submitting.
In particular, if anything links to a URL which requires authentication (e.g. Google document), please make sure anyone with the link can access the document. We would prefer fully public documents though, since we work in the open.
¹ We require an explainer to give the relevant context for the spec review, even if the spec has some background information. For background, see our explanation of how to write a good explainer. We recommend the explainer to be in Markdown.
² A Security and Privacy questionnaire helps us understand potential security and privacy issues and mitigations for your design, and can save us asking redundant questions. See https://www.w3.org/TR/security-privacy-questionnaire/.
The text was updated successfully, but these errors were encountered: