rsa_encrypt
Use an RSA public key to encrypt data with OAEP padding. Result is base64-encoded ciphertext.
Instructions
Encrypt data using RSA with OAEP asymmetric_padding.
Args: public_key_pem: RSA public key in PEM format. data: String to encrypt (max ~446 bytes for 4096-bit key).
Returns: Base64-encoded ciphertext.
Raises: ValueError: If data is too large for the key size.
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": {
"public_key_pem": "<public_key_pem>",
"data": "<data>"
},
"name": "rsa_encrypt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| public_key_pem | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |