Encrypt data
crypto_encryptEncrypt plaintext with authenticated AES-256-GCM or ChaCha20-Poly1305 encryption using a symmetric-256 key handle; omit the handle to generate a new key and receive its handle.
Instructions
Encrypt plaintext with authenticated encryption (AES-256-GCM or ChaCha20-Poly1305) under a symmetric-256 key handle. Without keyHandle, a new key is generated and its handle returned. 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": {
"plaintext": "<plaintext>"
},
"name": "crypto_encrypt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| algorithm | No | Encryption algorithm ('aes-256-gcm' or 'chacha20-poly1305'). Default is 'aes-256-gcm'. | |
| keyHandle | No | Handle of a symmetric-256 key. If omitted, a new key is generated. Key handles look like 'kh_' followed by 32 hex characters. | |
| plaintext | Yes | Plaintext string to encrypt. |