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.
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 |