HTML - tags - <keygen>

#73 of 147
keygen
Next label
Prev kbd

 <html>
 <body>
     <form action="KeygenForm.aspx" method="POST">
         <p>
             Username: <input name="username" type="text" />
         </p>
         <p>
             Encryption: <keygen name="key" keytype="RSA" />
         </p>
         <input type="submit" />
     </form>
 </body>
 </html>
 

Supported keytype values are: RSA, DSA, and EC.

The keygen element facilitates the creation of a keypair for public key encryption.
The user is prompted to select a key strength, either High or Medium.
When the form is submitted the browser generates a keypair of the requested strength. The private key is stored in the local database, and the public key is submitted with the form data.

Deprecated

A live example:


Username:

Encryption:


If you don't see a combo box next to the Encryption field, try FireFox.

Firefox will briefly display the following dialog:

[firefox-keygen.gif]

And then submit username and key in the form data, in this case a POST request.

username = test
key =
MIIBOjCBpDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6yjz6N7+inCiXcwN
vRNvhZ+D6limWj/F1YpJs+c2kQUo2yDv0ofhe0hC3GQ/r2IdYry/24Cj6ScV0yQA
sqZi5Mc5yJ92/FNykl9ssPdaXikeWiMX5pzASarnHLFElbAJF7uHwcXvoycysEC6
/MU4W8CK4CMjPX2gD3X+3+i460UCAwEAARYAMA0GCSqGSIb3DQEBBAUAA4GBAJjy
LK7caOgc8ZR59q3sLUsJjudszOoKsYFYuhtD5azJYk+0zFpZtKdwPz41TiTvhACv
UUYLHJrtOfF+7VIFviGunXZTCFFVaeahBXSXuMZv/Q7XzWcDeAz6LPeCQGpD9eV1
jp4OZOzttmKzhXjG/qCwDf3cP1g1US/R/SJcNGrH

N of

Ads by Google

Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath