Skip to main content
Glama

CipherHUB Cryptography Toolkit

rsa_encryption

[rsa] RSA 公钥加密。 【参数】

  • rsa_public_key_in_pem:PEM 格式公钥

  • plain_data_in_hex:明文 Hex

  • rsa_padding_mode:RSAES_PKCS1_V1_5 / RSAES_OAEP_SHA_1 / RSAES_OAEP_SHA_224 / RSAES_OAEP_SHA_256 / RSAES_OAEP_SHA_384 / RSAES_OAEP_SHA_512 【明文长度限制】受 key_size 和 padding 约束:PKCS1v1.5 上限 = 模长字节 − 11;OAEP 上限 = 模长字节 − 2×哈希输出 − 2(RSA-4096 + OAEP-SHA256 = 446 字节,OAEP-SHA512 = 382 字节)。 【输出】cipher_data_in_hex、cipher_length。 【安全建议】推荐使用 OAEP 而非 PKCS1v1.5。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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
plain_data_in_hexNo明文的十六进制字符串
rsa_public_key_in_pemNoRSA 公钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • addedInput schema / properties / plain_data_in_hex / 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_public_key_in_pem / description
      Added value: +"RSA 公钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals output fields (cipher_data_in_hex, cipher_length), documents plaintext length limits per padding mode, and explains the trade-off between PKCS1v1.5 and OAEP. This is substantial operational detail beyond the schema, though it stops short of describing error behavior on invalid PEM or oversized input.

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?

The description is well organized into labeled sections: parameters, length limits, output, and security advice. Every section delivers actionable information with no filler, and the most important purpose is front-loaded in the first sentence. It is detailed yet compact.

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?

Given there is no output schema, the description compensates by naming the output fields. It covers all three parameters and adds operationally critical length constraints. The only notable omission is that it does not state that all three parameters are effectively required for the operation, while the schema lists required parameters as 0.

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 the baseline is 3. The description adds meaningful semantics by tying parameters to behavior: it explains how rsa_padding_mode interacts with plaintext length limits and gives concrete byte caps (e.g., RSA-4096 + OAEP-SHA256 = 446 bytes). It reinforces the meaning of rsa_public_key_in_pem and plain_data_in_hex beyond the schema text.

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

Purpose5/5

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

The description states 'RSA 公钥加密' (RSA public-key encryption), a specific verb-resource pair that immediately distinguishes this tool from siblings like rsa_decryption and rsa_sign. The scope is unambiguous: encrypt plaintext with a PEM public key. This clearly differentiates it without needing to inspect sibling schemas.

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

Usage Guidelines4/5

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

The description explicitly frames the tool as public-key encryption, providing clear context for when to invoke it versus decryption/signing siblings. It also gives concrete guiding advice on padding choice ('推荐使用 OAEP 而非 PKCS1v1.5'). It does not explicitly name alternatives or exclusions, but the encryption-specific wording is sufficient.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools target a distinct algorithm+operation pair (e.g., rsa_sign vs sm2_sign vs ml_dsa_sign), and descriptions are detailed. However, block_cipher and stream_cipher both perform symmetric encryption, and ecc_key_exchange and hybrid_kex overlap as key exchange, requiring careful reading to distinguish.

Naming Consistency3/5

Naming is inconsistent across algorithm families: key generation mixes generate_ecc/generate_rsa with ml_dsa_keygen/ml_kem_keygen, and encryption mixes rsa_encryption/sm2_encryption with block_cipher/stream_cipher. Within each family (e.g., rsa_sign/rsa_verify, ml_dsa_sign/ml_dsa_verify), names are predictable, but the overall pattern is not uniform.

Tool Count2/5

32 tools is far above the typical 3-15 range for a well-scoped server. While every tool has a distinct function, the large surface makes the set heavy and harder to navigate, especially with multiple algorithm families and niche utilities.

Completeness5/5

The toolkit gives comprehensive coverage: key generation, encryption/decryption, signing/verification for RSA, ECC, SM2, ML-DSA, ML-KEM, plus symmetric ciphers, hashing, and key exchange. Full workflows are supported with no dead ends, and even helper tools for debugging are included.