Description:

The HTML <keygen> tag is used for generating a key pair. When the control's form is submitted, the private key is stored in the local keystore, and the public key is packaged and sent to the server.


This tag is deprecated in HTML5

Example Code:
<form method="post" action="http://www.ornl.gov/cgi-bin/cgiwrap/ncsgroup/decode/decode.cgi?pagename=Form+2">
<keygen name="name" challenge="596461864" keytype="EC" keyparams="pqg-params">
<input type="submit" name="createcert" value="Generate">
</form>
Result:
Attributes:
Attribute Definition
autofocus Specifies that a [keygen] element should automatically get focus when the page loads
challenge Specifies whether or not the value of the keygen is be challenged when submitted
disabled Disables the control. The control won't accept changes from the user. It also cannot receive focus and will be skipped when tabbing
form Specifies the ID of a form to which this control belongs
keytype Specifies a key type. For example, the value "RSA" specifies an RSA key
name Assigns a name to the input control
Global Attributes:

The <keygen> tag also supports the Global Attributes in HTML5

Event Attributes:

The <keygen> tag also supports the Event Attributes in HTML5



Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.