Bug 24830 (part 3) Add check for matching curves for ECDH derive bits
authorMark Watson <watsonm@netflix.com>
Fri, 28 Feb 2014 16:22:07 -0800
changeset 144 53c3341698aa
parent 143 652347d84a62
child 145 aa2535681aa5
Bug 24830 (part 3) Add check for matching curves for ECDH derive bits
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Fri Feb 28 16:19:40 2014 -0800
+++ b/spec/Overview-WebCryptoAPI.xml	Fri Feb 28 16:22:07 2014 -0800
@@ -5291,6 +5291,16 @@
                 </li>
                 <li>
                   <p>
+                    If the <a href="#dfn-EcKeyAlgorithm-namedCurve">namedCurve</a> property of
+                    the <a href="#dfn-Key-algorithm">algorithm</a> property of <var>publicKey</var>
+                    is not equal to the <a href="#dfn-EcKeyAlgorithm-namedCurve">namedCurve</a>
+                    property of
+                    the <a href="#dfn-Key-algorithm">algorithm</a> property of <var>key</var>,
+                    terminate this algorithm with an error.
+                  </p>
+                </li>
+                <li>
+                  <p>
                     Perform the ECDH primitive specified in <a href="#X9.63">X9.63</a> Section 5.4.1
                     with <var>key</var> as the EC private key <var>d</var> and the EC public key
                     represented by <var>publicKey</var> as the EC public key <var>Q</var>.
--- a/spec/Overview.html	Fri Feb 28 16:19:40 2014 -0800
+++ b/spec/Overview.html	Fri Feb 28 16:22:07 2014 -0800
@@ -5284,6 +5284,16 @@
                 </li>
                 <li>
                   <p>
+                    If the <a href="#dfn-EcKeyAlgorithm-namedCurve">namedCurve</a> property of
+                    the <a href="#dfn-Key-algorithm">algorithm</a> property of <var>publicKey</var>
+                    is not equal to the <a href="#dfn-EcKeyAlgorithm-namedCurve">namedCurve</a>
+                    property of
+                    the <a href="#dfn-Key-algorithm">algorithm</a> property of <var>key</var>,
+                    terminate this algorithm with an error.
+                  </p>
+                </li>
+                <li>
+                  <p>
                     Perform the ECDH primitive specified in <a href="#X9.63">X9.63</a> Section 5.4.1
                     with <var>key</var> as the EC private key <var>d</var> and the EC public key
                     represented by <var>publicKey</var> as the EC public key <var>Q</var>.