Current implementation checkpoint — 19 September 2026
WebScene main is c9899a874d3cc448fb79b7f2ac4c334fe13e0d68. The existing pinned Mbed TLS 3.6.4 provider already supplies SHA-1/SHA-256 digest, AES-GCM/CBC/HMAC, bounded owner-queue settlement, cancellation, WPT-derived contracts and published vectors. Focused child #627 merged through PR #628 and now zeroizes malformed decoded JWK prefixes and transient Base64URL strings, rejects oversized AES/HMAC input before native allocation, and records provider/licensing/update policy.
No #102 branch remains active. The parent remains open only for configured unchanged-package MCP secret-input and browser connection-secret persistence/reopen acceptance across release RIDs; stock Code OSS has no VSDA and bundled Copilot HMAC executes in Node.
Problem
WebScene does not expose crypto.subtle. VS Code OSS 1.137 has reachable browser paths that depend on it:
- SHA-256: webview/bootstrap URL derivation, GitHub and Microsoft authentication PKCE, extension-host authentication, chat/MCP identifiers, iframe worker bootstrap;
- SHA-1: WebSocket handshake and legacy state verification;
- AES-GCM: browser workbench connection-token protection and MCP input storage;
- AES-CBC decrypt: browser signing-service WASM loading;
- HMAC signing is also used by the bundled Copilot extension.
The V8 embedder does not include Blink Web Crypto, and WebScene has no pinned, audited cryptographic provider with a stable target across macOS, Windows, and Linux. The existing Mbed TLS fetch is Windows-only and private to IXWebSocket compatibility. Implementing algorithms directly, or composing different platform APIs behind loosely matched semantics, would create security and interoperability risk.
Proposed architecture
- Select and pin one vetted cross-platform provider after licensing, binary-size, update cadence, platform packaging, and FIPS requirements are documented. Do not hand-roll primitives.
- Implement an opaque native
CryptoKey store with algorithm metadata, extractability, usages, realm ownership, and deterministic zeroization.
- Run operations asynchronously with bounded input/output sizes, cancellation during realm shutdown, and Promise settlement on the owning V8 task queue.
- Implement the smallest VS Code-driven algorithm slices in reviewable stages:
digest: SHA-256 and SHA-1;
- AES-GCM: generate/import/export/encrypt/decrypt with raw and JWK formats;
- AES-CBC decrypt;
- HMAC import/sign only if bundled-extension support is in scope.
- Match Web Crypto normalization and exception behavior; do not expose
crypto.subtle until its advertised methods and key semantics are complete for the accepted slice.
- Add official WPT-derived algorithm/error tests, published test vectors, cross-realm isolation tests, shutdown/cancellation tests, memory/zeroization review, and bounded throughput/latency gates on all release RIDs.
Acceptance criteria
- The provider choice and upgrade policy are documented and approved.
- No JavaScript or bespoke cryptographic primitive implementation is introduced.
- Keys cannot be forged, crossed between incompatible realms, or exported when non-extractable.
- Algorithm parameters, usages, JWK validation, error names, and Promise behavior match the Web Crypto specification for every exposed operation.
- Required VS Code 1.137 paths have integration coverage in the unchanged production bundle.
- All supported RID CI and security/performance gates pass before
crypto.subtle becomes visible.
Until this is complete, feature detection must continue to observe crypto.subtle as absent rather than a partial or insecure object.
Current implementation checkpoint — 19 September 2026
WebScene main is
c9899a874d3cc448fb79b7f2ac4c334fe13e0d68. The existing pinned Mbed TLS 3.6.4 provider already supplies SHA-1/SHA-256 digest, AES-GCM/CBC/HMAC, bounded owner-queue settlement, cancellation, WPT-derived contracts and published vectors. Focused child #627 merged through PR #628 and now zeroizes malformed decoded JWK prefixes and transient Base64URL strings, rejects oversized AES/HMAC input before native allocation, and records provider/licensing/update policy.No #102 branch remains active. The parent remains open only for configured unchanged-package MCP secret-input and browser connection-secret persistence/reopen acceptance across release RIDs; stock Code OSS has no VSDA and bundled Copilot HMAC executes in Node.
Problem
WebScene does not expose
crypto.subtle. VS Code OSS 1.137 has reachable browser paths that depend on it:The V8 embedder does not include Blink Web Crypto, and WebScene has no pinned, audited cryptographic provider with a stable target across macOS, Windows, and Linux. The existing Mbed TLS fetch is Windows-only and private to IXWebSocket compatibility. Implementing algorithms directly, or composing different platform APIs behind loosely matched semantics, would create security and interoperability risk.
Proposed architecture
CryptoKeystore with algorithm metadata, extractability, usages, realm ownership, and deterministic zeroization.digest: SHA-256 and SHA-1;crypto.subtleuntil its advertised methods and key semantics are complete for the accepted slice.Acceptance criteria
crypto.subtlebecomes visible.Until this is complete, feature detection must continue to observe
crypto.subtleas absent rather than a partial or insecure object.