Bug 25618: ECDH: delegate decoding of pkcs8 private key structure to extension specifications
authorMark Watson <watsonm@netflix.com>
Wed, 22 Oct 2014 13:37:31 -0700
changeset 259 be599c620546
parent 258 b71fc3eaf6db
child 260 a0373bd1637b
Bug 25618: ECDH: delegate decoding of pkcs8 private key structure to extension specifications
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Wed Oct 22 13:34:16 2014 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Wed Oct 22 13:37:31 2014 -0700
@@ -10593,35 +10593,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>,
-                            <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>
@@ -10661,12 +10632,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>,
+                                    <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	Wed Oct 22 13:34:16 2014 -0700
+++ b/spec/Overview.html	Wed Oct 22 13:37:31 2014 -0700
@@ -10249,35 +10249,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>,
-                            <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>
@@ -10317,11 +10288,44 @@
                           <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>,
+                                    <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>