Security
Encrypt text with an RSA public key or decrypt ciphertext with the matching private key, using OAEP padding (SHA-1 or SHA-256). Handles long messages by chunking. Keys and data stay local. PKCS#1 v1.5 is intentionally not offered (Node disables it for decryption due to Bleichenbacher attacks).
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/rsa-encrypt-decrypt' \
-H 'Content-Type: application/json' \
-d '{"mode":"encrypt","publicKey":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwWF6fs85MGuVStFAWF1F\ns/mKPXptWGW1zHSHr4xCDARhbkc0X5qYF0Eg/pyRNXY9hV9IP6YnMUKw1d1rYuyK\nq6xj4xMjU5FWUdd5ZV8r2LfHmUN5agLFcXiK2HR/OlyK6POeXWYaUoahBe1NqIvS\nr30UDL1IEgs4hPRUgYJYlFGGxsLl7P0uF0Tjsu93o4+Jey9XRhKWXdwB5m7RxlER\nKgr6LCARfodZYWjA7nM/r6L9Xy2sHPW9bFLe/1mfa9hrMMAVpAsHxsAJsTlmdnhs\ns6otGp3ietGmshROOv2K12JlloAeZD3jTi8xIp7K7VRlbypGl1lqZ1h+g6BVIN2t\nSQIDAQAB\n-----END PUBLIC KEY-----\n","privateKey":"-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----","passphrase":"Only if the private key is passphrase-protected…","message":"Hello, RSA!","ciphertext":"Paste the ciphertext produced by this tool…","oaepHash":"sha256","encoding":"hex"}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/rsa-encrypt-decrypt| Name | Type | Required | Description |
|---|---|---|---|
| mode | select | No | — |
| publicKey | textarea | No | — |
| privateKey | textarea | No | — |
| passphrase | text | No | — |
| message | textarea | No | — |
| ciphertext | textarea | No | — |
| oaepHash | select | No | — |
| encoding | select | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-rsa-encrypt-decrypt": {
"name": "rsa-encrypt-decrypt",
"description": "Encrypt text with an RSA public key or decrypt ciphertext with the matching private key, using OAEP padding (SHA-1 or SHA-256). Handles long messages by chunking. Keys and data stay local. PKCS#1 v1.5 is intentionally not offered (Node disables it for decryption due to Bleichenbacher attacks).",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=rsa-encrypt-decrypt",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "rsa-encrypt-decrypt",
"arguments": {
"mode": "encrypt",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwWF6fs85MGuVStFAWF1F\ns/mKPXptWGW1zHSHr4xCDARhbkc0X5qYF0Eg/pyRNXY9hV9IP6YnMUKw1d1rYuyK\nq6xj4xMjU5FWUdd5ZV8r2LfHmUN5agLFcXiK2HR/OlyK6POeXWYaUoahBe1NqIvS\nr30UDL1IEgs4hPRUgYJYlFGGxsLl7P0uF0Tjsu93o4+Jey9XRhKWXdwB5m7RxlER\nKgr6LCARfodZYWjA7nM/r6L9Xy2sHPW9bFLe/1mfa9hrMMAVpAsHxsAJsTlmdnhs\ns6otGp3ietGmshROOv2K12JlloAeZD3jTi8xIp7K7VRlbypGl1lqZ1h+g6BVIN2t\nSQIDAQAB\n-----END PUBLIC KEY-----\n",
"privateKey": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----",
"passphrase": "Only if the private key is passphrase-protected…",
"message": "Hello, RSA!",
"ciphertext": "Paste the ciphertext produced by this tool…",
"oaepHash": "sha256",
"encoding": "hex"
}
}
}Questions or issues? Contact [email protected]