Bug 26741: Reject invalid EC public keys for ECDSA
authorMark Watson <watsonm@netflix.com>
Thu, 30 Oct 2014 15:49:37 -0700
changeset 271 e4b4b28e81af
parent 270 7ef23133ecff
child 272 59c5870bf638
Bug 26741: Reject invalid EC public keys for ECDSA
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Thu Oct 30 15:27:45 2014 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Thu Oct 30 15:49:37 2014 -0700
@@ -8916,6 +8916,16 @@
                         </li>
                         <li>
                           <p>
+                            If the public key value is not a valid point on the Elliptic Curve
+                            identified by the <a
+                            href="#dfn-EcKeyImportParams-namedCurve">namedCurve</a> member of
+                            <var>normalizedAlgorithm</var> <a
+                            href="#concept-throw">throw</a> a <a
+                            href="#dfn-DataError"><code>DataError</code></a>.
+                          </p>
+                        </li>
+                        <li>
+                          <p>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"public"</code>
                           </p>
@@ -9125,6 +9135,16 @@
                         </li>
                         <li>
                           <p>
+                            If the private key value is not a valid point on the Elliptic Curve
+                            identified by the <a
+                            href="#dfn-EcKeyImportParams-namedCurve">namedCurve</a> member of
+                            <var>normalizedAlgorithm</var> <a
+                            href="#concept-throw">throw</a> a <a
+                            href="#dfn-DataError"><code>DataError</code></a>.
+                          </p>
+                        </li>
+                        <li>
+                          <p>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"private"</code>
                           </p>
@@ -9374,6 +9394,16 @@
                         </li>
                         <li>
                           <p>
+                            If the key value is not a valid point on the Elliptic Curve
+                            identified by the <a
+                            href="#dfn-EcKeyImportParams-namedCurve">namedCurve</a> member of
+                            <var>normalizedAlgorithm</var> <a
+                            href="#concept-throw">throw</a> a <a
+                            href="#dfn-DataError"><code>DataError</code></a>.
+                          </p>
+                        </li>
+                        <li>
+                          <p>
                             Let <var>algorithm</var> be a new instance of an <a
                             href="#dfn-EcKeyAlgorithm">EcKeyAlgorithm</a> object.
                           </p>
--- a/spec/Overview.html	Thu Oct 30 15:27:45 2014 -0700
+++ b/spec/Overview.html	Thu Oct 30 15:49:37 2014 -0700
@@ -8652,6 +8652,13 @@
                         </li>
                         <li>
                           <p>
+                            If the public key value is not a valid point on the Elliptic Curve
+                            identified by the <a href="#dfn-EcKeyImportParams-namedCurve">namedCurve</a> member of
+                            <var>normalizedAlgorithm</var> <a href="#concept-throw">throw</a> a <a href="#dfn-DataError"><code>DataError</code></a>.
+                          </p>
+                        </li>
+                        <li>
+                          <p>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"public"</code>
                           </p>
@@ -8851,6 +8858,13 @@
                         </li>
                         <li>
                           <p>
+                            If the private key value is not a valid point on the Elliptic Curve
+                            identified by the <a href="#dfn-EcKeyImportParams-namedCurve">namedCurve</a> member of
+                            <var>normalizedAlgorithm</var> <a href="#concept-throw">throw</a> a <a href="#dfn-DataError"><code>DataError</code></a>.
+                          </p>
+                        </li>
+                        <li>
+                          <p>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"private"</code>
                           </p>
@@ -9088,6 +9102,13 @@
                         </li>
                         <li>
                           <p>
+                            If the key value is not a valid point on the Elliptic Curve
+                            identified by the <a href="#dfn-EcKeyImportParams-namedCurve">namedCurve</a> member of
+                            <var>normalizedAlgorithm</var> <a href="#concept-throw">throw</a> a <a href="#dfn-DataError"><code>DataError</code></a>.
+                          </p>
+                        </li>
+                        <li>
+                          <p>
                             Let <var>algorithm</var> be a new instance of an <a href="#dfn-EcKeyAlgorithm">EcKeyAlgorithm</a> object.
                           </p>
                         </li>