Skip to main content
Glama

CipherHUB Cryptography Toolkit

rsa_decryption

Read-only

[rsa] RSA 私钥解密。 【参数】

  • rsa_private_key_in_pem:PEM 格式私钥

  • cipher_data_in_hex:密文 Hex(长度 = key_size/8 字节)

  • rsa_padding_mode:必须与加密时一致

  • password:若私钥有密码保护则传入 【输出】plain_data_in_hex、plain_length。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rsa_decryption"
  }
}

Input Schema

NameRequiredDescriptionDefault
passwordNo密码(原始字符串,非编码格式;私钥工具为私钥加密密码,KDF Pbkdf2Sm3 为待拉伸口令)
rsa_padding_modeNoRSA 加密填充模式,可选值:RSAES_PKCS1_V1_5 / RSAES_OAEP_SHA_1 / RSAES_OAEP_SHA_224 / RSAES_OAEP_SHA_256 / RSAES_OAEP_SHA_384 / RSAES_OAEP_SHA_512
cipher_data_in_hexNo密文的十六进制字符串
rsa_private_key_in_pemNoRSA 私钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / password / description
      Previous value: -"私钥的加密密码(原始字符串,非编码格式)"New value: +"密码(原始字符串,非编码格式;私钥工具为私钥加密密码,KDF Pbkdf2Sm3 为待拉伸口令)"
  2. Changed5 schema fields changed
    • addedInput schema / properties / cipher_data_in_hex / description
      Added value: +"密文的十六进制字符串"
    • addedInput schema / properties / password / description
      Added value: +"私钥的加密密码(原始字符串,非编码格式)"
    • addedInput schema / properties / rsa_padding_mode / description
      Added value: +"RSA 加密填充模式,可选值:RSAES_PKCS1_V1_5 / RSAES_OAEP_SHA_1 / RSAES_OAEP_SHA_224 / RSAES_OAEP_SHA_256 / RSAES_OAEP_SHA_384 / RSAES_OAEP_SHA_512"
    • addedInput schema / properties / rsa_padding_mode / enum
      Added value: +[
      +  "RSAES_PKCS1_V1_5",
      +  "RSAES_OAEP_SHA_1",
      +  "RSAES_OAEP_SHA_224",
      +  "RSAES_OAEP_SHA_256",
      +  "RSAES_OAEP_SHA_384",
      +  "RSAES_OAEP_SHA_512"
      +]
    • addedInput schema / properties / rsa_private_key_in_pem / description
      Added value: +"RSA 私钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)"
  3. First observed

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered by structured data. The description adds genuinely useful constraints beyond that: the ciphertext length must equal key_size/8 bytes, the padding mode must match encryption, and password is only needed when the private key is passphrase-protected. It does not say what happens on padding mismatch or how failures are surfaced, so it stops short of full behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two labeled blocks (parameters, output) with one line per item and no filler; the core action is stated in the first four characters. Every line carries information an agent needs, and the output block previews return fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by naming the returned fields (plain_data_in_hex, plain_length) and by documenting each of the four inputs. Remaining gaps are error/failure behavior on wrong padding or malformed PEM, which matter for a cryptographic tool but are not covered by annotations or schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so a 3 is the floor, but the description adds meaning the schema lacks — notably the ciphertext length rule (key_size/8 bytes) for cipher_data_in_hex and the framing of rsa_padding_mode as an invariant that must mirror encryption. It also clarifies password usage for protected keys. The enum values themselves are only in the schema, which is fine.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: '[rsa] RSA 私钥解密' (RSA private-key decryption), and the '[rsa]' tag plus '私钥' clearly separates it from rsa_encryption and from sm2_decryption/sm9_decryption. It never explicitly names those siblings as alternatives, so differentiation is implied by the algorithm name rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description contains no when-to-use/when-not-to-use guidance and does not point to encryption, signing, or other siblings. The only conditional it gives is a parameter constraint ('rsa_padding_mode must match the one used at encryption time'), which is useful but is not usage guidance. An agent must infer the call context entirely from the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.