HTML <keygen> Tag

<form action="keygen_action.cfm" method="post" target="key">
<keygen name="rsaPublicKey" challenge="012345" keytype="RSA">
<input type="submit" name="generateCertificate" value="Generate">
<iframe name="key" width="100%" height="50%"></iframe>

The above example demonstrates usage of the <keygen> element.

The <keygen> element represents a cryptographic key-pair generator form control. It can be used for generating signed certificates, which can be used to authenticate to services that use Transport Layer Security (TLS) and certificate authentication. 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.

The <keygen> element provides the user with a range of key size options.

If the user's browser/user agent is configured to support cryptographic hardware, the user may also be given a choice of where to generate the key, for example in a smart card or in software and stored on disk.