Generate a key
crypto_generate_keyGenerates RSA, ECC, Ed25519, post-quantum, symmetric, or HMAC keys; secret material stays on the server and an opaque keyHandle (plus public key for keypairs) is returned.
Instructions
Generate a key inside the server: a classical (RSA, ECC, Ed25519) or post-quantum (ML-KEM 512/768/1024 FIPS 203, ML-DSA 44/65/87 FIPS 204) keypair, a 256-bit symmetric key, or an HMAC-SHA256 key. Returns a keyHandle and, for keypairs, the public key. Secret key material stays inside the server; only an opaque keyHandle is returned.
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": {
"type": "<type>"
},
"name": "crypto_generate_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Key type: 'rsa', 'ecc', 'ed25519', 'x25519', 'ml-kem-512', 'ml-kem-768', 'ml-kem-1024', 'ml-dsa-44', 'ml-dsa-65', 'ml-dsa-87', 'symmetric-256', or 'hmac-sha256'. | |
| curve | No | Elliptic curve for 'ecc': 'prime256v1' (P-256), 'secp384r1' (P-384), or 'secp256k1'. Default is 'prime256v1'. | |
| modulusLength | No | Modulus length for RSA (2048, 3072, 4096). Default is 2048. |