w3c / w3c/webcrypto

Consider dropping the secure context requirement for `randomUUID()`

Open
#408 5 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
294
Forks
78
PR merge metrics
No merged PRs in 30d

Description

The Crypto Interface specifies randomUUID() as "[SecureContext] DOMString randomUUID();"

I don't see any reason for this to be locked to secure contexts, as it doesn't do any actual cryptography, apart from using secure random bytes. (which can be obtained outside of a secure context via getRandomValues() anyways)

Inspired by the errors I get when I try to open my locally hosted website on my phone for testing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Crypto Interface and randomUUID() definitions linked in the issue, then review the SecureContext annotation and the existing getRandomValues() behavior. Done means a maintainer decision on whether to remove the requirement, with the Web Crypto specification updated if the change is accepted.

Written by the indexing model from the issue text.

Assessment

Domain
api, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.