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.