Latest web development tutorials

HTML keygen keytype property

Tag Reference HTML keygen HTML <keygen> tag

Examples

Generate the key by RSA algorithm:

<form action="demo_keygen.html" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security" keytype="rsa">
<input type="submit">
</form>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Firefox, Opera and Chrome support <keygen> keytype property tag.


Definition and Usage

keytype attribute specifies the key generation algorithm which should be used.

Different browsers support key generation algorithm varies.


Differences between HTML 4.01 and HTML5

<Keygen> tag is new in HTML5 tags.


grammar

<keygen keytype="rsa|dsa|ec">

Property Value

描述
rsa 默认。规定 RSA 安全算法。RSA 密钥强度可由用户选择。
dsa 规定 DSA 安全算法。DSA 密钥长度可由用户选择。
ec 规定 EC 安全算法。EC 密钥强度可由用户选择。


Tag Reference HTML keygen HTML <keygen> tag