w3c / w3c/webcrypto

Should window.crypto be specified to be non-configurable and non-writable?

Open
#169 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs implementor interest needs tests proposal
Dominant language
HTML
Stars
294
Forks
78
PR merge metrics
No merged PRs in 30d

Description

Currently, the spec doesn't say whether window.crypto can be modified by Javascript code. So any implementation that leaves window.crypto open to being changed would be seen as conformant (example).

Leaving window.crypto open to being changed by, say, browser extensions means no piece of code that uses window.crypto can trust it and therefore no security guarantees can be made by any piece of code that runs in the browser. That seems to invalidate the primary declared purpose of the library. Should a crypto API tracer even be installable by a normal user whose primary trust point is the browser and not extensions? Would the lack of trust cause libraries which need crypto to try to ship their own implementations which would defeat the purpose of the specification?

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 Web Cryptography API question about whether window.crypto may be modified, then review the linked Chromium issue and crypto API tracer reference. Done means the specification has an explicit decision on the required configurability and writability of window.crypto, including the stated trust implications.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.