The html5 tutorials

 
About HTML5
Home
Introduction to HTML5
Features of HTML5
Older versions Vs. HTML5
 
Tags  
source
article
aside
audio
canvas
command
datalist
details
embed
figcaption
figure
footer
header
hgroup
keygen
mark
meter
nav
output
progress
ruby
section
summary
time
video
wbr
 

The <keygen> Tag

The <keygen> tag is intended to be used in a form, along with other information which would help in creating a certificate request and after its generation the end result would be a signed certificate.

The tag would cause some sort of selection to be presented to the user of the page for selecting key size and the interface could be a menu, radio buttons, etc.

Using the canvas feature, one can control each and every pixel that is part of it. The element reduces the need to download images or graphics from a server.

This tag is provided to generate keys and to submit the public keys as part of HTML form. The private key is encrypted and stored in the local key database while the public key is packaged and sent to the server for authentication.

Example code:

<html>
  <body>
    <keygen name="name" challenge="challenge string" keytype="type" keyparams="pqg-params">
  </body>
</html>

Attributes of Canvas tag

The <keygen> tag has got the following attributes:

Attribute Values Description of the attribute
Autofocus disabled A boolean attribute that specifies its input focus at the time of page loading, unless the user overrides it.
challenge challenge A string which is submitted along with the public key. If it's not specified then it is an empty string by default.
disabled disabled The form control is not present for the user to interact it with so that the user cannot select it or write something into it
form name of the form specifies the form to which the input field is belonging
challenge challenge A string which is submitted along with the public key. If it's not specified then it is an empty string by default.
keytype chalrsa or unknown state the type of key being generated. By default it's RSA.
name name of the field defines a unique name of the control which is submitted with the form data