Bug 25618: ECDSA: delegate decoding of pkcs8 private key structure to extension specifications
authorMark Watson <watsonm@netflix.com>
Wed, 22 Oct 2014 13:34:16 -0700
changeset 258 b71fc3eaf6db
parent 257 24e0e32852f8
child 259 be599c620546
Bug 25618: ECDSA: delegate decoding of pkcs8 private key structure to extension specifications
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Fri Oct 17 15:47:39 2014 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Wed Oct 22 13:34:16 2014 -0700
@@ -9081,35 +9081,6 @@
                         </li>
                         <li>
                           <p>
-                            Let <var>ecPrivateKey</var> be the result of performing the <a
-                            href="#concept-parse-an-asn1-structure">parse an ASN.1 structure</a>
-                            algorithm, with <var>data</var> as the <code>privateKey</code> field
-                            of <var>privateKeyInfo</var>, <var>structure</var> as the ASN.1
-                            <code>ECPrivateKey</code> structure specified in Section 3 of <a
-                            href="#RFC5915">RFC 5915</a>, and <var>exactData</var> set to true.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            If an error occurred while parsing,
-                            then <a href="#concept-return-an-error">return an error</a> named
-                            <a href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            If the <code>parameters</code> field of <var>ecPrivateKey</var> is
-                            present, and is not an instance of the <code>namedCurve</code> ASN.1
-                            type defined in <a href="#RFC5480">RFC 5480</a>, or does not contain
-                            the same object identifier as the <code>parameters</code> field of the
-                            <code>privateKeyAlgorithm</code> PrivateKeyAlgorithmIdentifier field
-                            of <var>privateKeyInfo</var>,
-                            then <a href="#concept-return-an-error">return an error</a> named
-                            <a href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
                             Let <var>namedCurve</var> be a string whose initial value is
                             undefined.
                           </p>
@@ -9149,12 +9120,45 @@
                           <dl class="switch">
                             <dt>If <var>namedCurve</var> is not undefined:</dt>
                             <dd>
-                              <p>
-                                Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
-                                object that represents the Elliptic Curve private key identified by
-                                performing the conversion steps defined in Section 3 of <a
-                                href="#RFC5915">RFC 5915</a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>ecPrivateKey</var> be the result of performing the <a
+                                    href="#concept-parse-an-asn1-structure">parse an ASN.1 structure</a>
+                                    algorithm, with <var>data</var> as the <code>privateKey</code> field
+                                    of <var>privateKeyInfo</var>, <var>structure</var> as the ASN.1
+                                    <code>ECPrivateKey</code> structure specified in Section 3 of <a
+                                    href="#RFC5915">RFC 5915</a>, and <var>exactData</var> set to true.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occurred while parsing,
+                                    then <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If the <code>parameters</code> field of <var>ecPrivateKey</var> is
+                                    present, and is not an instance of the <code>namedCurve</code> ASN.1
+                                    type defined in <a href="#RFC5480">RFC 5480</a>, or does not contain
+                                    the same object identifier as the <code>parameters</code> field of the
+                                    <code>privateKeyAlgorithm</code> PrivateKeyAlgorithmIdentifier field
+                                    of <var>privateKeyInfo</var>,
+                                    then <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
+                                    object that represents the Elliptic Curve private key identified by
+                                    performing the conversion steps defined in Section 3 of <a
+                                    href="#RFC5915">RFC 5915</a> using <var>ecPrivateKey</var>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
--- a/spec/Overview.html	Fri Oct 17 15:47:39 2014 -0700
+++ b/spec/Overview.html	Wed Oct 22 13:34:16 2014 -0700
@@ -28,7 +28,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>17 October 2014</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://www.google.com/">Ryan Sleevi</a>, Google, Inc. &lt;[email protected]&gt;</dd><dd><a href="http://www.netflix.com/">Mark Watson</a>, Netflix &lt;[email protected]&gt;</dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:[email protected]?subject=%5BWebCryptoAPI%5D">[email protected]</a> (<a href="http://lists.w3.org/Archives/Public/public-webcrypto/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=Web%20Cryptography&amp;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>22 October 2014</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://www.google.com/">Ryan Sleevi</a>, Google, Inc. &lt;[email protected]&gt;</dd><dd><a href="http://www.netflix.com/">Mark Watson</a>, Netflix &lt;[email protected]&gt;</dd><dt>Participate:</dt><dd><p>Send feedback to <a href="mailto:[email protected]?subject=%5BWebCryptoAPI%5D">[email protected]</a> (<a href="http://lists.w3.org/Archives/Public/public-webcrypto/">archives</a>), or <a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=Web%20Cryptography&amp;component=Web%20Cryptography%20API%20Document">file a bug</a> 
     (see <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=Web%20Cryptography&amp;component=Web%20Cryptography%20API%20Document&amp;resolution=---">existing bugs</a>).</p></dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; view <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</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">
@@ -56,7 +56,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 17 October 2014 <b>Editor’s Draft</b> of the
+        This document is the 22 October 2014 <b>Editor’s Draft</b> of the
         <cite>Web Cryptography API</cite> specification.
       
       Please send comments about this document to
@@ -8806,33 +8806,6 @@
                         </li>
                         <li>
                           <p>
-                            Let <var>ecPrivateKey</var> be the result of performing the <a href="#concept-parse-an-asn1-structure">parse an ASN.1 structure</a>
-                            algorithm, with <var>data</var> as the <code>privateKey</code> field
-                            of <var>privateKeyInfo</var>, <var>structure</var> as the ASN.1
-                            <code>ECPrivateKey</code> structure specified in Section 3 of <a href="#RFC5915">RFC 5915</a>, and <var>exactData</var> set to true.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            If an error occurred while parsing,
-                            then <a href="#concept-return-an-error">return an error</a> named
-                            <a href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            If the <code>parameters</code> field of <var>ecPrivateKey</var> is
-                            present, and is not an instance of the <code>namedCurve</code> ASN.1
-                            type defined in <a href="#RFC5480">RFC 5480</a>, or does not contain
-                            the same object identifier as the <code>parameters</code> field of the
-                            <code>privateKeyAlgorithm</code> PrivateKeyAlgorithmIdentifier field
-                            of <var>privateKeyInfo</var>,
-                            then <a href="#concept-return-an-error">return an error</a> named
-                            <a href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
                             Let <var>namedCurve</var> be a string whose initial value is
                             undefined.
                           </p>
@@ -8872,11 +8845,42 @@
                           <dl class="switch">
                             <dt>If <var>namedCurve</var> is not undefined:</dt>
                             <dd>
-                              <p>
-                                Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
-                                object that represents the Elliptic Curve private key identified by
-                                performing the conversion steps defined in Section 3 of <a href="#RFC5915">RFC 5915</a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>ecPrivateKey</var> be the result of performing the <a href="#concept-parse-an-asn1-structure">parse an ASN.1 structure</a>
+                                    algorithm, with <var>data</var> as the <code>privateKey</code> field
+                                    of <var>privateKeyInfo</var>, <var>structure</var> as the ASN.1
+                                    <code>ECPrivateKey</code> structure specified in Section 3 of <a href="#RFC5915">RFC 5915</a>, and <var>exactData</var> set to true.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occurred while parsing,
+                                    then <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If the <code>parameters</code> field of <var>ecPrivateKey</var> is
+                                    present, and is not an instance of the <code>namedCurve</code> ASN.1
+                                    type defined in <a href="#RFC5480">RFC 5480</a>, or does not contain
+                                    the same object identifier as the <code>parameters</code> field of the
+                                    <code>privateKeyAlgorithm</code> PrivateKeyAlgorithmIdentifier field
+                                    of <var>privateKeyInfo</var>,
+                                    then <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    Let <var>key</var> be a new <a href="#dfn-CryptoKey">CryptoKey</a>
+                                    object that represents the Elliptic Curve private key identified by
+                                    performing the conversion steps defined in Section 3 of <a href="#RFC5915">RFC 5915</a> using <var>ecPrivateKey</var>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>