Bug 24811 - Rename new operation to 'get key length'. Provide for case where all secret bits should be passed to derived key algorithm (e.g. for KDFs)
--- a/spec/Overview-WebCryptoAPI.xml Thu Feb 27 13:47:58 2014 -0800
+++ b/spec/Overview-WebCryptoAPI.xml Thu Feb 27 16:42:34 2014 -0800
@@ -2018,7 +2018,7 @@
</li>
<li>
<p>
- Let <var>length</var> be the result of executing the derived key length
+ Let <var>length</var> be the result of executing the get key length
algorithm specified by <var>normalizedDerivedKeyAlgorithm</var>.
</p>
</li>
@@ -5256,13 +5256,20 @@
<li>
<p>
<dl class="switch">
- <dt>
- If the length of <var>secret</var> in bits is less than
- <var>length</var>:
- </dt>
- <dd>Terminate this algorithm with an error.</dd>
+ <dt>If <var>length</var> is null:</dt>
+ <dd>Return <var>secret</var></dd>
<dt>Otherwise:</dt>
- <dd>Return the first <var>length</var> bits of <var>secret</var>.</dd>
+ <dd>
+ <dl class="switch">
+ <dt>
+ If the length of <var>secret</var> in bits is less than
+ <var>length</var>:
+ </dt>
+ <dd>Terminate this algorithm with an error.</dd>
+ <dt>Otherwise:</dt>
+ <dd>Return the first <var>length</var> bits of <var>secret</var>.</dd>
+ </dl>
+ </dd>
</dl>
</p>
</li>
@@ -5323,7 +5330,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -5808,7 +5815,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -5898,7 +5905,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -6346,7 +6353,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -6433,7 +6440,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -6811,7 +6818,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -6893,7 +6900,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -7413,7 +7420,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -7496,7 +7503,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -7921,7 +7928,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -8003,7 +8010,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -8390,7 +8397,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -8471,7 +8478,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-HmacDerivedKeyParams">HmacDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -9082,7 +9089,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
--- a/spec/Overview.html Thu Feb 27 13:47:58 2014 -0800
+++ b/spec/Overview.html Thu Feb 27 16:42:34 2014 -0800
@@ -2026,7 +2026,7 @@
</li>
<li>
<p>
- Let <var>length</var> be the result of executing the derived key length
+ Let <var>length</var> be the result of executing the get key length
algorithm specified by <var>normalizedDerivedKeyAlgorithm</var>.
</p>
</li>
@@ -5249,13 +5249,20 @@
<li>
<p>
<dl class="switch">
- <dt>
- If the length of <var>secret</var> in bits is less than
- <var>length</var>:
- </dt>
- <dd>Terminate this algorithm with an error.</dd>
+ <dt>If <var>length</var> is null:</dt>
+ <dd>Return <var>secret</var></dd>
<dt>Otherwise:</dt>
- <dd>Return the first <var>length</var> bits of <var>secret</var>.</dd>
+ <dd>
+ <dl class="switch">
+ <dt>
+ If the length of <var>secret</var> in bits is less than
+ <var>length</var>:
+ </dt>
+ <dd>Terminate this algorithm with an error.</dd>
+ <dt>Otherwise:</dt>
+ <dd>Return the first <var>length</var> bits of <var>secret</var>.</dd>
+ </dl>
+ </dd>
</dl>
</p>
</li>
@@ -5316,7 +5323,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -5801,7 +5808,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -5891,7 +5898,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -6339,7 +6346,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -6426,7 +6433,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -6804,7 +6811,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -6886,7 +6893,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -7406,7 +7413,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -7489,7 +7496,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -7914,7 +7921,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -7996,7 +8003,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-AesDerivedKeyParams">AesDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -8383,7 +8390,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>
@@ -8464,7 +8471,7 @@
<td>ArrayBuffer</td>
</tr>
<tr>
- <td>derived key length</td>
+ <td>get key length</td>
<td><a href="#dfn-HmacDerivedKeyParams">HmacDerivedKeyParams</a></td>
<td>Integer</td>
</tr>
@@ -9075,7 +9082,7 @@
</li>
</ol>
</dd>
- <dt>Derived key length</dt>
+ <dt>Get key length</dt>
<dd>
<ol>
<li>