Skip to content

Commit 1412cf8

Browse files
committed
Fix #85: Specify the global object associated with objects created by this API
1 parent cc89e2d commit 1412cf8

File tree

2 files changed

+70
-58
lines changed

2 files changed

+70
-58
lines changed

spec/Overview-WebCryptoAPI.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,11 @@ interface <dfn id="dfn-SubtleCrypto">SubtleCrypto</dfn> {
12931293

12941294
<div id="subtlecrypto-interface-methods" class="section">
12951295
<h3>Methods and Parameters</h3>
1296+
<p>
1297+
Objects created by the methods defined in this section shall be associated with the
1298+
<a href="https://www.w3.org/TR/html51/webappapis.html#relevant-global-object">relevant global object</a>
1299+
of <code>this</code> [<a href="#HTML">HTML</a>].
1300+
</p>
12961301
<div class="note">
12971302
<p>
12981303
All errors are reported asynchronously by rejecting the returned
@@ -15323,8 +15328,7 @@ window.crypto.subtle.generateKey(aesAlgorithmKeyGen, false, ["encrypt"]).then(
1532315328
</dd>
1532415329
<dt id="HTML">HTML</dt>
1532515330
<dd>
15326-
<cite><a href="http://dev.w3.org/html5/spec/Overview.html">HTML5: A vocabulary and
15327-
associated APIs for HTML and XHTML (work in progress)</a></cite>, I. Hickson. W3C.
15331+
<cite><a href="https://www.w3.org/TR/html51">HTML5.1</a></cite>, W3C.
1532815332
</dd>
1532915333
<dt id="X690">ITU-T Recommendation X.690 (11/08)</dt>
1533015334
<dd>

spec/Overview.html

Lines changed: 64 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<link rel="stylesheet" href="//www.w3.org/StyleSheets/TR/2016/W3C-ED" type="text/css" /></head>
2929

3030
<body>
31-
<div class="head"><p><a class="logo" href="http://www.w3.org/"><img src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72" height="48" alt="W3C" /></a></p><h1>Web Cryptography API</h1><h2>W3C Editor’s Draft <em>26 August 2016</em></h2><dl><dt>Latest Editor’s Draft:</dt><dd><a href="http://w3c.github.io/webcrypto/Overview.html">http://w3c.github.io/webcrypto/Overview.html</a></dd><dt>Latest Published Version:</dt><dd><a href="http://www.w3.org/TR/WebCryptoAPI/">http://www.w3.org/TR/WebCryptoAPI/</a></dd><dt>Previous Version(s):</dt><dd><a href="https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html">https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html</a></dd><dt>Editor:</dt><dd><a href="http://www.netflix.com/">Mark Watson</a>, Netflix &lt;[email protected]&gt;</dd><dt>Participate:</dt><dd><a href="https://github.com/w3c/webcrypto">We are on GitHub</a>.
31+
<div class="head"><p><a class="logo" href="http://www.w3.org/"><img src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72" height="48" alt="W3C" /></a></p><h1>Web Cryptography API</h1><h2>W3C Editor’s Draft <em>8 September 2016</em></h2><dl><dt>Latest Editor’s Draft:</dt><dd><a href="http://w3c.github.io/webcrypto/Overview.html">http://w3c.github.io/webcrypto/Overview.html</a></dd><dt>Latest Published Version:</dt><dd><a href="http://www.w3.org/TR/WebCryptoAPI/">http://www.w3.org/TR/WebCryptoAPI/</a></dd><dt>Previous Version(s):</dt><dd><a href="https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html">https://dvcs.w3.org/hg/webcrypto-api/raw-file/0fe9b34c13fb/spec/Overview.html</a></dd><dt>Editor:</dt><dd><a href="http://www.netflix.com/">Mark Watson</a>, Netflix &lt;[email protected]&gt;</dd><dt>Participate:</dt><dd><a href="https://github.com/w3c/webcrypto">We are on GitHub</a>.
3232
</dd><dd>
3333
Send feedback to <a href="mailto:[email protected]?subject=%5BWebCryptoAPI%5D">[email protected]</a> (<a href="http://lists.w3.org/Archives/Public/public-webcrypto/">archives</a>).
3434
</dd><dd><a href="https://github.com/w3c/webcrypto/issues/new">File a bug</a>
@@ -60,7 +60,7 @@ <h2>Status of this Document</h2>
6060
report can be found in the <a href="http://www.w3.org/TR/">W3C technical
6161
reports index</a> at http://www.w3.org/TR/.
6262
</em></p><p>
63-
This document is the 26 August 2016 <b>Editor’s Draft</b> of the
63+
This document is the 8 September 2016 <b>Editor’s Draft</b> of the
6464
<cite>Web Cryptography API</cite> specification.
6565

6666
Please send comments about this document to
@@ -171,111 +171,115 @@ <h3>2.1. Multi-factor Authentication</h3>
171171
A web application may wish to extend or replace existing username/password based
172172
authentication schemes with authentication methods based on proving that the user has
173173
access to some secret keying material. Rather than using transport-layer authentication,
174-
such as TLS client certificates, the web application may wish to provide a rich user
175-
experience by providing authentication within the application itself.
174+
such as TLS client certificates, the web application may prefer the richer user
175+
experience provided by authenticating within the application itself.
176176
</p>
177177
<p>
178-
Using the Web Cryptography API, such an application could locate suitable client keys,
179-
which may have been previously generated via the user agent or pre-provisioned
180-
out-of-band by the web application. It could then perform cryptographic operations such
181-
as decrypting an authentication challenge followed by signing an authentication response.
178+
Using the Web Cryptography API, the application could locate suitable client keys, which
179+
may have been previously generated via the user agent or pre-provisioned out-of-band by
180+
the web application. It could then perform cryptographic operations such as decrypting an
181+
authentication challenge followed by signing an authentication response.
182182
</p>
183183
<p>
184-
Further, the authentication data could be further enhanced by binding the authentication
185-
to the TLS session that the client is authenticating over, by deriving a key based on
186-
properties of the underlying transport.
184+
This exchange could be further strengthened by binding the authentication to the TLS
185+
session over which the client is authenticating, by deriving a key based on properties of
186+
the underlying transport.
187187
</p>
188188
<p>
189-
If a user did not already have a key associated with their account, the web application
189+
If a user does not already have a key associated with their account, the web application
190190
could direct the user agent to either generate a new key or to re-use an existing key of
191-
the user's choosing.
191+
the user's choice.
192192
</p>
193193
</div>
194194

195195
<div id="protected-document" class="section">
196196
<h3>2.2. Protected Document Exchange</h3>
197197
<p>
198-
When exchanging documents that may contain sensitive or personal information, a
199-
web application may wish to ensure that only certain users can view the documents, even
200-
after they have been securely received, such as over TLS. One way that a web application
201-
can do so is by encrypting the documents with a secret key, and then wrapping that key
202-
with the public keys associated with authorized users.
198+
A web application may wish to limit the viewership of documents that contain sensitive or
199+
personal information, even when these documents have been securely received, such as over
200+
TLS.
203201
</p>
204202
<p>
205-
When a user agent navigates to such a web application, the application may send the
206-
encrypted form of the document. The user agent is then instructed to unwrap the encryption
207-
key, using the user's private key, and from there, decrypt and display the document.
203+
Using the Web Cryptography API, the application could do so by encrypting the documents
204+
with a secret key, and then wrapping that key with the public keys associated with the
205+
authorized viewers. When a user agent navigates to such a web application, the
206+
application would send the encrypted form of the document. The user agent is then
207+
instructed to unwrap the encryption key, using the user's private key, and from there,
208+
decrypt and display the document.
208209
</p>
209210
</div>
210211

211212
<div id="cloud-storage" class="section">
212213
<h3>2.3. Cloud Storage</h3>
213214
<p>
214-
When storing data with remote service providers, users may wish to protect the
215-
confidentiality of their documents and data prior to uploading them. The Web
216-
Cryptography API allows an application to have a user select a private or secret key,
217-
to either derive encryption keys from the selected key or to directly encrypt documents
218-
using this key, and then to upload the transformed/encrypted data to the service provider
219-
using existing APIs.
215+
A web application may wish to permit users to protect the confidentiality of data and
216+
documents stored with remote service providers prior to uploading.
217+
</p>
218+
<p>
219+
Using the Web Cryptography API, the application may have a user select a private or
220+
secret key, optionally derive an encryption key from the selected key, encrypt the
221+
document, and then upload the encrypted data to the service provider using existing APIs.
220222
</p>
221223
<p>
222224
This use case is similar to the <a href="#protected-document">Protected Document
223-
Exchange</a> use case because Cloud Storage can be considered as a user exchanging
224-
protected data with himself in the future.
225+
Exchange</a> use case, with viewership of the document limited to the user themself.
225226
</p>
226227
</div>
227228

228229
<div id="document-signing" class="section">
229230
<h3>2.4. Document Signing</h3>
230231
<p>
231232
A web application may wish to accept electronic signatures on documents, in lieu of
232-
requiring physical signatures. An authorized signature may use a key that was
233-
pre-provisioned out-of-band by the web application, or it may be using a key that the
234-
client generated specifically for the web application.
233+
requiring physical signatures.
235234
</p>
236235
<p>
237-
The web application must be able to locate any appropriate keys for signatures, then
238-
direct the user to perform a signing operation over some data, as proof that they accept
239-
the document.
236+
Using the Web Cryptography API, the application may direct the user to select a key,
237+
which may have been pre-provisioned out-of-band, or generated specifically for the web
238+
application. Using this key, the application may perform a signing operation over some
239+
data, as proof that the user accepts the document.
240240
</p>
241241
</div>
242242

243243
<div id="data-integrity-protection" class="section">
244244
<h3>2.5. Data Integrity Protection</h3>
245245
<p>
246-
When caching data locally, an application may wish to ensure that this data cannot be
247-
modified in an offline attack. In such a case, the server may sign the data that it
248-
intends the client to cache, with a private key held by the server. The web application
249-
that subsequently uses this cached data may contain a public key that enables it to
250-
validate that the cache contents have not been modified by anyone else.
246+
A web application may wish to cache data locally, while ensuring that this data cannot be
247+
modified in an offline attack.
248+
</p>
249+
<p>
250+
Using the Web Cryptography API, the application may use a public key contained within the
251+
application to verify the contents of the data cache. Previously, when data was added to
252+
the cache, it would have been signed by the server with the corresponding private key. By
253+
validating the signature when restoring data from the cache, the client ensures that the
254+
cached data has not been tampered with.
251255
</p>
252256
</div>
253257

254258
<div id="secure-messaging" class="section">
255259
<h3>2.6. Secure Messaging</h3>
256260
<p>
257-
In addition to a number of web applications already offering chat based services, the
258-
rise of WebSockets and WebRTC allows a great degree of flexibility in inter-user-agent
259-
messaging. While TLS/DTLS may be used to protect messages to web applications, users
260-
may wish to directly secure messages using schemes such as off-the-record (OTR) messaging.
261+
A web application may wish to employ message layer security using schemes such as
262+
off-the-record (OTR) messaging, even when these messages have been securely received,
263+
such as over TLS.
261264
</p>
262265
<p>
263-
The Web Cryptography API enables OTR, by allowing key agreement to be performed so that
264-
the two parties can negotiate shared encryption keys and message authentication code (MAC)
265-
keys, to allow encryption and decryption of messages, and to prevent tampering of
266-
messages through the MACs.
266+
The Web Cryptography API enables OTR and similar message signing schemes, by allowing key
267+
agreement to be performed. The two parties can negotiate shared encryption keys and
268+
message authentication code (MAC) keys, to allow encryption and decryption of messages,
269+
and to prevent tampering.
267270
</p>
268271
</div>
269272

270273
<div id="jose" class="section">
271274
<h3>2.7. JavaScript Object Signing and Encryption (JOSE)</h3>
272275
<p>
273-
A web application wishes to make use of the structures and format of
274-
messages defined by the IETF JavaScript Object Signing and Encryption
275-
(JOSE) Working Group. The web application wishes to manipulate public
276-
keys encoded in the JSON key format (JWK), messages that have been
277-
integrity protected using digital signatures or MACs (JWS), or that
278-
have been encrypted (JWE).
276+
A web application may wish to interact with the structures and message formats defined by
277+
the IETF JavaScript Object Signing and Encryption (JOSE) Working Group.
278+
</p>
279+
<p>
280+
Using the Web Cryptography API, the application may read and import keys encoded in the
281+
JSON key format (JWK), validate messages that have been integrity protected using digital
282+
signatures or MACs (JWS), or decrypt messages that have been encrypted (JWE).
279283
</p>
280284
</div>
281285

@@ -1297,6 +1301,11 @@ <h3>14.2. Data Types</h3>
12971301

12981302
<div id="subtlecrypto-interface-methods" class="section">
12991303
<h3>14.3. Methods and Parameters</h3>
1304+
<p>
1305+
Objects created by the methods defined in this section shall be associated with the
1306+
<a href="https://www.w3.org/TR/html51/webappapis.html#relevant-global-object">relevant global object</a>
1307+
of <code>this</code> [<a href="#HTML">HTML</a>].
1308+
</p>
13001309
<div class="note"><div class="noteHeader">Note</div>
13011310
<p>
13021311
All errors are reported asynchronously by rejecting the returned
@@ -14832,8 +14841,7 @@ <h3>36.1. Normative References</h3>
1483214841
</dd>
1483314842
<dt id="HTML">HTML</dt>
1483414843
<dd>
14835-
<cite><a href="http://dev.w3.org/html5/spec/Overview.html">HTML5: A vocabulary and
14836-
associated APIs for HTML and XHTML (work in progress)</a></cite>, I. Hickson. W3C.
14844+
<cite><a href="https://www.w3.org/TR/html51">HTML5.1</a></cite>, W3C.
1483714845
</dd>
1483814846
<dt id="X690">ITU-T Recommendation X.690 (11/08)</dt>
1483914847
<dd>

0 commit comments

Comments
 (0)