Bug 26741: Reject invalid EC public keys for ECDH
authorMark Watson <watsonm@netflix.com>
Thu, 30 Oct 2014 15:51:44 -0700
changeset 272 59c5870bf638
parent 271 e4b4b28e81af
child 273 c837a411bbb3
Bug 26741: Reject invalid EC public keys for ECDH
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Thu Oct 30 15:49:37 2014 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Thu Oct 30 15:51:44 2014 -0700
@@ -10445,6 +10445,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>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"public"</code>
                           </p>
@@ -10654,6 +10664,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>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"private"</code>.
                           </p>
@@ -10856,6 +10876,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:49:37 2014 -0700
+++ b/spec/Overview.html	Thu Oct 30 15:51:44 2014 -0700
@@ -10102,6 +10102,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>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"public"</code>
                           </p>
@@ -10304,6 +10311,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>
                             Set the [[<a href="#dfn-CryptoKey-slot-type">type</a>]] internal slot
                             of <var>key</var> to <code>"private"</code>.
                           </p>
@@ -10494,6 +10508,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>