|
28 | 28 | <link rel="stylesheet" href="//www.w3.org/StyleSheets/TR/2016/W3C-ED" type="text/css" /></head>
|
29 | 29 |
|
30 | 30 | <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 < [email protected]></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 < [email protected]></dd><dt>Participate:</dt><dd><a href="https://github.com/w3c/webcrypto">We are on GitHub</a>. |
32 | 32 | </dd><dd>
|
33 | 33 | 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>).
|
34 | 34 | </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>
|
60 | 60 | report can be found in the <a href="http://www.w3.org/TR/">W3C technical
|
61 | 61 | reports index</a> at http://www.w3.org/TR/.
|
62 | 62 | </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 |
64 | 64 | <cite>Web Cryptography API</cite> specification.
|
65 | 65 |
|
66 | 66 | Please send comments about this document to
|
@@ -171,111 +171,115 @@ <h3>2.1. Multi-factor Authentication</h3>
|
171 | 171 | A web application may wish to extend or replace existing username/password based
|
172 | 172 | authentication schemes with authentication methods based on proving that the user has
|
173 | 173 | 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. |
176 | 176 | </p>
|
177 | 177 | <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. |
182 | 182 | </p>
|
183 | 183 | <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. |
187 | 187 | </p>
|
188 | 188 | <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 |
190 | 190 | 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. |
192 | 192 | </p>
|
193 | 193 | </div>
|
194 | 194 |
|
195 | 195 | <div id="protected-document" class="section">
|
196 | 196 | <h3>2.2. Protected Document Exchange</h3>
|
197 | 197 | <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. |
203 | 201 | </p>
|
204 | 202 | <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. |
208 | 209 | </p>
|
209 | 210 | </div>
|
210 | 211 |
|
211 | 212 | <div id="cloud-storage" class="section">
|
212 | 213 | <h3>2.3. Cloud Storage</h3>
|
213 | 214 | <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. |
220 | 222 | </p>
|
221 | 223 | <p>
|
222 | 224 | 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. |
225 | 226 | </p>
|
226 | 227 | </div>
|
227 | 228 |
|
228 | 229 | <div id="document-signing" class="section">
|
229 | 230 | <h3>2.4. Document Signing</h3>
|
230 | 231 | <p>
|
231 | 232 | 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. |
235 | 234 | </p>
|
236 | 235 | <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. |
240 | 240 | </p>
|
241 | 241 | </div>
|
242 | 242 |
|
243 | 243 | <div id="data-integrity-protection" class="section">
|
244 | 244 | <h3>2.5. Data Integrity Protection</h3>
|
245 | 245 | <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. |
251 | 255 | </p>
|
252 | 256 | </div>
|
253 | 257 |
|
254 | 258 | <div id="secure-messaging" class="section">
|
255 | 259 | <h3>2.6. Secure Messaging</h3>
|
256 | 260 | <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. |
261 | 264 | </p>
|
262 | 265 | <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. |
267 | 270 | </p>
|
268 | 271 | </div>
|
269 | 272 |
|
270 | 273 | <div id="jose" class="section">
|
271 | 274 | <h3>2.7. JavaScript Object Signing and Encryption (JOSE)</h3>
|
272 | 275 | <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). |
279 | 283 | </p>
|
280 | 284 | </div>
|
281 | 285 |
|
@@ -1297,6 +1301,11 @@ <h3>14.2. Data Types</h3>
|
1297 | 1301 |
|
1298 | 1302 | <div id="subtlecrypto-interface-methods" class="section">
|
1299 | 1303 | <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> |
1300 | 1309 | <div class="note"><div class="noteHeader">Note</div>
|
1301 | 1310 | <p>
|
1302 | 1311 | All errors are reported asynchronously by rejecting the returned
|
@@ -14832,8 +14841,7 @@ <h3>36.1. Normative References</h3>
|
14832 | 14841 | </dd>
|
14833 | 14842 | <dt id="HTML">HTML</dt>
|
14834 | 14843 | <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. |
14837 | 14845 | </dd>
|
14838 | 14846 | <dt id="X690">ITU-T Recommendation X.690 (11/08)</dt>
|
14839 | 14847 | <dd>
|
|
0 commit comments