Bug 25618: Revised has algorithm extensibility for RSA-SSA
authorMark Watson <watsonm@netflix.com>
Wed, 15 Oct 2014 12:48:12 -0700
changeset 247 4677d99c9a2e
parent 246 dbdc7abe4e32
child 248 ae06638b018b
Bug 25618: Revised has algorithm extensibility for RSA-SSA
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Fri Sep 26 11:50:02 2014 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Wed Oct 15 12:48:12 2014 -0700
@@ -345,8 +345,23 @@
             specification to their activities decides that they will recognize the requirements of 
             such an extension specification, it becomes an
             <dfn id='dfn-applicable-specification'>applicable specification</dfn> for the purposes 
-            of conformance requirements in this specification.
-          </p>
+            of conformance requirements in this specification. Applicable specifications defined
+            by the W3C WebCrypto Working Group are listed in the table below.
+          </p>
+          <p>
+            <table>
+              <tbody>
+                <tr>
+                  <td>Specification</td>
+                  <td>Reference</td>
+                </tr>
+              </tbody>
+            </table>
+          </p>
+          <div class="note">
+            Readers are advised to consult the errata to this specification for updates to the table
+            above.
+          </div>
         </div>
       </div>
 
@@ -4136,34 +4151,6 @@
                   <p>Let <var>keyData</var> be the key data to be imported.</p>
                 </li>
                 <li>
-                  <p>
-                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key import steps</a>
-                    defined by <a href="#dfn-applicable-specifications">other applicable
-                    specifications</a>, passing <var>keyData</var> and obtaining <var>result</var>.
-                    <dl class="switch">
-                      <dt>
-                        If <var>result</var> is a <a href="#dfn-CryptoKey">CryptoKey</a>
-                        object
-                      </dt>
-                      <dd>
-                        <p>
-                          Return <var>result</var>.
-                        </p>
-                      </dd>
-                      <dt>
-                        If <var>result</var> is an error with a name that is not
-                        <a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>
-                      </dt>
-                      <dd>
-                        <p>
-                          <a href="#concept-return-an-error">Return an error</a> with the same name
-                          as <var>result</var>.
-                        </p>
-                      </dd>
-                    </dl>
-                  </p>
-                </li>
-                <li>
                   <dl class="switch">
                     <dt>If <var>format</var> is <code>"spki"</code>:</dt>
                     <dd>
@@ -4192,7 +4179,7 @@
                         </li>
                         <li>
                           <p>
-                            Let <var>hash</var> be a string whose initial value is undefined.
+                            Let <var>hash</var> be undefined.
                           </p>
                         </li>
                         <li>
@@ -4255,30 +4242,56 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-DataError"><code>DataError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key
+                                    import steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>spki</var>
+                                    and obtaining <var>hash</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
                         <li>
-                          <p>
-                            If <var>hash</var> is defined, and is not equal to the <a
-                            href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a
-                            href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>, <a
-                            href="#concept-return-an-error">return an error</a> named <a
-                            href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            Set <var>hash</var> to the <a
-                            href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a
-                            href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>.
-                          </p>
+                          <dl>
+                            <dt>
+                              If <var>hash</var> is not undefined:
+                            </dt>
+                            <dd>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>normalizedHash</var> be the result of
+                                    <a href="#dfn-normalize-an-algorithm">normalize an algorithm</a>
+                                    with <code>alg</code> set to <var>hash</var> and <code>op</code> set
+                                    to <code>digest</code>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If <var>normalizedHash</var> is not equal to the
+                                    <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                                    <var>normalizedAlgorithm</var>, <a
+                                    href="#concept-return-an-error">return an error</a> named <a
+                                    href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
+                            </dd>
+                          </dl>
                         </li>
                         <li>
                           <p>
@@ -4340,7 +4353,7 @@
                         </li>
                         <li>
                           <p>
-                            Let <var>hash</var> be a string whose initial value is undefined.
+                            Let <var>hash</var> be undefined.
                           </p>
                         </li>
                         <li>
@@ -4403,30 +4416,56 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-DataError"><code>DataError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key
+                                    import steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>privateKeyInfo</var>
+                                    and obtaining <var>hash</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
                         <li>
-                          <p>
-                            If <var>hash</var> is defined, and is not equal to the <a
-                            href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a
-                            href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>, <a
-                            href="#concept-return-an-error">return an error</a> named <a
-                            href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            Set <var>hash</var> to the <a
-                            href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a
-                            href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>.
-                          </p>
+                          <dl>
+                            <dt>
+                              If <var>hash</var> is not undefined:
+                            </dt>
+                            <dd>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>normalizedHash</var> be the result of
+                                    <a href="#dfn-normalize-an-algorithm">normalize an algorithm</a>
+                                    with <code>alg</code> set to <var>hash</var> and <code>op</code> set
+                                    to <code>digest</code>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If <var>normalizedHash</var> is not equal to the
+                                    <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                                    <var>normalizedAlgorithm</var>, <a
+                                    href="#concept-return-an-error">return an error</a> named <a
+                                    href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
+                            </dd>
+                          </dl>
                         </li>
                         <li>
                           <p>
@@ -4563,10 +4602,54 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-DataError"><code>DataError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key
+                                    import steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>jwk</var>
+                                    and obtaining <var>hash</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
+                            </dd>
+                          </dl>
+                        </li>
+                        <li>
+                          <dl>
+                            <dt>
+                              If <var>hash</var> is not undefined:
+                            </dt>
+                            <dd>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>normalizedHash</var> be the result of
+                                    <a href="#dfn-normalize-an-algorithm">normalize an algorithm</a>
+                                    with <code>alg</code> set to <var>hash</var> and <code>op</code> set
+                                    to <code>digest</code>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If <var>normalizedHash</var> is not equal to the
+                                    <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                                    <var>normalizedAlgorithm</var>, <a
+                                    href="#concept-return-an-error">return an error</a> named <a
+                                    href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
@@ -4669,8 +4752,9 @@
                 <li>
                   <p>
                     Set the <a href="#dfn-RsaHashedKeyAlgorithm-hash">hash</a> attribute of
-                    <var>algorithm</var> to a new <a href="#dfn-KeyAlgorithm">KeyAlgorithm</a>
-                    whose <a href="#dfn-KeyAlgorithm-name">name</a> attribute is <var>hash</var>.
+                    <var>algorithm</var> to the <a
+                    href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                    <var>normalizedAlgorithm</var>.
                   </p>
                 </li>
                 <li>
@@ -4702,44 +4786,6 @@
                   </p>
                 </li>
                 <li>
-                  <p>
-                    Perform any <a href="#dfn-rsa-ssa-extended-export-steps">key export steps</a>
-                    defined by <a href="#dfn-applicable-specifications">other applicable
-                    specifications</a>, passing <var>key</var> and obtaining <var>result</var>.
-                    <dl class="switch">
-                      <dt>
-                        If <var>format</var> is <code>"spki"</code> or <code>"pkcs8"</code> and
-                        <var>result</var> is an <a href="#dfn-ArrayBuffer">ArrayBuffer</a>
-                        object
-                      </dt>
-                      <dd>
-                        <p>
-                          Return <var>result</var>.
-                        </p>
-                      </dd>
-                      <dt>
-                        If <var>format</var> is <code>"jwk"</code> and
-                        <var>result</var> is not an error
-                      </dt>
-                      <dd>
-                        <p>
-                          Return <var>result</var>.
-                        </p>
-                      </dd>
-                      <dt>
-                        If <var>result</var> is an error with a name that is not
-                        <a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>
-                      </dt>
-                      <dd>
-                        <p>
-                          <a href="#concept-return-an-error">Return an error</a> with the same name
-                          as <var>result</var>.
-                        </p>
-                      </dd>
-                    </dl>
-                  </p>
-                </li>
-                <li>
                   <dl class="switch">
                     <dt>If <var>format</var> is <code>"spki"</code></dt>
                     <dd>
@@ -4919,18 +4965,35 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-export-steps">key
+                                    export steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>key</var>
+                                    and obtaining <var>alg</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    Set the <code>alg</code> attribute of <var>jwk</var> to <var>alg</var>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
                         <li>
-                          <p>Set the <code>alg</code> attribute of <var>jwk</var> to the string
-                          <code>"RSA1_5"</code>.</p>
-                        </li>
-                        <li>
                           <p>
                             Set the attributes <code>n</code> and <code>e</code> of <var>jwk</var>
                             according to the corresponding definitions in <a href="#jwa">JSON Web
--- a/spec/Overview.html	Fri Sep 26 11:50:02 2014 -0700
+++ b/spec/Overview.html	Wed Oct 15 12:48:12 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>26 September 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>15 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 26 September 2014 <b>Editor’s Draft</b> of the
+        This document is the 15 October 2014 <b>Editor’s Draft</b> of the
         <cite>Web Cryptography API</cite> specification.
       
       Please send comments about this document to
@@ -353,8 +353,23 @@
             specification to their activities decides that they will recognize the requirements of 
             such an extension specification, it becomes an
             <dfn id="dfn-applicable-specification">applicable specification</dfn> for the purposes 
-            of conformance requirements in this specification.
-          </p>
+            of conformance requirements in this specification. Applicable specifications defined
+            by the W3C WebCrypto Working Group are listed in the table below.
+          </p>
+          <p>
+            <table>
+              <tbody>
+                <tr>
+                  <td>Specification</td>
+                  <td>Reference</td>
+                </tr>
+              </tbody>
+            </table>
+          </p>
+          <div class="note"><div class="noteHeader">Note</div>
+            Readers are advised to consult the errata to this specification for updates to the table
+            above.
+          </div>
         </div>
       </div>
 
@@ -4065,34 +4080,6 @@
                   <p>Let <var>keyData</var> be the key data to be imported.</p>
                 </li>
                 <li>
-                  <p>
-                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key import steps</a>
-                    defined by <a href="#dfn-applicable-specifications">other applicable
-                    specifications</a>, passing <var>keyData</var> and obtaining <var>result</var>.
-                    <dl class="switch">
-                      <dt>
-                        If <var>result</var> is a <a href="#dfn-CryptoKey">CryptoKey</a>
-                        object
-                      </dt>
-                      <dd>
-                        <p>
-                          Return <var>result</var>.
-                        </p>
-                      </dd>
-                      <dt>
-                        If <var>result</var> is an error with a name that is not
-                        <a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>
-                      </dt>
-                      <dd>
-                        <p>
-                          <a href="#concept-return-an-error">Return an error</a> with the same name
-                          as <var>result</var>.
-                        </p>
-                      </dd>
-                    </dl>
-                  </p>
-                </li>
-                <li>
                   <dl class="switch">
                     <dt>If <var>format</var> is <code>"spki"</code>:</dt>
                     <dd>
@@ -4121,7 +4108,7 @@
                         </li>
                         <li>
                           <p>
-                            Let <var>hash</var> be a string whose initial value is undefined.
+                            Let <var>hash</var> be undefined.
                           </p>
                         </li>
                         <li>
@@ -4184,24 +4171,54 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-DataError"><code>DataError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key
+                                    import steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>spki</var>
+                                    and obtaining <var>hash</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
                         <li>
-                          <p>
-                            If <var>hash</var> is defined, and is not equal to the <a href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>, <a href="#concept-return-an-error">return an error</a> named <a href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            Set <var>hash</var> to the <a href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>.
-                          </p>
+                          <dl>
+                            <dt>
+                              If <var>hash</var> is not undefined:
+                            </dt>
+                            <dd>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>normalizedHash</var> be the result of
+                                    <a href="#dfn-normalize-an-algorithm">normalize an algorithm</a>
+                                    with <code>alg</code> set to <var>hash</var> and <code>op</code> set
+                                    to <code>digest</code>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If <var>normalizedHash</var> is not equal to the
+                                    <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                                    <var>normalizedAlgorithm</var>, <a href="#concept-return-an-error">return an error</a> named <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
+                            </dd>
+                          </dl>
                         </li>
                         <li>
                           <p>
@@ -4262,7 +4279,7 @@
                         </li>
                         <li>
                           <p>
-                            Let <var>hash</var> be a string whose initial value is undefined.
+                            Let <var>hash</var> be undefined.
                           </p>
                         </li>
                         <li>
@@ -4325,24 +4342,54 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-DataError"><code>DataError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key
+                                    import steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>privateKeyInfo</var>
+                                    and obtaining <var>hash</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
                         <li>
-                          <p>
-                            If <var>hash</var> is defined, and is not equal to the <a href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>, <a href="#concept-return-an-error">return an error</a> named <a href="#dfn-DataError"><code>DataError</code></a>.
-                          </p>
-                        </li>
-                        <li>
-                          <p>
-                            Set <var>hash</var> to the <a href="#dfn-AlgorithmIdentifier-name">name</a> member of the <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
-                            <var>normalizedAlgorithm</var>.
-                          </p>
+                          <dl>
+                            <dt>
+                              If <var>hash</var> is not undefined:
+                            </dt>
+                            <dd>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>normalizedHash</var> be the result of
+                                    <a href="#dfn-normalize-an-algorithm">normalize an algorithm</a>
+                                    with <code>alg</code> set to <var>hash</var> and <code>op</code> set
+                                    to <code>digest</code>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If <var>normalizedHash</var> is not equal to the
+                                    <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                                    <var>normalizedAlgorithm</var>, <a href="#concept-return-an-error">return an error</a> named <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
+                            </dd>
+                          </dl>
                         </li>
                         <li>
                           <p>
@@ -4478,10 +4525,52 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-DataError"><code>DataError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-import-steps">key
+                                    import steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>jwk</var>
+                                    and obtaining <var>hash</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
+                            </dd>
+                          </dl>
+                        </li>
+                        <li>
+                          <dl>
+                            <dt>
+                              If <var>hash</var> is not undefined:
+                            </dt>
+                            <dd>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Let <var>normalizedHash</var> be the result of
+                                    <a href="#dfn-normalize-an-algorithm">normalize an algorithm</a>
+                                    with <code>alg</code> set to <var>hash</var> and <code>op</code> set
+                                    to <code>digest</code>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If <var>normalizedHash</var> is not equal to the
+                                    <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                                    <var>normalizedAlgorithm</var>, <a href="#concept-return-an-error">return an error</a> named <a href="#dfn-DataError"><code>DataError</code></a>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
@@ -4580,8 +4669,8 @@
                 <li>
                   <p>
                     Set the <a href="#dfn-RsaHashedKeyAlgorithm-hash">hash</a> attribute of
-                    <var>algorithm</var> to a new <a href="#dfn-KeyAlgorithm">KeyAlgorithm</a>
-                    whose <a href="#dfn-KeyAlgorithm-name">name</a> attribute is <var>hash</var>.
+                    <var>algorithm</var> to the <a href="#dfn-RsaHashedImportParams-hash">hash</a> member of
+                    <var>normalizedAlgorithm</var>.
                   </p>
                 </li>
                 <li>
@@ -4821,18 +4910,35 @@
                             </dd>
                             <dt>Otherwise:</dt>
                             <dd>
-                              <p>
-                                <a href="#concept-return-an-error">Return an error</a> named
-                                <a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
-                              </p>
+                              <ol>
+                                <li>
+                                  <p>
+                                    Perform any <a href="#dfn-rsa-ssa-extended-export-steps">key
+                                    export steps</a> defined by
+                                    <a href="#dfn-applicable-specifications">other applicable
+                                    specifications</a>, passing <var>format</var>, <var>key</var>
+                                    and obtaining <var>alg</var>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    If an error occured or there are no
+                                    <a href="#dfn-applicable-specifications">applicable
+                                    specifications</a>,
+                                    <a href="#concept-return-an-error">return an error</a> named
+                                    <a href="#dfn-NotSupportedError"><code>NotSupportedError</code></a>.
+                                  </p>
+                                </li>
+                                <li>
+                                  <p>
+                                    Set the <code>alg</code> attribute of <var>jwk</var> to <var>alg</var>.
+                                  </p>
+                                </li>
+                              </ol>
                             </dd>
                           </dl>
                         </li>
                         <li>
-                          <p>Set the <code>alg</code> attribute of <var>jwk</var> to the string
-                          <code>"RSA1_5"</code>.</p>
-                        </li>
-                        <li>
                           <p>
                             Set the attributes <code>n</code> and <code>e</code> of <var>jwk</var>
                             according to the corresponding definitions in <a href="#jwa">JSON Web