Generate Key Pair
generate_key_pairGenerate an asymmetric key pair with specified algorithm, outputting private key in PKCS#8 DER and public key in SPKI DER format. Supports RSA, ECDSA, EdDSA, and Diffie-Hellman algorithms.
Instructions
Generate a key pair and return the private key as PKCS#8 DER and public key as SPKI DER.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"algorithm": "<algorithm>"
},
"name": "generate_key_pair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| algorithm | Yes | Algorithm id from list_supported_key_algorithms, for example rsassa-pkcs1-v1_5-2048 or ecdsa-p-256. | |
| label | No | Optional friendly label to include in the response. | |
| encoding | No | Output encoding for DER or value bytes. | hex |