--- a/spec/Overview-WebCryptoAPI.xml Tue May 21 13:01:23 2013 -0500
+++ b/spec/Overview-WebCryptoAPI.xml Mon Jun 03 13:06:59 2013 -0700
@@ -508,9 +508,10 @@
<p>
A <a href="#dfn-conforming-implementation">conforming user agent</a> MUST support at
least the subset of the functionality defined in DOM4 that this specification relies
- upon; in particular, it MUST support <code>EventTarget</code>.
+ upon; in particular, it MUST support <code>Futures</code> and <code>EventTarget</code>.
[<a href="#DOM4">DOM4</a>]
</p>
+ <div class="ednote">The dependency on <code>EventTarget</code> is in progress of being removed.</div>
</dd>
<dt>HTML</dt>
<dd>
@@ -1249,19 +1250,7 @@
</div>
</div>
</div>
-
- <div id="KeyOperation-interface" class="section">
- <h2>KeyOperation interface</h2>
- <x:codeblock language="idl">
-interface <dfn id="dfn-KeyOperation">KeyOperation</dfn> : EventTarget {
- readonly attribute any <dfn id="dfn-KeyOperation-result">result</dfn>;
-
- [TreatNonCallableAsNull] attribute Function? <dfn id="dfn-KeyOperation-onerror">onerror</dfn>;
- [TreatNonCallableAsNull] attribute Function? <dfn id="dfn-KeyOperation-oncomplete">oncomplete</dfn>;
-};
- </x:codeblock>
- </div>
-
+
<div id="crypto-interface" class="section">
<h2>Crypto interface</h2>
<x:codeblock language="idl">
@@ -1309,35 +1298,35 @@
optional ArrayBufferView? buffer = null);
<span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/36">ISSUE-36</a></span>
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
- <a href="#dfn-Key">Key</a> baseKey,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? derivedKeyType,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+ <a href="#dfn-Key">Key</a> baseKey,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? derivedKeyType,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
<span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/35">ISSUE-35</a></span>
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
- ArrayBufferView keyData,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? algorithm,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
+ Future<any> <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+ ArrayBufferView keyData,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? algorithm,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
<span class="comment">// Note: wrap and unwrap remain "Features at Risk"</span>
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
- <a href="#dfn-Key">Key</a> key,
- <a href="#dfn-Key">Key</a> wrappingKey,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
- ArrayBufferView wrappedKey,
- <a href="#dfn-Key">Key</a> unwrappingKey,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier?</a> unwrappedKeyAlgorithm,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+ <a href="#dfn-Key">Key</a> key,
+ <a href="#dfn-Key">Key</a> wrappingKey,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
+ Future<any> <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+ ArrayBufferView wrappedKey,
+ <a href="#dfn-Key">Key</a> unwrappingKey,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier?</a> unwrappedKeyAlgorithm,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
};
</x:codeblock>
<div class="ednote">
@@ -1891,7 +1880,7 @@
<div id="SubtleCrypto-method-generateKey" class="section">
<h4>The generateKey method</h4>
- <p>
+ <p>
When invoked, <dfn id="dfn-SubtleCrypto-method-generateKey"><code>generateKey</code></dfn> <span class="RFC2119">MUST</span> perform the following steps:
</p>
<ol>
@@ -1912,56 +1901,45 @@
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Return <var>keyOp</var> to the task that invoked this <code>generateKey</code>, while
- continuing the remaining steps of this algorithm.
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ If an error occurs, run these substeps and then terminate the algorithm:
</p>
+ <div class="ednote">Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- Invoke the algorithm-specific key generation method.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- If an error occured, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the algorithm-specific key generation method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the key generation algorithm
+ defined by the algorithm indicated in <var>normalizedAlgorithm</var>.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
@@ -1988,66 +1966,52 @@
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Return <var>keyOp</var> to the task that invoked this <code>generateKey</code>, while
- continuing the remaining steps of this algorithm.
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ If an error occurs, run these substeps and then terminate the algorithm:
</p>
+ <div class="ednote">Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- If <var>baseKey</var>.<a href="#dfn-Key-keyUsage"><code>keyUsage</code></a> does not
- contain the <code>"derive"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- Invoke the algorithm-specific key generation method.
- </p>
- </li>
- <li>
- <p>
- If an error occured, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the algorithm-specific key derivation method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ If <var>baseKey</var>.<a href="#dfn-Key-keyUsage"><code>keyUsage</code></a> does not
+ contain the <code>"derive"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the key derivation algorithm
+ defined by the algorithm indicated in <var>normalizedAlgorithm</var>.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
@@ -2076,99 +2040,83 @@
<li>
<p>
If <var>normalizedAlgorithm</var> does not describe a
- <a href="#algorithms">registered algorithm</a> that supports the wrapKey
+ <a href="#algorithms">registered algorithm</a> that supports the derive
operation, throw a <code>NotSupportedError</code> and
<a href="#terminate-the-algorithm">terminate the algorithm</a>.
</p>
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
- </p>
- </li>
- <li>
- <p>
- Return <var>keyOp</var> to the task that invoked this <code>wrapKey</code>, while
- continuing the remaining steps of this algorithm.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
+ </li>
+ <li>
+ <p>
+ If an error occurs, run these substeps and then terminate the algorithm:
+ </p>
+ <div class="ednote">Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- If <var>wrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
- contain the <code>"wrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- If <var>Key</var>.<a href="#dfn-Key-extractable"><code>extractable</code></a> is not true,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>
- algorithm, with the <var>keyFormat</var> as <code>keyFormat</code> and with <var>key</var> as
- <code>key</code>.
- </p>
- </li>
- <li>
- <p>
- If the key export algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>
- algorithm, with <var>wrappingKey</var> as <code>Key</code>, <var>normalizedAlgorithm</var> as
- <code>algorithm</code>, and with <var>bytes</var> as <code>buffer</code>.
- </p>
- </li>
- <li>
- <p>
- If the encrypt algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the encrypt method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ If <var>wrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
+ contain the <code>"wrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ If <var>Key</var>.<a href="#dfn-Key-extractable"><code>extractable</code></a> is not true,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>
+ algorithm, with the <var>keyFormat</var> as <code>keyFormat</code> and with <var>key</var> as
+ <code>key</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the key export algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>
+ algorithm, with <var>wrappingKey</var> as <code>Key</code>, <var>normalizedAlgorithm</var> as
+ <code>algorithm</code>, and with <var>bytes</var> as <code>buffer</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the encrypt algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
@@ -2222,84 +2170,78 @@
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
- </p>
- </li>
- <li>
- <p>
- Return <var>keyOp</var> to the task that invoked this <code>unwrapKey</code>, while
- continuing the remaining steps of this algorithm.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
+ </li>
+ <li>
+ <p>
+ If an error occurs, run these substeps and then terminate the algorithm:
+ </p>
+ <div class="ednote">Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- If <var>unwrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
- contain the <code>"unwrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a>
- algorithm, with <var>unwrapAlgorithm</var> as <code>algorithm</code>, <var>unwrapKey</var>
- as <code>key</code>, and with <var>wrappedKey</var> as <code>buffer</code>.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- If the key decrypt algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrytpo-method-importKey">importKey</a>
- algorithm, with <var>format</var> as <code>format</code>, with <var>bytes</var> as
- <code>keyData</code>, with <var>unwrappedKeyAlgorithm</var> as <code>algorithm</code>, with <var>extractable</var>
- as <code>extractable</code>, and <var>keyUsages</var> as <code>keyUsages</code>.
- </p>
- </li>
- <li>
- <p>
- If the key import algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the algorithm-specific key unwrapping method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ If <var>unwrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
+ contain the <code>"unwrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ If <var>Key</var>.<a href="#dfn-Key-extractable"><code>extractable</code></a> is not true,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a>
+ algorithm, with <var>unwrapAlgorithm</var> as <code>algorithm</code>, <var>unwrapKey</var>
+ as <code>key</code>, and with <var>wrappedKey</var> as <code>buffer</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the key decrypt algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrytpo-method-importKey">importKey</a>
+ algorithm, with <var>format</var> as <code>format</code>, with <var>bytes</var> as
+ <code>keyData</code>, with <var>unwrappedKeyAlgorithm</var> as <code>algorithm</code>, with <var>extractable</var>
+ as <code>extractable</code>, and <var>keyUsages</var> as <code>keyUsages</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the key import algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
</div>
@@ -4024,8 +3966,9 @@
<dl>
<dt id="DOM4">DOM4</dt>
<dd>
- <cite><a href="http://www.w3.org/TR/domcore/">DOM4 (work in progress)</a></cite>,
- A. Gregor, A. van Kesteren, Ms2ger. W3C.
+ <cite><a href="http://dom.spec.whatwg.org/">DOM (Living Standard)</a></cite>,
+ A. Gregor, A. van Kesteren, Ms2ger. WHATWG.
+ <div class="ednote">This will be updated to W3C DOM4 once Futures/Promises are incorporated.</div>
</dd>
<dt id="ECMA-262">ECMAScript</dt>
<dd>
--- a/spec/Overview.html Tue May 21 13:01:23 2013 -0500
+++ b/spec/Overview.html Mon Jun 03 13:06:59 2013 -0700
@@ -33,7 +33,7 @@
<link rel="stylesheet" href="//www.w3.org/StyleSheets/TR/W3C-ED" type="text/css" /></head>
<body>
- <div class="head"><div><a href="http://www.w3.org/"><img src="//www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></div><h1>Web Cryptography API</h1><h2>W3C Editor’s Draft <em>21 May 2013</em></h2><dl><dt>Latest Editor’s Draft:</dt><dd><a href="http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html">http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/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>Editors:</dt><dd><a href="http://ddahl.com/">David Dahl</a>, Mozilla Corporation <ddahl@mozilla.com></dd><dd><a href="http://www.google.com/">Ryan Sleevi</a>, Google, Inc. <sleevi@google.com></dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:public-webcrypto@w3.org?subject=%5BWebCryptoAPI%5D">public-webcrypto@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/public-webcrypto/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=Web%20Cryptography&component=Web%20Cryptography%20API%20Document">file a bug</a>
+ <div class="head"><div><a href="http://www.w3.org/"><img src="//www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></div><h1>Web Cryptography API</h1><h2>W3C Editor’s Draft <em>3 June 2013</em></h2><dl><dt>Latest Editor’s Draft:</dt><dd><a href="http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html">http://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/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>Editors:</dt><dd><a href="http://ddahl.com/">David Dahl</a>, Mozilla Corporation <ddahl@mozilla.com></dd><dd><a href="http://www.google.com/">Ryan Sleevi</a>, Google, Inc. <sleevi@google.com></dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:public-webcrypto@w3.org?subject=%5BWebCryptoAPI%5D">public-webcrypto@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/public-webcrypto/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=Web%20Cryptography&component=Web%20Cryptography%20API%20Document">file a bug</a>
(see <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=Web%20Cryptography&component=Web%20Cryptography%20API%20Document&resolution=---">existing bugs</a>).</p></dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © view <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.org/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p></div><hr />
<div class="section">
@@ -49,7 +49,7 @@
communications.
</p>
- <div class="ednote"><div class="ednoteHeader">Editorial note</div><p>There are 17 further editorial notes in the document.</p></div>
+ <div class="ednote"><div class="ednoteHeader">Editorial note</div><p>There are 23 further editorial notes in the document.</p></div>
</div>
<div class="section">
@@ -61,7 +61,7 @@
report can be found in the <a href="http://www.w3.org/TR/">W3C technical
reports index</a> at http://www.w3.org/TR/.
</em></p><p>
- This document is the 21 May 2013 <b>Editor’s Draft</b> of the
+ This document is the 3 June 2013 <b>Editor’s Draft</b> of the
<cite>Web Cryptography API</cite> specification.
Please send comments about this document to
@@ -141,7 +141,7 @@
<div id="toc">
<h2>Table of Contents</h2>
- <div class="toc"><ul><li><a href="#introduction">1. Introduction</a></li><li><a href="#use-cases">2. Use Cases</a><ul><li><a href="#multifactor-authentication">2.1. Multi-factor Authentication</a></li><li><a href="#protected-document">2.2. Protected Document Exchange</a></li><li><a href="#cloud-storage">2.3. Cloud Storage</a></li><li><a href="#document-signing">2.4. Document Signing</a></li><li><a href="#data-integrity-protection">2.5. Data Integrity Protection</a></li><li><a href="#secure-messaging">2.6. Secure Messaging</a></li><li><a href="#jose">2.7. Javascript Object Signing and Encryption (JOSE)</a></li></ul></li><li><a href="#conformance">3. Conformance</a></li><li><a href="#scope">4. Scope</a><ul><li><a href="#scope-abstraction">4.1. Level of abstraction</a></li><li><a href="#scope-algorithms">4.2. Cryptographic algorithms</a></li><li><a href="#scope-operations">4.3. Operations</a></li><li><a href="#scope-out-of-scope">4.4. Out of scope</a></li></ul></li><li><a href="#security">5. Security considerations</a><ul><li><a href="#security-implementers">5.1. Security considerations for implementers</a></li><li><a href="#security-developers">5.2. Security considerations for developers</a></li></ul></li><li><a href="#privacy">6. Privacy considerations</a></li><li><a href="#dependencies">7. Dependencies</a></li><li><a href="#terminology">8. Terminology</a></li><li><a href="#RandomSource-interface">9. RandomSource interface</a><ul><li><a href="#RandomSource-description">9.1. Description</a></li><li><a href="#RandomSource-interface-methods">9.2. Methods and Parameters</a><ul><li><a href="#RandomSource-method-getRandomValues">9.2.1. The getRandomValues method</a></li></ul></li></ul></li><li><a href="#algorithm-dictionary">10. Algorithm dictionary</a><ul><li><a href="#algorithm-dictionary-members">10.1. Algorithm Dictionary Members</a></li></ul></li><li><a href="#key-interface">11. Key interface</a><ul><li><a href="#key-interface-description">11.1. Description</a></li><li><a href="#key-interface-members">11.2. Key interface members</a></li><li><a href="#key-interface-clone">11.3. Structured clone algorithm</a></li></ul></li><li><a href="#cryptooperation-interface">12. CryptoOperation interface</a><ul><li><a href="#CryptoOperation-processing-model">12.1. Processing Model</a></li><li><a href="#cryptooperation-events">12.2. Event Handler Attributes</a></li><li><a href="#CryptoOperation-attributes">12.3. Attributes</a></li><li><a href="#CryptoOperation-methods">12.4. Methods</a><ul><li><a href="#CryptoOperation-method-process">12.4.1. process(ArrayBufferView data)</a></li><li><a href="#CryptoOperation-method-finish">12.4.2. The finish() method</a></li><li><a href="#CryptoOperation-method-abort">12.4.3. The abort() method</a></li></ul></li></ul></li><li><a href="#KeyOperation-interface">13. KeyOperation interface</a></li><li><a href="#crypto-interface">14. Crypto interface</a></li><li><a href="#subtlecrypto-interface">15. SubtleCrypto interface</a><ul><li><a href="#subtlecrypto-interface-description">15.1. Description</a></li><li><a href="#subtlecrypto-interface-methods">15.2. Methods and Parameters</a><ul><li><a href="#SubtleCrypto-method-encrypt">15.2.1. The encrypt method</a></li><li><a href="#SubtleCrypto-method-decrypt">15.2.2. The decrypt method</a></li><li><a href="#SubtleCrypto-method-sign">15.2.3. The sign method</a></li><li><a href="#SubtleCrypto-method-verify">15.2.4. The verify method</a></li><li><a href="#SubtleCrypto-method-digest">15.2.5. The digest method</a></li><li><a href="#SubtleCrypto-method-generateKey">15.2.6. The generateKey method</a></li><li><a href="#SubtleCrypto-method-deriveKey">15.2.7. The deriveKey method</a></li><li><a href="#SubtleCrypto-method-importKey">15.2.8. The importKey method</a></li><li><a href="#SubtleCrypto-method-exportKey">15.2.9. The exportKey method</a></li><li><a href="#SubtleCrypto-method-wrapKey">15.2.10. The wrapKey method</a></li><li><a href="#SubtleCrypto-method-unwrapKey">15.2.11. The unwrapKey method</a></li></ul></li></ul></li><li><a href="#WorkerCrypto-interface">16. WorkerCrypto interface</a><ul><li><a href="#WorkerCrypto-description">16.1. Description</a></li></ul></li><li><a href="#big-integer">17. BigInteger</a></li><li><a href="#keypair">18. KeyPair</a></li><li><a href="#algorithms">19. Algorithms</a><ul><li><a href="#recommended-algorithms">19.1. Recommended algorithms</a></li><li><a href="#defining-an-algorithm">19.2. Defining an algorithm</a><ul><li><a href="#recognized-algorithm-name">19.2.1. Recognized algorithm name</a></li><li><a href="#supported-operations">19.2.2. Supported operations</a></li><li><a href="#algorithm-specific-params">19.2.3. Algorithm-specific parameters</a></li><li><a href="#algorithm-result">19.2.4. Algorithm results</a></li><li><a href="#algorithm-alias">19.2.5. Algorithm aliases</a></li></ul></li><li><a href="#rsaes-pkcs1">19.3. RSAES-PKCS1-v1_5</a><ul><li><a href="#rsaes-pkcs1-description">19.3.1. Description</a></li><li><a href="#rsaes-pkcs1-registration">19.3.2. Registration</a></li><li><a href="#RsaKeyGenParams-dictionary">19.3.3. RsaKeyGenParams dictionary</a></li><li><a href="#rsaes-pkcs1-operations">19.3.4. Operations</a></li></ul></li><li><a href="#rsassa-pkcs1">19.4. RSASSA-PKCS1-v1_5</a><ul><li><a href="#rsassa-pkcs1-description">19.4.1. Description</a></li><li><a href="#rsassa-pkcs1-registration">19.4.2. Registration</a></li><li><a href="#RsaSsaParams-dictionary">19.4.3. RsaSsaParams dictionary</a></li><li><a href="#rsassa-pkcs1-operations">19.4.4. Operations</a></li></ul></li><li><a href="#rsa-pss">19.5. RSA-PSS</a><ul><li><a href="#rsa-pss-description">19.5.1. Description</a></li><li><a href="#rsa-pss-registration">19.5.2. Registration</a></li><li><a href="#rsa-pss-params">19.5.3. RsaPssParams dictionary</a></li><li><a href="#rsa-pss-operations">19.5.4. Operations</a></li></ul></li><li><a href="#rsa-oaep">19.6. RSA-OAEP</a><ul><li><a href="#rsa-oaep-description">19.6.1. Description</a></li><li><a href="#rsa-oaep-registration">19.6.2. Registration</a></li><li><a href="#rsa-oaep-params">19.6.3. RsaOaepParams dictionary</a></li><li><a href="#rsa-oaep-operations">19.6.4. Operations</a></li></ul></li><li><a href="#ecdsa">19.7. ECDSA</a><ul><li><a href="#ecdsa-description">19.7.1. Description</a></li><li><a href="#ecdsa-registration">19.7.2. Registration</a></li><li><a href="#EcdsaParams-dictionary">19.7.3. EcdsaParams dictionary</a></li><li><a href="#EcKeyGenParams-dictionary">19.7.4. EcKeyGenParams dictionary</a></li><li><a href="#ecdsa-operations">19.7.5. Operations</a></li></ul></li><li><a href="#ecdh">19.8. ECDH</a><ul><li><a href="#ecdh-description">19.8.1. Description</a></li><li><a href="#ecdh-registration">19.8.2. Registration</a></li><li><a href="#dh-EcdhKeyDeriveParams">19.8.3. EcdhKeyDeriveParams dictionary</a></li><li><a href="#ecdh-operations">19.8.4. Operations</a></li></ul></li><li><a href="#aes-ctr">19.9. AES-CTR</a><ul><li><a href="#aes-ctr-description">19.9.1. Description</a></li><li><a href="#aes-ctr-registration">19.9.2. Registration</a></li><li><a href="#aes-ctr-params">19.9.3. AesCtrParams dictionary</a></li><li><a href="#aes-keygen-params">19.9.4. AesKeyGenParams dictionary</a></li><li><a href="#aes-ctr-operations">19.9.5. Operations</a></li></ul></li><li><a href="#aes-cbc">19.10. AES-CBC</a><ul><li><a href="#aes-cbc-description">19.10.1. Description</a></li><li><a href="#aes-cbc-registration">19.10.2. Registration</a></li><li><a href="#aes-cbc-params">19.10.3. AesCbcParams dictionary</a></li><li><a href="#aes-cbc-operations">19.10.4. Operations</a></li></ul></li><li><a href="#aes-cmac">19.11. AES-CMAC</a><ul><li><a href="#aes-cmac-description">19.11.1. Description</a></li><li><a href="#aes-cmac-registration">19.11.2. Registration</a></li><li><a href="#aes-cmac-operations">19.11.3. Operations</a></li></ul></li><li><a href="#aes-gcm">19.12. AES-GCM</a><ul><li><a href="#aes-gcm-description">19.12.1. Description</a></li><li><a href="#aes-gcm-registration">19.12.2. Registration</a></li><li><a href="#aes-gcm-params">19.12.3. AesGcmParams dictionary</a></li><li><a href="#aes-gcm-operations">19.12.4. Operations</a></li></ul></li><li><a href="#aes-cfb">19.13. AES-CFB</a><ul><li><a href="#aes-cfb-description">19.13.1. Description</a></li><li><a href="#aes-cfb-registration">19.13.2. Registration</a></li><li><a href="#aes-cfb-params">19.13.3. AesCfbParams dictionary</a></li><li><a href="#aes-cfb-operations">19.13.4. Operations</a></li></ul></li><li><a href="#hmac">19.14. HMAC</a><ul><li><a href="#hmac-description">19.14.1. Description</a></li><li><a href="#hmac-registration">19.14.2. Registration</a></li><li><a href="#hmac-params">19.14.3. HmacParams dictionary</a></li><li><a href="#hmac-operations">19.14.4. Operations</a></li></ul></li><li><a href="#dh">19.15. Diffie-Hellman</a><ul><li><a href="#dh-description">19.15.1. Description</a></li><li><a href="#dh-registration">19.15.2. Registration</a></li><li><a href="#dh-DhKeyGenParams">19.15.3. DhKeyGenParams dictionary</a></li><li><a href="#dh-DhKeyDeriveParams">19.15.4. DhKeyDeriveParams dictionary</a></li><li><a href="#dh-operations">19.15.5. Operations</a></li></ul></li><li><a href="#sha">19.16. SHA</a><ul><li><a href="#sha-description">19.16.1. Description</a></li><li><a href="#sha-registration">19.16.2. Registration</a></li><li><a href="#sha-operations">19.16.3. Operations</a></li></ul></li><li><a href="#concatkdf">19.17. Concat KDF</a><ul><li><a href="#concatkdf-description">19.17.1. Description</a></li><li><a href="#concatkdf-registration">19.17.2. Registration</a></li><li><a href="#concat-params">19.17.3. ConcatParams dictionary</a></li><li><a href="#concat-operations">19.17.4. Operations</a></li></ul></li><li><a href="#hkdf-ctr">19.18. HKDF-CTR</a><ul><li><a href="#hkdf-ctr-description">19.18.1. Description</a></li><li><a href="#hkdf-ctr-registration">19.18.2. Registration</a></li><li><a href="#hkdf-ctr-params">19.18.3. HkdfCtrParams dictionary</a></li><li><a href="#hkdf2-ctr-operations">19.18.4. Operations</a></li></ul></li><li><a href="#pbkdf2">19.19. PBKDF2</a><ul><li><a href="#pbkdf2-description">19.19.1. Description</a></li><li><a href="#pbkdf2-registration">19.19.2. Registration</a></li><li><a href="#pbkdf2-params">19.19.3. Pbkdf2Params dictionary</a></li><li><a href="#pbkdf2-operations">19.19.4. Operations</a></li></ul></li></ul></li><li><a href="#algorithm-normalizing-rules">20. Algorithm normalizing rules</a></li><li><a href="#examples-section">21. JavaScript Example Code</a><ul><li><a href="#examples-signing">21.1. Generate a signing key pair, sign some data</a></li><li><a href="#examples-symmetric-encryption">21.2. Symmetric Encryption</a></li></ul></li><li><a href="#acknowledgements-section">22. Acknowledgements</a></li><li><a href="#references">23. References</a><ul><li><a href="#normative-references">23.1. Normative References</a></li><li><a href="#informative-references">23.2. Informative References</a></li></ul></li></ul></div>
+ <div class="toc"><ul><li><a href="#introduction">1. Introduction</a></li><li><a href="#use-cases">2. Use Cases</a><ul><li><a href="#multifactor-authentication">2.1. Multi-factor Authentication</a></li><li><a href="#protected-document">2.2. Protected Document Exchange</a></li><li><a href="#cloud-storage">2.3. Cloud Storage</a></li><li><a href="#document-signing">2.4. Document Signing</a></li><li><a href="#data-integrity-protection">2.5. Data Integrity Protection</a></li><li><a href="#secure-messaging">2.6. Secure Messaging</a></li><li><a href="#jose">2.7. Javascript Object Signing and Encryption (JOSE)</a></li></ul></li><li><a href="#conformance">3. Conformance</a></li><li><a href="#scope">4. Scope</a><ul><li><a href="#scope-abstraction">4.1. Level of abstraction</a></li><li><a href="#scope-algorithms">4.2. Cryptographic algorithms</a></li><li><a href="#scope-operations">4.3. Operations</a></li><li><a href="#scope-out-of-scope">4.4. Out of scope</a></li></ul></li><li><a href="#security">5. Security considerations</a><ul><li><a href="#security-implementers">5.1. Security considerations for implementers</a></li><li><a href="#security-developers">5.2. Security considerations for developers</a></li></ul></li><li><a href="#privacy">6. Privacy considerations</a></li><li><a href="#dependencies">7. Dependencies</a></li><li><a href="#terminology">8. Terminology</a></li><li><a href="#RandomSource-interface">9. RandomSource interface</a><ul><li><a href="#RandomSource-description">9.1. Description</a></li><li><a href="#RandomSource-interface-methods">9.2. Methods and Parameters</a><ul><li><a href="#RandomSource-method-getRandomValues">9.2.1. The getRandomValues method</a></li></ul></li></ul></li><li><a href="#algorithm-dictionary">10. Algorithm dictionary</a><ul><li><a href="#algorithm-dictionary-members">10.1. Algorithm Dictionary Members</a></li></ul></li><li><a href="#key-interface">11. Key interface</a><ul><li><a href="#key-interface-description">11.1. Description</a></li><li><a href="#key-interface-members">11.2. Key interface members</a></li><li><a href="#key-interface-clone">11.3. Structured clone algorithm</a></li></ul></li><li><a href="#cryptooperation-interface">12. CryptoOperation interface</a><ul><li><a href="#CryptoOperation-processing-model">12.1. Processing Model</a></li><li><a href="#cryptooperation-events">12.2. Event Handler Attributes</a></li><li><a href="#CryptoOperation-attributes">12.3. Attributes</a></li><li><a href="#CryptoOperation-methods">12.4. Methods</a><ul><li><a href="#CryptoOperation-method-process">12.4.1. process(ArrayBufferView data)</a></li><li><a href="#CryptoOperation-method-finish">12.4.2. The finish() method</a></li><li><a href="#CryptoOperation-method-abort">12.4.3. The abort() method</a></li></ul></li></ul></li><li><a href="#crypto-interface">13. Crypto interface</a></li><li><a href="#subtlecrypto-interface">14. SubtleCrypto interface</a><ul><li><a href="#subtlecrypto-interface-description">14.1. Description</a></li><li><a href="#subtlecrypto-interface-methods">14.2. Methods and Parameters</a><ul><li><a href="#SubtleCrypto-method-encrypt">14.2.1. The encrypt method</a></li><li><a href="#SubtleCrypto-method-decrypt">14.2.2. The decrypt method</a></li><li><a href="#SubtleCrypto-method-sign">14.2.3. The sign method</a></li><li><a href="#SubtleCrypto-method-verify">14.2.4. The verify method</a></li><li><a href="#SubtleCrypto-method-digest">14.2.5. The digest method</a></li><li><a href="#SubtleCrypto-method-generateKey">14.2.6. The generateKey method</a></li><li><a href="#SubtleCrypto-method-deriveKey">14.2.7. The deriveKey method</a></li><li><a href="#SubtleCrypto-method-importKey">14.2.8. The importKey method</a></li><li><a href="#SubtleCrypto-method-exportKey">14.2.9. The exportKey method</a></li><li><a href="#SubtleCrypto-method-wrapKey">14.2.10. The wrapKey method</a></li><li><a href="#SubtleCrypto-method-unwrapKey">14.2.11. The unwrapKey method</a></li></ul></li></ul></li><li><a href="#WorkerCrypto-interface">15. WorkerCrypto interface</a><ul><li><a href="#WorkerCrypto-description">15.1. Description</a></li></ul></li><li><a href="#big-integer">16. BigInteger</a></li><li><a href="#keypair">17. KeyPair</a></li><li><a href="#algorithms">18. Algorithms</a><ul><li><a href="#recommended-algorithms">18.1. Recommended algorithms</a></li><li><a href="#defining-an-algorithm">18.2. Defining an algorithm</a><ul><li><a href="#recognized-algorithm-name">18.2.1. Recognized algorithm name</a></li><li><a href="#supported-operations">18.2.2. Supported operations</a></li><li><a href="#algorithm-specific-params">18.2.3. Algorithm-specific parameters</a></li><li><a href="#algorithm-result">18.2.4. Algorithm results</a></li><li><a href="#algorithm-alias">18.2.5. Algorithm aliases</a></li></ul></li><li><a href="#rsaes-pkcs1">18.3. RSAES-PKCS1-v1_5</a><ul><li><a href="#rsaes-pkcs1-description">18.3.1. Description</a></li><li><a href="#rsaes-pkcs1-registration">18.3.2. Registration</a></li><li><a href="#RsaKeyGenParams-dictionary">18.3.3. RsaKeyGenParams dictionary</a></li><li><a href="#rsaes-pkcs1-operations">18.3.4. Operations</a></li></ul></li><li><a href="#rsassa-pkcs1">18.4. RSASSA-PKCS1-v1_5</a><ul><li><a href="#rsassa-pkcs1-description">18.4.1. Description</a></li><li><a href="#rsassa-pkcs1-registration">18.4.2. Registration</a></li><li><a href="#RsaSsaParams-dictionary">18.4.3. RsaSsaParams dictionary</a></li><li><a href="#rsassa-pkcs1-operations">18.4.4. Operations</a></li></ul></li><li><a href="#rsa-pss">18.5. RSA-PSS</a><ul><li><a href="#rsa-pss-description">18.5.1. Description</a></li><li><a href="#rsa-pss-registration">18.5.2. Registration</a></li><li><a href="#rsa-pss-params">18.5.3. RsaPssParams dictionary</a></li><li><a href="#rsa-pss-operations">18.5.4. Operations</a></li></ul></li><li><a href="#rsa-oaep">18.6. RSA-OAEP</a><ul><li><a href="#rsa-oaep-description">18.6.1. Description</a></li><li><a href="#rsa-oaep-registration">18.6.2. Registration</a></li><li><a href="#rsa-oaep-params">18.6.3. RsaOaepParams dictionary</a></li><li><a href="#rsa-oaep-operations">18.6.4. Operations</a></li></ul></li><li><a href="#ecdsa">18.7. ECDSA</a><ul><li><a href="#ecdsa-description">18.7.1. Description</a></li><li><a href="#ecdsa-registration">18.7.2. Registration</a></li><li><a href="#EcdsaParams-dictionary">18.7.3. EcdsaParams dictionary</a></li><li><a href="#EcKeyGenParams-dictionary">18.7.4. EcKeyGenParams dictionary</a></li><li><a href="#ecdsa-operations">18.7.5. Operations</a></li></ul></li><li><a href="#ecdh">18.8. ECDH</a><ul><li><a href="#ecdh-description">18.8.1. Description</a></li><li><a href="#ecdh-registration">18.8.2. Registration</a></li><li><a href="#dh-EcdhKeyDeriveParams">18.8.3. EcdhKeyDeriveParams dictionary</a></li><li><a href="#ecdh-operations">18.8.4. Operations</a></li></ul></li><li><a href="#aes-ctr">18.9. AES-CTR</a><ul><li><a href="#aes-ctr-description">18.9.1. Description</a></li><li><a href="#aes-ctr-registration">18.9.2. Registration</a></li><li><a href="#aes-ctr-params">18.9.3. AesCtrParams dictionary</a></li><li><a href="#aes-keygen-params">18.9.4. AesKeyGenParams dictionary</a></li><li><a href="#aes-ctr-operations">18.9.5. Operations</a></li></ul></li><li><a href="#aes-cbc">18.10. AES-CBC</a><ul><li><a href="#aes-cbc-description">18.10.1. Description</a></li><li><a href="#aes-cbc-registration">18.10.2. Registration</a></li><li><a href="#aes-cbc-params">18.10.3. AesCbcParams dictionary</a></li><li><a href="#aes-cbc-operations">18.10.4. Operations</a></li></ul></li><li><a href="#aes-cmac">18.11. AES-CMAC</a><ul><li><a href="#aes-cmac-description">18.11.1. Description</a></li><li><a href="#aes-cmac-registration">18.11.2. Registration</a></li><li><a href="#aes-cmac-operations">18.11.3. Operations</a></li></ul></li><li><a href="#aes-gcm">18.12. AES-GCM</a><ul><li><a href="#aes-gcm-description">18.12.1. Description</a></li><li><a href="#aes-gcm-registration">18.12.2. Registration</a></li><li><a href="#aes-gcm-params">18.12.3. AesGcmParams dictionary</a></li><li><a href="#aes-gcm-operations">18.12.4. Operations</a></li></ul></li><li><a href="#aes-cfb">18.13. AES-CFB</a><ul><li><a href="#aes-cfb-description">18.13.1. Description</a></li><li><a href="#aes-cfb-registration">18.13.2. Registration</a></li><li><a href="#aes-cfb-params">18.13.3. AesCfbParams dictionary</a></li><li><a href="#aes-cfb-operations">18.13.4. Operations</a></li></ul></li><li><a href="#hmac">18.14. HMAC</a><ul><li><a href="#hmac-description">18.14.1. Description</a></li><li><a href="#hmac-registration">18.14.2. Registration</a></li><li><a href="#hmac-params">18.14.3. HmacParams dictionary</a></li><li><a href="#hmac-operations">18.14.4. Operations</a></li></ul></li><li><a href="#dh">18.15. Diffie-Hellman</a><ul><li><a href="#dh-description">18.15.1. Description</a></li><li><a href="#dh-registration">18.15.2. Registration</a></li><li><a href="#dh-DhKeyGenParams">18.15.3. DhKeyGenParams dictionary</a></li><li><a href="#dh-DhKeyDeriveParams">18.15.4. DhKeyDeriveParams dictionary</a></li><li><a href="#dh-operations">18.15.5. Operations</a></li></ul></li><li><a href="#sha">18.16. SHA</a><ul><li><a href="#sha-description">18.16.1. Description</a></li><li><a href="#sha-registration">18.16.2. Registration</a></li><li><a href="#sha-operations">18.16.3. Operations</a></li></ul></li><li><a href="#concatkdf">18.17. Concat KDF</a><ul><li><a href="#concatkdf-description">18.17.1. Description</a></li><li><a href="#concatkdf-registration">18.17.2. Registration</a></li><li><a href="#concat-params">18.17.3. ConcatParams dictionary</a></li><li><a href="#concat-operations">18.17.4. Operations</a></li></ul></li><li><a href="#hkdf-ctr">18.18. HKDF-CTR</a><ul><li><a href="#hkdf-ctr-description">18.18.1. Description</a></li><li><a href="#hkdf-ctr-registration">18.18.2. Registration</a></li><li><a href="#hkdf-ctr-params">18.18.3. HkdfCtrParams dictionary</a></li><li><a href="#hkdf2-ctr-operations">18.18.4. Operations</a></li></ul></li><li><a href="#pbkdf2">18.19. PBKDF2</a><ul><li><a href="#pbkdf2-description">18.19.1. Description</a></li><li><a href="#pbkdf2-registration">18.19.2. Registration</a></li><li><a href="#pbkdf2-params">18.19.3. Pbkdf2Params dictionary</a></li><li><a href="#pbkdf2-operations">18.19.4. Operations</a></li></ul></li></ul></li><li><a href="#algorithm-normalizing-rules">19. Algorithm normalizing rules</a></li><li><a href="#examples-section">20. JavaScript Example Code</a><ul><li><a href="#examples-signing">20.1. Generate a signing key pair, sign some data</a></li><li><a href="#examples-symmetric-encryption">20.2. Symmetric Encryption</a></li></ul></li><li><a href="#acknowledgements-section">21. Acknowledgements</a></li><li><a href="#references">22. References</a><ul><li><a href="#normative-references">22.1. Normative References</a></li><li><a href="#informative-references">22.2. Informative References</a></li></ul></li></ul></div>
</div>
<div id="sections">
@@ -517,9 +517,10 @@
<p>
A <a href="#dfn-conforming-implementation">conforming user agent</a> MUST support at
least the subset of the functionality defined in DOM4 that this specification relies
- upon; in particular, it MUST support <code>EventTarget</code>.
+ upon; in particular, it MUST support <code>Futures</code> and <code>EventTarget</code>.
[<a href="#DOM4">DOM4</a>]
</p>
+ <div class="ednote"><div class="ednoteHeader">Editorial note</div>The dependency on <code>EventTarget</code> is in progress of being removed.</div>
</dd>
<dt>HTML</dt>
<dd>
@@ -1258,21 +1259,9 @@
</div>
</div>
</div>
-
- <div id="KeyOperation-interface" class="section">
- <h2>13. KeyOperation interface</h2>
- <div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
-interface <dfn id="dfn-KeyOperation">KeyOperation</dfn> : EventTarget {
- readonly attribute any <dfn id="dfn-KeyOperation-result">result</dfn>;
-
- [TreatNonCallableAsNull] attribute Function? <dfn id="dfn-KeyOperation-onerror">onerror</dfn>;
- [TreatNonCallableAsNull] attribute Function? <dfn id="dfn-KeyOperation-oncomplete">oncomplete</dfn>;
-};
- </code></pre></div></div>
- </div>
-
+
<div id="crypto-interface" class="section">
- <h2>14. Crypto interface</h2>
+ <h2>13. Crypto interface</h2>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
interface <dfn id="dfn-Crypto">Crypto</dfn> {
readonly attribute <a href="#dfn-SubtleCrypto">SubtleCrypto</a> subtle;
@@ -1287,7 +1276,7 @@
</div>
<div id="subtlecrypto-interface" class="section">
- <h2>15. SubtleCrypto interface</h2>
+ <h2>14. SubtleCrypto interface</h2>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
enum <dfn id="dfn-KeyFormat">KeyFormat</dfn> {
<span class="comment">// An unformatted sequence of bytes. Intended for secret keys.</span>
@@ -1318,35 +1307,35 @@
optional ArrayBufferView? buffer = null);
<span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/36">ISSUE-36</a></span>
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
- <a href="#dfn-Key">Key</a> baseKey,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? derivedKeyType,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-generateKey">generateKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-deriveKey">deriveKey</a>(<a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> algorithm,
+ <a href="#dfn-Key">Key</a> baseKey,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? derivedKeyType,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
<span class="comment">// TBD: <a href="https://www.w3.org/2012/webcrypto/track/issues/35">ISSUE-35</a></span>
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
- ArrayBufferView keyData,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? algorithm,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
+ Future<any> <a href="#dfn-SubtleCrypto-method-importKey">importKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+ ArrayBufferView keyData,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a>? algorithm,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format, <a href="#dfn-Key">Key</a> key);
<span class="comment">// Note: wrap and unwrap remain "Features at Risk"</span>
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
- <a href="#dfn-Key">Key</a> key,
- <a href="#dfn-Key">Key</a> wrappingKey,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
- <a href="#dfn-KeyOperation">KeyOperation</a> <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
- ArrayBufferView wrappedKey,
- <a href="#dfn-Key">Key</a> unwrappingKey,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
- <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier?</a> unwrappedKeyAlgorithm,
- bool extractable = false,
- <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
+ Future<any> <a href="#dfn-SubtleCrypto-method-wrapKey">wrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+ <a href="#dfn-Key">Key</a> key,
+ <a href="#dfn-Key">Key</a> wrappingKey,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> wrapAlgorithm);
+ Future<any> <a href="#dfn-SubtleCrypto-method-unwrapKey">unwrapKey</a>(<a href="#dfn-KeyFormat">KeyFormat</a> format,
+ ArrayBufferView wrappedKey,
+ <a href="#dfn-Key">Key</a> unwrappingKey,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier</a> unwrapAlgorithm,
+ <a href="#dfn-AlgorithmIdentifier">AlgorithmIdentifier?</a> unwrappedKeyAlgorithm,
+ bool extractable = false,
+ <a href="#dfn-KeyUsage">KeyUsage</a>[] keyUsages = []);
};
</code></pre></div></div>
<div class="ednote"><div class="ednoteHeader">Editorial note</div>
@@ -1362,7 +1351,7 @@
</ul>
</div>
<div id="subtlecrypto-interface-description" class="section">
- <h3>15.1. Description</h3>
+ <h3>14.1. Description</h3>
<p class="norm">This section is non-normative.</p>
<p>
The <a href="#dfn-SubtleCrypto">SubtleCrypto</a> interface provides a set of
@@ -1390,9 +1379,9 @@
</p>
</div>
<div id="subtlecrypto-interface-methods" class="section">
- <h3>15.2. Methods and Parameters</h3>
+ <h3>14.2. Methods and Parameters</h3>
<div id="SubtleCrypto-method-encrypt" class="section">
- <h4>15.2.1. The encrypt method</h4>
+ <h4>14.2.1. The encrypt method</h4>
<p>
The <dfn id="dfn-SubtleCrypto-method-encrypt"><code>encrypt</code></dfn>
method returns a new <a href="#dfn-CryptoOperation"><code>CryptoOperation</code></a>
@@ -1494,7 +1483,7 @@
</div>
<div id="SubtleCrypto-method-decrypt" class="section">
- <h4>15.2.2. The decrypt method</h4>
+ <h4>14.2.2. The decrypt method</h4>
<p>
The <dfn id="dfn-SubtleCrypto-method-decrypt"><code>decrypt</code></dfn>
method returns a new <a href="#dfn-CryptoOperation"><code>CryptoOperation</code></a>
@@ -1596,7 +1585,7 @@
</div>
<div id="SubtleCrypto-method-sign" class="section">
- <h4>15.2.3. The sign method</h4>
+ <h4>14.2.3. The sign method</h4>
<p>
The <dfn id="dfn-SubtleCrypto-method-sign"><code>sign</code></dfn> method
returns a new <a href="#dfn-CryptoOperation"><code>CryptoOperation</code></a>
@@ -1697,7 +1686,7 @@
</div>
<div id="SubtleCrypto-method-verify" class="section">
- <h4>15.2.4. The verify method</h4>
+ <h4>14.2.4. The verify method</h4>
<p>
The <dfn id="dfn-SubtleCrypto-method-verify"><code>verify</code></dfn> method
returns a new <a href="#dfn-CryptoOperation"><code>CryptoOperation</code></a>
@@ -1798,7 +1787,7 @@
</div>
<div id="SubtleCrypto-method-digest" class="section">
- <h4>15.2.5. The digest method</h4>
+ <h4>14.2.5. The digest method</h4>
<p>
The <dfn id="dfn-SubtleCrypto-method-digest"><code>digest</code></dfn> method returns
a new <a href="#dfn-CryptoOperation"><code>CryptoOperation</code></a>
@@ -1899,8 +1888,8 @@
</div>
<div id="SubtleCrypto-method-generateKey" class="section">
- <h4>15.2.6. The generateKey method</h4>
- <p>
+ <h4>14.2.6. The generateKey method</h4>
+ <p>
When invoked, <dfn id="dfn-SubtleCrypto-method-generateKey"><code>generateKey</code></dfn> <span class="RFC2119">MUST</span> perform the following steps:
</p>
<ol>
@@ -1921,61 +1910,50 @@
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Return <var>keyOp</var> to the task that invoked this <code>generateKey</code>, while
- continuing the remaining steps of this algorithm.
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ If an error occurs, run these substeps and then terminate the algorithm:
</p>
+ <div class="ednote"><div class="ednoteHeader">Editorial note</div>Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- Invoke the algorithm-specific key generation method.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- If an error occured, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the algorithm-specific key generation method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the key generation algorithm
+ defined by the algorithm indicated in <var>normalizedAlgorithm</var>.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
<div id="SubtleCrypto-method-deriveKey" class="section">
- <h4>15.2.7. The deriveKey method</h4>
+ <h4>14.2.7. The deriveKey method</h4>
<p>
When invoked, <dfn id="dfn-SubtleCrypto-method-deriveKey"><code>deriveKey</code></dfn> <span class="RFC2119">MUST</span> perform the following steps:
</p>
@@ -1997,80 +1975,66 @@
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Return <var>keyOp</var> to the task that invoked this <code>generateKey</code>, while
- continuing the remaining steps of this algorithm.
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ If an error occurs, run these substeps and then terminate the algorithm:
</p>
+ <div class="ednote"><div class="ednoteHeader">Editorial note</div>Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- If <var>baseKey</var>.<a href="#dfn-Key-keyUsage"><code>keyUsage</code></a> does not
- contain the <code>"derive"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- Invoke the algorithm-specific key generation method.
- </p>
- </li>
- <li>
- <p>
- If an error occured, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the algorithm-specific key derivation method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ If <var>baseKey</var>.<a href="#dfn-Key-keyUsage"><code>keyUsage</code></a> does not
+ contain the <code>"derive"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the key derivation algorithm
+ defined by the algorithm indicated in <var>normalizedAlgorithm</var>.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
<div id="SubtleCrypto-method-importKey" class="section">
- <h4>15.2.8. The <dfn id="dfn-SubtleCrypto-method-importKey">importKey</dfn> method</h4>
+ <h4>14.2.8. The <dfn id="dfn-SubtleCrypto-method-importKey">importKey</dfn> method</h4>
<p></p>
</div>
<div id="SubtleCrypto-method-exportKey" class="section">
- <h4>15.2.9. The <dfn id="dfn-SubtleCrypto-method-exportKey">exportKey</dfn> method</h4>
+ <h4>14.2.9. The <dfn id="dfn-SubtleCrypto-method-exportKey">exportKey</dfn> method</h4>
</div>
<div id="SubtleCrypto-method-wrapKey" class="section">
- <h4>15.2.10. The <dfn id="dfn-SubtleCrypto-method-wrapKey">wrapKey</dfn> method</h4>
+ <h4>14.2.10. The <dfn id="dfn-SubtleCrypto-method-wrapKey">wrapKey</dfn> method</h4>
<p>
When invoked, the <dfn id="dfn-SubtleCrypto-method-wrapKey">wrapKey</dfn> method <span class="RFC2119">MUST</span> perform the following steps:
</p>
@@ -2085,104 +2049,88 @@
<li>
<p>
If <var>normalizedAlgorithm</var> does not describe a
- <a href="#algorithms">registered algorithm</a> that supports the wrapKey
+ <a href="#algorithms">registered algorithm</a> that supports the derive
operation, throw a <code>NotSupportedError</code> and
<a href="#terminate-the-algorithm">terminate the algorithm</a>.
</p>
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
- </p>
- </li>
- <li>
- <p>
- Return <var>keyOp</var> to the task that invoked this <code>wrapKey</code>, while
- continuing the remaining steps of this algorithm.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
+ </li>
+ <li>
+ <p>
+ If an error occurs, run these substeps and then terminate the algorithm:
+ </p>
+ <div class="ednote"><div class="ednoteHeader">Editorial note</div>Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- If <var>wrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
- contain the <code>"wrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- If <var>Key</var>.<a href="#dfn-Key-extractable"><code>extractable</code></a> is not true,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>
- algorithm, with the <var>keyFormat</var> as <code>keyFormat</code> and with <var>key</var> as
- <code>key</code>.
- </p>
- </li>
- <li>
- <p>
- If the key export algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>
- algorithm, with <var>wrappingKey</var> as <code>Key</code>, <var>normalizedAlgorithm</var> as
- <code>algorithm</code>, and with <var>bytes</var> as <code>buffer</code>.
- </p>
- </li>
- <li>
- <p>
- If the encrypt algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the encrypt method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ If <var>wrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
+ contain the <code>"wrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ If <var>Key</var>.<a href="#dfn-Key-extractable"><code>extractable</code></a> is not true,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-exportKey">exportKey</a>
+ algorithm, with the <var>keyFormat</var> as <code>keyFormat</code> and with <var>key</var> as
+ <code>key</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the key export algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-encrypt">encrypt</a>
+ algorithm, with <var>wrappingKey</var> as <code>Key</code>, <var>normalizedAlgorithm</var> as
+ <code>algorithm</code>, and with <var>bytes</var> as <code>buffer</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the encrypt algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
<div id="SubtleCrypto-method-unwrapKey" class="section">
- <h4>15.2.11. The <dfn id="dfn-SubtleCrypto-method-unwrapKey">unwrapKey</dfn> method</h4>
+ <h4>14.2.11. The <dfn id="dfn-SubtleCrypto-method-unwrapKey">unwrapKey</dfn> method</h4>
<p>
When invoked, the <dfn id="dfn-SubtleCrypto-method-unwrapKey">unwrapKey</dfn> method <span class="RFC2119">MUST</span> perform the following steps:
</p>
@@ -2231,91 +2179,85 @@
</li>
<li>
<p>
- Let <var>keyOp</var> be a newly created object implementing the
- <a href="#dfn-KeyOperation"><code>KeyOperation</code></a> interface.
- </p>
- </li>
- <li>
- <p>
- Return <var>keyOp</var> to the task that invoked this <code>unwrapKey</code>, while
- continuing the remaining steps of this algorithm.
+ Let <var>future</var> be a new <code>Future</code> object and <var>resolver</var> its associated resolver.
</p>
</li>
<li>
<p>
- Queue up an operation to run the following steps:
+ Return <var>future</var> and continue executing the remaining steps asynchronously.
</p>
+ </li>
+ <li>
+ <p>
+ If an error occurs, run these substeps and then terminate the algorithm:
+ </p>
+ <div class="ednote"><div class="ednoteHeader">Editorial note</div>Determine whether to reject the algorithm with a DOMError or a <code>null</code> result.</div>
<ol>
<li>
<p>
- If <var>unwrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
- contain the <code>"unwrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
- <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>KeyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a>
- algorithm, with <var>unwrapAlgorithm</var> as <code>algorithm</code>, <var>unwrapKey</var>
- as <code>key</code>, and with <var>wrappedKey</var> as <code>buffer</code>.
+ Let <var>result</var> be <code>null</code>.
</p>
</li>
<li>
<p>
- If the key decrypt algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrytpo-method-importKey">importKey</a>
- algorithm, with <var>format</var> as <code>format</code>, with <var>bytes</var> as
- <code>keyData</code>, with <var>unwrappedKeyAlgorithm</var> as <code>algorithm</code>, with <var>extractable</var>
- as <code>extractable</code>, and <var>keyUsages</var> as <code>keyUsages</code>.
- </p>
- </li>
- <li>
- <p>
- If the key import algorithm failed, <a href="#queue-a-task">queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a>
- called <a href="#dfn-KeyOperation-onerror"><code>onerror</code></a> at
- <var>keyOp</var> and <a href="#terminate-the-algorithm">terminate the algorithm</a>.
- </p>
- </li>
- <li>
- <p>
- Otherwise, if the algorithm-specific key unwrapping method completed successfully,
- let <var>result</var> be the result of that operation.
- </p>
- </li>
- <li>
- <p>
- Set <var>keyOp</var>.<a href="#dfn-KeyOperation-result"><code>result</code></a> =
- <var>result</var>
- </p>
- </li>
- <li>
- <p>
- <a href="#queue-a-task">Queue a task</a> to
- <a href="#fire-a-simple-event">fire a simple event</a> called
- <a href="#dfn-KeyOperation-oncomplete"><code>oncomplete</code></a> at
- <var>KeyOp</var>
+ Execute <var>resolver</var>'s <code>reject(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
</p>
</li>
</ol>
</li>
+ <li>
+ <p>
+ If <var>unwrappingKey</var>.<a href="#dfn-Key-KeyUsage"><code>keyUsage</code></a> does not
+ contain the <code>"unwrap"</code> <a href="#dfn-KeyUsage"><code>KeyUsage</code></a>,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ If <var>Key</var>.<a href="#dfn-Key-extractable"><code>extractable</code></a> is not true,
+ terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>bytes</var> be the result of executing the <a href="#dfn-SubtleCrypto-method-decrypt">decrypt</a>
+ algorithm, with <var>unwrapAlgorithm</var> as <code>algorithm</code>, <var>unwrapKey</var>
+ as <code>key</code>, and with <var>wrappedKey</var> as <code>buffer</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the key decrypt algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Let <var>result</var> be the result of executing the <a href="#dfn-SubtleCrytpo-method-importKey">importKey</a>
+ algorithm, with <var>format</var> as <code>format</code>, with <var>bytes</var> as
+ <code>keyData</code>, with <var>unwrappedKeyAlgorithm</var> as <code>algorithm</code>, with <var>extractable</var>
+ as <code>extractable</code>, and <var>keyUsages</var> as <code>keyUsages</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ If the key import algorithm failed, terminate this algorithm with an error.
+ </p>
+ </li>
+ <li>
+ <p>
+ Execute <var>resolver</var>'s <code>resolve(value)</code> algorithm, with
+ <var>result</var> as the <code>value</code> argument.
+ </p>
+ </li>
</ol>
</div>
</div>
</div>
<div id="WorkerCrypto-interface" class="section">
- <h2>16. WorkerCrypto interface</h2>
+ <h2>15. WorkerCrypto interface</h2>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
interface <dfn id="dfn-WorkerCrypto">WorkerCrypto</dfn> {
};
@@ -2327,7 +2269,7 @@
};
</code></pre></div></div>
<div id="WorkerCrypto-description" class="section">
- <h3>16.1. Description</h3>
+ <h3>15.1. Description</h3>
<p>
The <a href="#dfn-WorkerCrypto">WorkerCrypto</a> interface provides cryptographic
functionality for background scripts, as specified by Web Workers [
@@ -2345,7 +2287,7 @@
</div>
<div id="big-integer" class="section">
- <h2>17. BigInteger</h2>
+ <h2>16. BigInteger</h2>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
typedef Uint8Array <dfn id="dfn-BigInteger">BigInteger</dfn>;
</code></pre></div></div>
@@ -2360,7 +2302,7 @@
</div>
<div id="keypair" class="section">
- <h2>18. KeyPair</h2>
+ <h2>17. KeyPair</h2>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
interface <dfn id="dfn-KeyPair">KeyPair</dfn> {
<a href="#dfn-Key">Key</a> publicKey;
@@ -2374,7 +2316,7 @@
</div>
<div id="algorithms" class="section">
- <h2>19. Algorithms</h2>
+ <h2>18. Algorithms</h2>
<div class="ednote"><div class="ednoteHeader">Editorial note</div>
<p>
Note: All algorithms listed should be considered as "features at risk",
@@ -2389,7 +2331,7 @@
</p>
</div>
<div id="recommended-algorithms" class="section">
- <h3>19.1. Recommended algorithms</h3>
+ <h3>18.1. Recommended algorithms</h3>
<p class="norm">This section is non-normative</p>
<p>
As the API is meant to be extensible in order to keep up with future developments within
@@ -2429,7 +2371,7 @@
</p>
</div>
<div id="defining-an-algorithm" class="section">
- <h3>19.2. Defining an algorithm</h3>
+ <h3>18.2. Defining an algorithm</h3>
<p>
Each algorithm that is to be exposed via the Web Cryptography API
<span class="RFC2119">SHOULD</span> be registered via the Web Cryptography working group,
@@ -2438,7 +2380,7 @@
<span class="RFC2119">MUST</span> be processed as if the sections had been defined.
</p>
<div id="recognized-algorithm-name" class="section">
- <h4>19.2.1. Recognized algorithm name</h4>
+ <h4>18.2.1. Recognized algorithm name</h4>
<p>
Each registered algorithm <span class="RFC2119">MUST</span> have a canonical name
for which applications can refer to the algorithm. The canonical name
@@ -2449,14 +2391,14 @@
</p>
</div>
<div id="supported-operations" class="section">
- <h4>19.2.2. Supported operations</h4>
+ <h4>18.2.2. Supported operations</h4>
<p>
Each registered algorithm <span class="RFC2119">MUST</span> define the operations
that it supports.
</p>
</div>
<div id="algorithm-specific-params" class="section">
- <h4>19.2.3. Algorithm-specific parameters</h4>
+ <h4>18.2.3. Algorithm-specific parameters</h4>
<p>
Each registered algorithm <span class="RFC2119">MUST</span> define the expected
parameters, if any, that should be exposed via the <a href="#dfn-Algorithm">Algorithm</a>
@@ -2464,7 +2406,7 @@
</p>
</div>
<div id="algorithm-result" class="section">
- <h4>19.2.4. Algorithm results</h4>
+ <h4>18.2.4. Algorithm results</h4>
<p>
Each registered algorithm <span class="RFC2119">MUST</span> define the contents
of the <a href="#dfn-CryptoOperation-result"><code>result</code></a> attribute of the
@@ -2473,7 +2415,7 @@
</p>
</div>
<div id="algorithm-alias" class="section">
- <h4>19.2.5. <dfn id="dfn-algorithm-alias">Algorithm aliases</dfn></h4>
+ <h4>18.2.5. <dfn id="dfn-algorithm-alias">Algorithm aliases</dfn></h4>
<p>
Each registered algorithm <span class="RFC2119">MAY</span> define one or more aliases
that may define a fully normalized <a href="#dfn-Algorithm">Algorithm</a> object.
@@ -2486,9 +2428,9 @@
</div>
<div id="rsaes-pkcs1" class="section">
- <h3>19.3. RSAES-PKCS1-v1_5</h3>
+ <h3>18.3. RSAES-PKCS1-v1_5</h3>
<div id="rsaes-pkcs1-description" class="section">
- <h4>19.3.1. Description</h4>
+ <h4>18.3.1. Description</h4>
<p>
The <code>"RSAES-PKCS1-v1_5"</code> algorithm identifier is used to perform encryption
and decryption ordering to the RSAES-PKCS1-v1_5 algorithm specified in
@@ -2496,7 +2438,7 @@
</p>
</div>
<div id="rsaes-pkcs1-registration" class="section">
- <h4>19.3.2. Registration</h4>
+ <h4>18.3.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"RSAES-PKCS1-v1_5"</code>.
@@ -2529,7 +2471,7 @@
</table>
</div>
<div id="RsaKeyGenParams-dictionary" class="section">
- <h4>19.3.3. RsaKeyGenParams dictionary</h4>
+ <h4>18.3.3. RsaKeyGenParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-RsaKeyGenParams">RsaKeyGenParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The length, in bits, of the RSA modulus</span>
@@ -2540,7 +2482,7 @@
</code></pre></div></div>
</div>
<div id="rsaes-pkcs1-operations" class="section">
- <h4>19.3.4. Operations</h4>
+ <h4>18.3.4. Operations</h4>
<div class="ednote"><div class="ednoteHeader">Editorial note</div>
<p>
Note: The following processing algorithms have not been updated to match the processing algorithm
@@ -2674,9 +2616,9 @@
</div>
<div id="rsassa-pkcs1" class="section">
- <h3>19.4. RSASSA-PKCS1-v1_5</h3>
+ <h3>18.4. RSASSA-PKCS1-v1_5</h3>
<div id="rsassa-pkcs1-description" class="section">
- <h4>19.4.1. Description</h4>
+ <h4>18.4.1. Description</h4>
<p>
The <code>"RSASSA-PKCS1-v1_5"</code> algorithm identifier is used to perform
signing and verification using the RSASSA-PKCS1-v1_5 algorithm specified in
@@ -2684,7 +2626,7 @@
</p>
</div>
<div id="rsassa-pkcs1-registration" class="section">
- <h4>19.4.2. Registration</h4>
+ <h4>18.4.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"RSASSA-PKCS1-v1_5"</code>.
@@ -2717,7 +2659,7 @@
</table>
</div>
<div id="RsaSsaParams-dictionary" class="section">
- <h4>19.4.3. RsaSsaParams dictionary</h4>
+ <h4>18.4.3. RsaSsaParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-RsaSsaParams">RsaSsaParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The hash algorithm to use</span>
@@ -2726,7 +2668,7 @@
</code></pre></div></div>
</div>
<div id="rsassa-pkcs1-operations" class="section">
- <h4>19.4.4. Operations</h4>
+ <h4>18.4.4. Operations</h4>
<ul>
<li>Sign</li>
<li>Verify</li>
@@ -2736,9 +2678,9 @@
</div>
<div id="rsa-pss" class="section">
- <h3>19.5. RSA-PSS</h3>
+ <h3>18.5. RSA-PSS</h3>
<div id="rsa-pss-description" class="section">
- <h4>19.5.1. Description</h4>
+ <h4>18.5.1. Description</h4>
<p>
The <code>"RSA-PSS"</code> algorithm identifier is used to perform signing
and verification using the RSASSA-PSS algorithm specified in
@@ -2747,7 +2689,7 @@
</p>
</div>
<div id="rsa-pss-registration" class="section">
- <h4>19.5.2. Registration</h4>
+ <h4>18.5.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"RSA-PSS"</code>.
@@ -2780,7 +2722,7 @@
</table>
</div>
<div id="rsa-pss-params" class="section">
- <h4>19.5.3. RsaPssParams dictionary</h4>
+ <h4>18.5.3. RsaPssParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-RsaPssParams">RsaPssParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The hash function to apply to the message</span>
@@ -2791,7 +2733,7 @@
</code></pre></div></div>
</div>
<div id="rsa-pss-operations" class="section">
- <h4>19.5.4. Operations</h4>
+ <h4>18.5.4. Operations</h4>
<ul>
<li>Sign</li>
<li>Verify</li>
@@ -2801,9 +2743,9 @@
</div>
<div id="rsa-oaep" class="section">
- <h3>19.6. RSA-OAEP</h3>
+ <h3>18.6. RSA-OAEP</h3>
<div id="rsa-oaep-description" class="section">
- <h4>19.6.1. Description</h4>
+ <h4>18.6.1. Description</h4>
<p>
The <code>"RSA-OAEP"</code> algorithm identifier is used to perform encryption
and decryption ordering to the RSAES-OAEP algorithm specified in
@@ -2812,7 +2754,7 @@
</p>
</div>
<div id="rsa-oaep-registration" class="section">
- <h4>19.6.2. Registration</h4>
+ <h4>18.6.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"RSA-OAEP"</code>.
@@ -2856,7 +2798,7 @@
</div>
<div id="rsa-oaep-params" class="section">
- <h4>19.6.3. RsaOaepParams dictionary</h4>
+ <h4>18.6.3. RsaOaepParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-RsaOaepParams">RsaOaepParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The hash function to apply to the message</span>
@@ -2867,7 +2809,7 @@
</code></pre></div></div>
</div>
<div id="rsa-oaep-operations" class="section">
- <h4>19.6.4. Operations</h4>
+ <h4>18.6.4. Operations</h4>
<dl>
<dt>Encrypt</dt>
<dd></dd>
@@ -2884,9 +2826,9 @@
</div>
<div id="ecdsa" class="section">
- <h3>19.7. ECDSA</h3>
+ <h3>18.7. ECDSA</h3>
<div id="ecdsa-description" class="section">
- <h4>19.7.1. Description</h4>
+ <h4>18.7.1. Description</h4>
<p>
The <code>"ECDSA"</code> algorithm identifier is used to perform signing
and verification using the ECDSA algorithm specified in
@@ -2894,7 +2836,7 @@
</p>
</div>
<div id="ecdsa-registration" class="section">
- <h4>19.7.2. Registration</h4>
+ <h4>18.7.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"ECDSA"</code>.
@@ -2928,7 +2870,7 @@
</table>
</div>
<div id="EcdsaParams-dictionary" class="section">
- <h4>19.7.3. EcdsaParams dictionary</h4>
+ <h4>18.7.3. EcdsaParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-EcdsaParams">EcdsaParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The hash algorithm to use</span>
@@ -2937,7 +2879,7 @@
</code></pre></div></div>
</div>
<div id="EcKeyGenParams-dictionary" class="section">
- <h4>19.7.4. EcKeyGenParams dictionary</h4>
+ <h4>18.7.4. EcKeyGenParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
enum <dfn id="dfn-NamedCurve">NamedCurve</dfn> {
<span class="comment">// NIST recommended curve P-256, also known as secp256r1.</span>
@@ -2960,7 +2902,7 @@
</div>
<div id="ecdsa-operations" class="section">
- <h4>19.7.5. Operations</h4>
+ <h4>18.7.5. Operations</h4>
<div class="ednote"><div class="ednoteHeader">Editorial note</div>
<p>
Note: The following processing algorithms have not been updated to match the processing algorithm
@@ -3090,16 +3032,16 @@
</div>
<div id="ecdh" class="section">
- <h3>19.8. ECDH</h3>
+ <h3>18.8. ECDH</h3>
<div id="ecdh-description" class="section">
- <h4>19.8.1. Description</h4>
+ <h4>18.8.1. Description</h4>
<p>
This describes using Elliptic Curve Diffie-Hellman (ECDH) for key generation and key agreement, as
specified by <a href="#X9.63">X9.63</a>.
</p>
</div>
<div id="ecdh-registration" class="section">
- <h4>19.8.2. Registration</h4>
+ <h4>18.8.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"ECDH"</code>.
@@ -3127,7 +3069,7 @@
</table>
</div>
<div id="dh-EcdhKeyDeriveParams" class="section">
- <h4>19.8.3. EcdhKeyDeriveParams dictionary</h4>
+ <h4>18.8.3. EcdhKeyDeriveParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
typedef Uint8Array <dfn id="dfn-ECPoint">ECPoint</dfn>;
@@ -3143,7 +3085,7 @@
</p>
</div>
<div id="ecdh-operations" class="section">
- <h4>19.8.4. Operations</h4>
+ <h4>18.8.4. Operations</h4>
<ul>
<li>Generate Key</li>
<li>Derive Key
@@ -3163,14 +3105,14 @@
</div>
<div id="aes-ctr" class="section">
- <h3>19.9. AES-CTR</h3>
+ <h3>18.9. AES-CTR</h3>
<div id="aes-ctr-description" class="section">
- <h4>19.9.1. Description</h4>
+ <h4>18.9.1. Description</h4>
<p>
</p>
</div>
<div id="aes-ctr-registration" class="section">
- <h4>19.9.2. Registration</h4>
+ <h4>18.9.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"AES-CTR"</code>.
@@ -3204,7 +3146,7 @@
</div>
<div id="aes-ctr-params" class="section">
- <h4>19.9.3. AesCtrParams dictionary</h4>
+ <h4>18.9.3. AesCtrParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-AesCtrParams">AesCtrParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The initial value of the counter block. counter <span class="RFC2119">MUST</span> be 16 bytes
@@ -3222,7 +3164,7 @@
</code></pre></div></div>
</div>
<div id="aes-keygen-params" class="section">
- <h4>19.9.4. AesKeyGenParams dictionary</h4>
+ <h4>18.9.4. AesKeyGenParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-AesKeyGenParams">AesKeyGenParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The length, in bits, of the key.</span>
@@ -3231,7 +3173,7 @@
</code></pre></div></div>
</div>
<div id="aes-ctr-operations" class="section">
- <h4>19.9.5. Operations</h4>
+ <h4>18.9.5. Operations</h4>
<ul>
<li>Encrypt</li>
<li>Decrypt</li>
@@ -3241,9 +3183,9 @@
</div>
<div id="aes-cbc" class="section">
- <h3>19.10. AES-CBC</h3>
+ <h3>18.10. AES-CBC</h3>
<div id="aes-cbc-description" class="section">
- <h4>19.10.1. Description</h4>
+ <h4>18.10.1. Description</h4>
<p class="norm">This section is non-normative.</p>
<p>
The <code>"AES-CBC"</code> algorithm identifier is used to perform
@@ -3260,7 +3202,7 @@
</p>
</div>
<div id="aes-cbc-registration" class="section">
- <h4>19.10.2. Registration</h4>
+ <h4>18.10.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"AES-CBC"</code>.
@@ -3293,7 +3235,7 @@
</table>
</div>
<div id="aes-cbc-params" class="section">
- <h4>19.10.3. AesCbcParams dictionary</h4>
+ <h4>18.10.3. AesCbcParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-AesCbcParams">AesCbcParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The initialization vector. <span class="RFC2119">MUST</span> be 16 bytes.</span>
@@ -3302,7 +3244,7 @@
</code></pre></div></div>
</div>
<div id="aes-cbc-operations" class="section">
- <h4>19.10.4. Operations</h4>
+ <h4>18.10.4. Operations</h4>
<ul>
<li>Encrypt</li>
<li>Decrypt</li>
@@ -3312,9 +3254,9 @@
</div>
<div id="aes-cmac" class="section">
- <h3>19.11. AES-CMAC</h3>
+ <h3>18.11. AES-CMAC</h3>
<div id="aes-cmac-description" class="section">
- <h4>19.11.1. Description</h4>
+ <h4>18.11.1. Description</h4>
<p class="norm">This section is non-normative.</p>
<p>
The <code>"AES-CMAC"</code> algorithm identifier is used to perform
@@ -3323,7 +3265,7 @@
</p>
</div>
<div id="aes-cmac-registration" class="section">
- <h4>19.11.2. Registration</h4>
+ <h4>18.11.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"AES-CMAC"</code>.
@@ -3356,7 +3298,7 @@
</table>
</div>
<div id="aes-cmac-operations" class="section">
- <h4>19.11.3. Operations</h4>
+ <h4>18.11.3. Operations</h4>
<ul>
<li>Sign</li>
<li>Verify</li>
@@ -3366,12 +3308,12 @@
</div>
<div id="aes-gcm" class="section">
- <h3>19.12. AES-GCM</h3>
+ <h3>18.12. AES-GCM</h3>
<div id="aes-gcm-description" class="section">
- <h4>19.12.1. Description</h4>
+ <h4>18.12.1. Description</h4>
</div>
<div id="aes-gcm-registration" class="section">
- <h4>19.12.2. Registration</h4>
+ <h4>18.12.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"AES-GCM"</code>.
@@ -3404,7 +3346,7 @@
</table>
</div>
<div id="aes-gcm-params" class="section">
- <h4>19.12.3. AesGcmParams dictionary</h4>
+ <h4>18.12.3. AesGcmParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-AesGcmParams">AesGcmParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The initialization vector to use. May be up to 2^56 bytes long.</span>
@@ -3417,7 +3359,7 @@
</code></pre></div></div>
</div>
<div id="aes-gcm-operations" class="section">
- <h4>19.12.4. Operations</h4>
+ <h4>18.12.4. Operations</h4>
<ul>
<li>Encrypt</li>
<li>Decrypt</li>
@@ -3427,9 +3369,9 @@
</div>
<div id="aes-cfb" class="section">
- <h3>19.13. AES-CFB</h3>
+ <h3>18.13. AES-CFB</h3>
<div id="aes-cfb-description" class="section">
- <h4>19.13.1. Description</h4>
+ <h4>18.13.1. Description</h4>
<p class="norm">This section is non-normative.</p>
<p>
The <code>"AES-CFB"</code> algorithm identifier is used to perform
@@ -3439,7 +3381,7 @@
</p>
</div>
<div id="aes-cfb-registration" class="section">
- <h4>19.13.2. Registration</h4>
+ <h4>18.13.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"AES-CFB"</code>.
@@ -3472,7 +3414,7 @@
</table>
</div>
<div id="aes-cfb-params" class="section">
- <h4>19.13.3. AesCfbParams dictionary</h4>
+ <h4>18.13.3. AesCfbParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-AesCfbParams">AesCfbParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The initialization vector. <span class="RFC2119">MUST</span> be 16 bytes.</span>
@@ -3481,7 +3423,7 @@
</code></pre></div></div>
</div>
<div id="aes-cfb-operations" class="section">
- <h4>19.13.4. Operations</h4>
+ <h4>18.13.4. Operations</h4>
<ul>
<li>Encrypt</li>
<li>Decrypt</li>
@@ -3491,12 +3433,12 @@
</div>
<div id="hmac" class="section">
- <h3>19.14. HMAC</h3>
+ <h3>18.14. HMAC</h3>
<div id="hmac-description" class="section">
- <h4>19.14.1. Description</h4>
+ <h4>18.14.1. Description</h4>
</div>
<div id="hmac-registration" class="section">
- <h4>19.14.2. Registration</h4>
+ <h4>18.14.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"HMAC"</code>.
@@ -3529,7 +3471,7 @@
</table>
</div>
<div id="hmac-params" class="section">
- <h4>19.14.3. HmacParams dictionary</h4>
+ <h4>18.14.3. HmacParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-HmacParams">HmacParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The inner hash function to use.</span>
@@ -3538,7 +3480,7 @@
</code></pre></div></div>
</div>
<div id="hmac-operations" class="section">
- <h4>19.14.4. Operations</h4>
+ <h4>18.14.4. Operations</h4>
<ul>
<li>Sign</li>
<li>Verify</li>
@@ -3547,16 +3489,16 @@
</div>
</div>
<div id="dh" class="section">
- <h3>19.15. Diffie-Hellman</h3>
+ <h3>18.15. Diffie-Hellman</h3>
<div id="dh-description" class="section">
- <h4>19.15.1. Description</h4>
+ <h4>18.15.1. Description</h4>
<p>
This describes using Diffie-Hellman for key generation and key agreement, as specified
by <a href="#PKCS3">PKCS #3</a>.
</p>
</div>
<div id="dh-registration" class="section">
- <h4>19.15.2. Registration</h4>
+ <h4>18.15.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"DH"</code>.
@@ -3584,7 +3526,7 @@
</table>
</div>
<div id="dh-DhKeyGenParams" class="section">
- <h4>19.15.3. DhKeyGenParams dictionary</h4>
+ <h4>18.15.3. DhKeyGenParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-DhKeyGenParams">DhKeyGenParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The prime p.</span>
@@ -3595,7 +3537,7 @@
</code></pre></div></div>
</div>
<div id="dh-DhKeyDeriveParams" class="section">
- <h4>19.15.4. DhKeyDeriveParams dictionary</h4>
+ <h4>18.15.4. DhKeyDeriveParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-DhKeyDeriveParams">DhKeyDeriveParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The peer's public value.</span>
@@ -3604,7 +3546,7 @@
</code></pre></div></div>
</div>
<div id="dh-operations" class="section">
- <h4>19.15.5. Operations</h4>
+ <h4>18.15.5. Operations</h4>
<ul>
<li>Generate Key</li>
<li>Derive Key</li>
@@ -3612,16 +3554,16 @@
</div>
</div>
<div id="sha" class="section">
- <h3>19.16. SHA</h3>
+ <h3>18.16. SHA</h3>
<div id="sha-description" class="section">
- <h4>19.16.1. Description</h4>
+ <h4>18.16.1. Description</h4>
<p>
This describes the SHA-1 and SHA-2 families, as specified by
[<a href="#FIPS180-4">FIPS 180-4</a>].
</p>
</div>
<div id="sha-registration" class="section">
- <h4>19.16.2. Registration</h4>
+ <h4>18.16.2. Registration</h4>
<p>
The following algorithms are added as <a href="#recognized-algorithm-name">
recognized algorithm names</a>:
@@ -3656,16 +3598,16 @@
</table>
</div>
<div id="sha-operations" class="section">
- <h4>19.16.3. Operations</h4>
+ <h4>18.16.3. Operations</h4>
<ul>
<li>Digest</li>
</ul>
</div>
</div>
<div id="concatkdf" class="section">
- <h3>19.17. Concat KDF</h3>
+ <h3>18.17. Concat KDF</h3>
<div id="concatkdf-description" class="section">
- <h4>19.17.1. Description</h4>
+ <h4>18.17.1. Description</h4>
<p>
The <code>"CONCAT"</code> algorithm identifier is used to perform key derivation
using the key derivation algorithm defined in Section 5.8.1 of NIST SP 800-56A
@@ -3673,7 +3615,7 @@
</p>
</div>
<div id="concatkdf-registration" class="section">
- <h4>19.17.2. Registration</h4>
+ <h4>18.17.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"CONCAT"</code>.
@@ -3696,7 +3638,7 @@
</table>
</div>
<div id="concat-params" class="section">
- <h4>19.17.3. ConcatParams dictionary</h4>
+ <h4>18.17.3. ConcatParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-ConcatParams">ConcatParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The digest method to use to derive the keying material.</span>
@@ -3719,16 +3661,16 @@
</code></pre></div></div>
</div>
<div id="concat-operations" class="section">
- <h4>19.17.4. Operations</h4>
+ <h4>18.17.4. Operations</h4>
<ul>
<li>Derive Key</li>
</ul>
</div>
</div>
<div id="hkdf-ctr" class="section">
- <h3>19.18. HKDF-CTR</h3>
+ <h3>18.18. HKDF-CTR</h3>
<div id="hkdf-ctr-description" class="section">
- <h4>19.18.1. Description</h4>
+ <h4>18.18.1. Description</h4>
<p class="norm">This section is non-normative.</p>
<p>
The <code>"HKDF-CTR"</code> algorithm identifier is used to
@@ -3740,7 +3682,7 @@
</p>
</div>
<div id="hkdf-ctr-registration" class="section">
- <h4>19.18.2. Registration</h4>
+ <h4>18.18.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a>
for this algorithm is <code>"HKDF-CTR"</code>.
@@ -3763,7 +3705,7 @@
</table>
</div>
<div id="hkdf-ctr-params" class="section">
- <h4>19.18.3. HkdfCtrParams dictionary</h4>
+ <h4>18.18.3. HkdfCtrParams dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-HkdfCtrParams">HkdfCtrParams</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
<span class="comment">// The algorithm to use with HMAC (eg: <a href="#sha-256">SHA-256</a></span>
@@ -3787,7 +3729,7 @@
</div>
</div>
<div id="hkdf2-ctr-operations" class="section">
- <h4>19.18.4. Operations</h4>
+ <h4>18.18.4. Operations</h4>
<ul>
<li>Derive Key</li>
</ul>
@@ -3795,12 +3737,12 @@
</div>
<div id="pbkdf2" class="section">
- <h3>19.19. PBKDF2</h3>
+ <h3>18.19. PBKDF2</h3>
<div id="pbkdf2-description" class="section">
- <h4>19.19.1. Description</h4>
+ <h4>18.19.1. Description</h4>
</div>
<div id="pbkdf2-registration" class="section">
- <h4>19.19.2. Registration</h4>
+ <h4>18.19.2. Registration</h4>
<p>
The <a href="#recognized-algorithm-name">recognized algorithm name</a> for
this algorithm is <code>"PBKDF2"</code>.
@@ -3823,7 +3765,7 @@
</table>
</div>
<div id="pbkdf2-params" class="section">
- <h4>19.19.3. Pbkdf2Params dictionary</h4>
+ <h4>18.19.3. Pbkdf2Params dictionary</h4>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">IDL</span></div><div class="blockContent"><pre class="code"><code class="idl-code">
dictionary <dfn id="dfn-Pbkdf2Params">Pbkdf2Params</dfn> : <a href="#dfn-Algorithm">Algorithm</a> {
ArrayBufferView salt;
@@ -3842,7 +3784,7 @@
</div>
</div>
<div id="pbkdf2-operations" class="section">
- <h4>19.19.4. Operations</h4>
+ <h4>18.19.4. Operations</h4>
<ul>
<li>Derive Key</li>
</ul>
@@ -3851,7 +3793,7 @@
</div>
<div id="algorithm-normalizing-rules" class="section">
- <h2>20. Algorithm normalizing rules</h2>
+ <h2>19. Algorithm normalizing rules</h2>
<p>
The <a href="#dfn-AlgorithmIdentifier"><code>AlgorithmIdentifier</code></a> typedef
permits algorithms to be specified as either a <code>dictionary</code> or a DOMString.
@@ -3912,9 +3854,9 @@
</ol>
</div>
<div id="examples-section" class="section">
- <h2>21. JavaScript Example Code</h2>
+ <h2>20. JavaScript Example Code</h2>
<div id="examples-signing" class="section">
- <h3>21.1. Generate a signing key pair, sign some data</h3>
+ <h3>20.1. Generate a signing key pair, sign some data</h3>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">ECMAScript</span></div><div class="blockContent"><pre class="code"><code class="es-code">
<span class="comment">// Algorithm Object</span>
@@ -3964,7 +3906,7 @@
</code></pre></div></div>
</div>
<div id="examples-symmetric-encryption" class="section">
- <h3>21.2. Symmetric Encryption</h3>
+ <h3>20.2. Symmetric Encryption</h3>
<div class="block"><div class="blockTitleDiv"><span class="blockTitle">ECMAScript</span></div><div class="blockContent"><pre class="code"><code class="es-code">
var clearDataArrayBufferView = convertPlainTextToArrayBufferView("Plain Text Data");
<span class="comment">// TODO: create example utility function that converts text -> ArrayBufferView</span>
@@ -4005,7 +3947,7 @@
</div>
</div>
<div id="acknowledgements-section" class="section">
- <h2>22. Acknowledgements</h2>
+ <h2>21. Acknowledgements</h2>
<p>
The editors would like to thank Adam Barth, Alex Russell, Ali Asad, Arun Ranganathan,
Brian Smith, Brian Warner, Channy Yun, Jim Schaad, Kai Engert, Mark Watson, Nick Van den Bleeken,
@@ -4027,14 +3969,15 @@
</p>
</div>
<div id="references" class="section">
- <h2>23. References</h2>
+ <h2>22. References</h2>
<div id="normative-references" class="section">
- <h3>23.1. Normative References</h3>
+ <h3>22.1. Normative References</h3>
<dl>
<dt id="DOM4">DOM4</dt>
<dd>
- <cite><a href="http://www.w3.org/TR/domcore/">DOM4 (work in progress)</a></cite>,
- A. Gregor, A. van Kesteren, Ms2ger. W3C.
+ <cite><a href="http://dom.spec.whatwg.org/">DOM (Living Standard)</a></cite>,
+ A. Gregor, A. van Kesteren, Ms2ger. WHATWG.
+ <div class="ednote"><div class="ednoteHeader">Editorial note</div>This will be updated to W3C DOM4 once Futures/Promises are incorporated.</div>
</dd>
<dt id="ECMA-262">ECMAScript</dt>
<dd>
@@ -4102,7 +4045,7 @@
</dl>
</div>
<div id="informative-references" class="section">
- <h3>23.2. Informative References</h3>
+ <h3>22.2. Informative References</h3>
<dl>
<dt id="CDSA">CDSA</dt>
<dd>