BUG 22642: Clarify Import/Export parameters and results.
authorRyan Sleevi <sleevi@google.com>
Mon, 22 Jul 2013 12:08:31 -0700
changeset 68 5cf8db70af2e
parent 67 1ab461fb0e57
child 69 da5f848fa8a7
BUG 22642: Clarify Import/Export parameters and results.

The only import that takes any parameters is the HMAC key. All others are
inferred from the actual contents (eg: SPKI -> public key, PKCS8 -> private key,
JWK based on type, raw -> length inferred by octets)

Future updates will include normative text for algorithm families (eg: what it
means to import an AES or RSA key) for each supported format (raw, spki, pkcs8,
jwk). This includes text to say that "raw" is not valid for RSA, for example.

The output format is currently ArrayBuffer, contingent upon the resolution of
whether JWKs are represented as DOMStrings (internally JSON.parsed) or as
dictionary/interfaces (eg: that can be used with JSON.stringify by the caller)
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Mon Jul 22 12:08:26 2013 -0700
+++ b/spec/Overview-WebCryptoAPI.xml	Mon Jul 22 12:08:31 2013 -0700
@@ -2238,17 +2238,17 @@
                 <tr>
                   <td>encrypt</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
               </tbody>
             </table>
@@ -2404,6 +2404,10 @@
               <dt>Generate Key</dt>
               <dd>
               </dd>
+              <dt>Import Key</dt>
+              <dd></dd>
+              <dt>Export Key</dt>
+              <dd></dd>
             </dl>
           </div>
         </div>
@@ -2436,7 +2440,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-RsaSsaParams">RsaSsaParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -2446,7 +2450,7 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
               </tbody>
             </table>
@@ -2466,6 +2470,8 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
+              <li>Import Key</li>
+              <li>Export Key</li>
             </ul>
           </div>
         </div>
@@ -2499,7 +2505,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-RsaPssParams">RsaPssParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -2509,7 +2515,17 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -2531,6 +2547,8 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
+              <li>Import Key</li>
+              <li>Export Key</li>
             </ul>
           </div>
         </div>
@@ -2564,27 +2582,37 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
                 <tr>
                   <td>wrapKey</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>unwrapKey</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -2646,7 +2674,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-EcdsaParams">EcdsaParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -2656,7 +2684,17 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-EcKeyGenParams">EcKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
 
               </tbody>
@@ -2890,13 +2928,24 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-EcKeyGenParams">EcKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-EcdhKeyDeriveParams">EcdhKeyDeriveParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -2961,17 +3010,27 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-AesCtrParams">AesCtrParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-AesCtrParams">AesCtrParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -3010,6 +3069,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
+              <li>Import Key</li>
+              <li>Export Key</li>
+
             </ul>
           </div>
         </div>
@@ -3051,18 +3113,29 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-AesCbcParams">AesCbcParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-AesCbcParams">AesCbcParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3081,7 +3154,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3114,7 +3189,7 @@
                 <tr>
                   <td>sign</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -3124,8 +3199,19 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3135,7 +3221,9 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3162,18 +3250,29 @@
                  <tr>
                    <td>encrypt</td>
                    <td><a href="#dfn-AesGcmParams">AesGcmParams</a></td>
-                   <td>ArrayBuffer?</td>
+                   <td>ArrayBuffer</td>
                  </tr>
                  <tr>
                    <td>decrypt</td>
                    <td><a href="#dfn-AesGcmParams">AesGcmParams</a></td>
-                   <td>ArrayBuffer?</td>
+                   <td>ArrayBuffer</td>
                  </tr>
                  <tr>
                    <td>generateKey</td>
                    <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                   <td><a href="#dfn-Key">Key</a>?</td>
+                   <td><a href="#dfn-Key">Key</a></td>
                  </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
                </tbody>
              </table>
            </div>
@@ -3196,7 +3295,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3230,18 +3331,29 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-AesCfbParams">AesCfbParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-AesCfbParams">AesCfbParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3260,7 +3372,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3287,7 +3401,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-HmacParams">HmacParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -3297,7 +3411,17 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-HmacParams">HmacParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td><a href="#dfn-HmacParams">HmacParams</a></td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -3317,7 +3441,9 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
         <div id="dh" class="section">
@@ -3347,13 +3473,24 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-DhKeyGenParams">DhKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-DhKeyDeriveParams">DhKeyDeriveParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3382,7 +3519,9 @@
             <ul>
               <li>Generate Key</li>
               <li>Derive Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
         <div id="sha" class="section">
@@ -3424,7 +3563,7 @@
                 <tr>
                   <td>digest</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -3464,7 +3603,7 @@
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-ConcatParams">ConcatParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
               </tbody>
             </table>
@@ -3531,7 +3670,7 @@
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-HkdfCtrParams">HkdfCtrParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
               </tbody>
             </table>
@@ -3591,7 +3730,7 @@
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-Pbkdf2Params">Pbkdf2Params</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
               </tbody>
             </table>
--- a/spec/Overview.html	Mon Jul 22 12:08:26 2013 -0700
+++ b/spec/Overview.html	Mon Jul 22 12:08:31 2013 -0700
@@ -2247,17 +2247,17 @@
                 <tr>
                   <td>encrypt</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
               </tbody>
             </table>
@@ -2413,6 +2413,10 @@
               <dt>Generate Key</dt>
               <dd>
               </dd>
+              <dt>Import Key</dt>
+              <dd></dd>
+              <dt>Export Key</dt>
+              <dd></dd>
             </dl>
           </div>
         </div>
@@ -2445,7 +2449,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-RsaSsaParams">RsaSsaParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -2455,7 +2459,7 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
               </tbody>
             </table>
@@ -2475,6 +2479,8 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
+              <li>Import Key</li>
+              <li>Export Key</li>
             </ul>
           </div>
         </div>
@@ -2508,7 +2514,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-RsaPssParams">RsaPssParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -2518,7 +2524,17 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -2540,6 +2556,8 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
+              <li>Import Key</li>
+              <li>Export Key</li>
             </ul>
           </div>
         </div>
@@ -2573,27 +2591,37 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-RsaKeyGenParams">RsaKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
                 <tr>
                   <td>wrapKey</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>unwrapKey</td>
                   <td><a href="#dfn-RsaOaepParams">RsaOaepParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -2655,7 +2683,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-EcdsaParams">EcdsaParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -2665,7 +2693,17 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-EcKeyGenParams">EcKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
 
               </tbody>
@@ -2899,13 +2937,24 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-EcKeyGenParams">EcKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-EcdhKeyDeriveParams">EcdhKeyDeriveParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -2970,17 +3019,27 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-AesCtrParams">AesCtrParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-AesCtrParams">AesCtrParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -3019,6 +3078,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
+              <li>Import Key</li>
+              <li>Export Key</li>
+
             </ul>
           </div>
         </div>
@@ -3060,18 +3122,29 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-AesCbcParams">AesCbcParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-AesCbcParams">AesCbcParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3090,7 +3163,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3123,7 +3198,7 @@
                 <tr>
                   <td>sign</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -3133,8 +3208,19 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3144,7 +3230,9 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3171,18 +3259,29 @@
                  <tr>
                    <td>encrypt</td>
                    <td><a href="#dfn-AesGcmParams">AesGcmParams</a></td>
-                   <td>ArrayBuffer?</td>
+                   <td>ArrayBuffer</td>
                  </tr>
                  <tr>
                    <td>decrypt</td>
                    <td><a href="#dfn-AesGcmParams">AesGcmParams</a></td>
-                   <td>ArrayBuffer?</td>
+                   <td>ArrayBuffer</td>
                  </tr>
                  <tr>
                    <td>generateKey</td>
                    <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                   <td><a href="#dfn-Key">Key</a>?</td>
+                   <td><a href="#dfn-Key">Key</a></td>
                  </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
                </tbody>
              </table>
            </div>
@@ -3205,7 +3304,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3239,18 +3340,29 @@
                 <tr>
                   <td>encrypt</td>
                   <td><a href="#dfn-AesCfbParams">AesCfbParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>decrypt</td>
                   <td><a href="#dfn-AesCfbParams">AesCfbParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-AesKeyGenParams">AesKeyGenParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3269,7 +3381,9 @@
               <li>Encrypt</li>
               <li>Decrypt</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
 
@@ -3296,7 +3410,7 @@
                 <tr>
                   <td>sign</td>
                   <td><a href="#dfn-HmacParams">HmacParams</a></td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
                 <tr>
                   <td>verify</td>
@@ -3306,7 +3420,17 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-HmacParams">HmacParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td><a href="#dfn-HmacParams">HmacParams</a></td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -3326,7 +3450,9 @@
               <li>Sign</li>
               <li>Verify</li>
               <li>Generate Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
         <div id="dh" class="section">
@@ -3356,13 +3482,24 @@
                 <tr>
                   <td>generateKey</td>
                   <td><a href="#dfn-DhKeyGenParams">DhKeyGenParams</a></td>
-                  <td><a href="#dfn-KeyPair">KeyPair</a>?</td>
+                  <td><a href="#dfn-KeyPair">KeyPair</a></td>
                 </tr>
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-DhKeyDeriveParams">DhKeyDeriveParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
+                <tr>
+                  <td>importKey</td>
+                  <td>None</td>
+                  <td><a href="#dfn-Key">Key</a></td>
+                </tr>
+                <tr>
+                  <td>exportKey</td>
+                  <td>None</td>
+                  <td>ArrayBuffer</td>
+                </tr>
+
               </tbody>
             </table>
           </div>
@@ -3391,7 +3528,9 @@
             <ul>
               <li>Generate Key</li>
               <li>Derive Key</li>
-            </ul>
+              <li>Import Key</li>
+              <li>Export Key</li>
+           </ul>
           </div>
         </div>
         <div id="sha" class="section">
@@ -3433,7 +3572,7 @@
                 <tr>
                   <td>digest</td>
                   <td>None</td>
-                  <td>ArrayBuffer?</td>
+                  <td>ArrayBuffer</td>
                 </tr>
               </tbody>
             </table>
@@ -3473,7 +3612,7 @@
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-ConcatParams">ConcatParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
               </tbody>
             </table>
@@ -3540,7 +3679,7 @@
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-HkdfCtrParams">HkdfCtrParams</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
               </tbody>
             </table>
@@ -3600,7 +3739,7 @@
                 <tr>
                   <td>deriveKey</td>
                   <td><a href="#dfn-Pbkdf2Params">Pbkdf2Params</a></td>
-                  <td><a href="#dfn-Key">Key</a>?</td>
+                  <td><a href="#dfn-Key">Key</a></td>
                 </tr>
               </tbody>
             </table>