Skip to main content
Glama

CipherHUB Cryptography Toolkit

rsa_sign

[rsa] RSA 私钥签名。 【参数】

  • rsa_private_key_in_pem:PEM 格式私钥

  • data_in_hex:待签数据 Hex

  • rsa_sign_padding_mode:RSA_SIGN_PKCS1_V1_5_SHA{1,224,256,384,512} 或 RSA_SIGN_PSS_SHA{1,224,256,384,512}

  • rsa_sign_raw_data_mode:True=对原文签名(内部先哈希),False=data_in_hex 已是摘要值

  • password:若私钥有密码保护则传入 【输出】signature_in_hex、signature_length。 【安全建议】推荐 PSS 而非 PKCS1v1.5。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
passwordNo密码(原始字符串,非编码格式;私钥工具为私钥加密密码,KDF Pbkdf2Sm3 为待拉伸口令)
data_in_hexNo数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex
rsa_sign_padding_modeNoRSA 签名填充模式,可选值:RSA_SIGN_PKCS1_V1_5_SHA1 / SHA224 / SHA256 / SHA384 / SHA512 或 RSA_SIGN_PSS_SHA1 / SHA224 / SHA256 / SHA384 / SHA512
rsa_private_key_in_pemNoRSA 私钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)
rsa_sign_raw_data_modeNoTrue=对原文签名(服务端内部先哈希),False=data_in_hex 已是哈希摘要的 Hex

Schema Changelog

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

  1. Changed1 schema field changed
    • changedInput schema / properties / password / description
      Previous value: -"私钥的加密密码(原始字符串,非编码格式)"New value: +"密码(原始字符串,非编码格式;私钥工具为私钥加密密码,KDF Pbkdf2Sm3 为待拉伸口令)"
  2. Changed6 schema fields changed
    • addedInput schema / properties / data_in_hex / description
      Added value: +"数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex"
    • addedInput schema / properties / password / description
      Added value: +"私钥的加密密码(原始字符串,非编码格式)"
    • addedInput schema / properties / rsa_private_key_in_pem / description
      Added value: +"RSA 私钥的 PEM 文本(含 BEGIN/END 头尾的 Base64 编码文本)"
    • addedInput schema / properties / rsa_sign_padding_mode / description
      Added value: +"RSA 签名填充模式,可选值:RSA_SIGN_PKCS1_V1_5_SHA1 / SHA224 / SHA256 / SHA384 / SHA512 或 RSA_SIGN_PSS_SHA1 / SHA224 / SHA256 / SHA384 / SHA512"
    • addedInput schema / properties / rsa_sign_padding_mode / enum
      Added value: +[
      +  "RSA_SIGN_PKCS1_V1_5_SHA1",
      +  "RSA_SIGN_PKCS1_V1_5_SHA224",
      +  "RSA_SIGN_PKCS1_V1_5_SHA256",
      +  "RSA_SIGN_PKCS1_V1_5_SHA384",
      +  "RSA_SIGN_PKCS1_V1_5_SHA512",
      +  "RSA_SIGN_PSS_SHA1",
      +  "RSA_SIGN_PSS_SHA224",
      +  "RSA_SIGN_PSS_SHA256",
      +  "RSA_SIGN_PSS_SHA384",
      +  "RSA_SIGN_PSS_SHA512"
      +]
    • addedInput schema / properties / rsa_sign_raw_data_mode / description
      Added value: +"True=对原文签名(服务端内部先哈希),False=data_in_hex 已是哈希摘要的 Hex"
  3. First observed

TDQS

A4.2/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 behavioral disclosure burden. It explains the raw-data-mode behavior (internal hashing vs. pre-digest), the optional password handling, and the outputs signature_in_hex and signature_length. It does not discuss failure cases or side effects, but for a signing tool the disclosed behavior is substantial.

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-structured with labeled sections for parameters, output, and security advice, and every section carries useful information. It avoids narrative padding and uses a compact notation for the padding-mode variants, making it easy for an agent to scan.

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?

Despite having no annotations or output schema, the description covers the key parameters, explains the raw-data distinction, lists outputs, and gives a security guideline. It could be slightly stronger by explicitly stating which parameters are mandatory (e.g., private key and data are logically required even though the schema marks all as optional), but it is otherwise complete enough for correct invocation.

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

Parameters3/5

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

The input schema already describes all five parameters at 100% coverage, so the baseline is 3. The description restates the parameter meanings in a compact reference format and adds the output section, but it does not materially add semantic meaning beyond the schema's existing parameter descriptions.

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 opens with a specific operation, 'RSA 私钥签名' (RSA private-key signing), which clearly identifies both the algorithm and the action. This distinguishes it from sibling tools like rsa_verify, rsa_encryption, and rsa_decryption without needing to inspect their 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 gives clear context that this tool is for signing with an RSA private key and even adds a security recommendation to prefer PSS over PKCS1v1.5. It does not explicitly name alternatives or when-not-to-use conditions, so it stops short of a 5, but the usage context is clear enough.

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.