Skip to main content
Glama

CipherHUB Cryptography Toolkit

sm9_encryption

[sm9_ibc] [sm9_ibc] SM9 标识加密(GM/T 0044)。任何人持主公钥即可加密:输入 master_public_key_in_pem(key_kind=Enc 的主公钥)、identity(接收方标识,密文与标识绑定)、plain_data_in_hex(明文 hex,1-255 字节,SM9 单次加密上限受 KDF 块计数器约束)。输出:cipher_in_hex / cipher_in_base64(DER 编码密文,C1/C3/C2 结构,≤367 字节)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
identityNoSM9 用户标识(原始字符串,如邮箱/账号,1-63 UTF-8 字节;签名/加密/解密均与该标识绑定)
plain_data_in_hexNo明文的十六进制字符串
master_public_key_in_pemNoSM9 主公钥的 PEM 文本(明文形态,验签/加密侧使用;Sign/Enc 两类主密钥的公钥标签不同)

Schema Changelog

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

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so well: it discloses that the operation is public-key encryption by anyone, binds the ciphertext to the identity, enforces a 1-255 byte plaintext limit due to KDF counter constraints, and specifies the output as DER-encoded C1/C3/C2 structure up to 367 bytes. This is rich behavioral context beyond a simple 'encrypt' statement.

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

Conciseness4/5

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

The description is compact and front-loaded with the key action and access model. However, it begins with a duplicated '[sm9_ibc] [sm9_ibc]' tag that adds noise and no informational value.

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

Completeness5/5

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

For a non-destructive encryption tool with no output schema and no annotations, the description is remarkably complete: it covers all three parameters, their constraints, the output fields, the output encoding, and the output size limit. An agent has enough context to call it correctly without extra lookups.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful semantics: master_public_key_in_pem must be the Enc-kind public key, identity is tied to the ciphertext, and plain_data_in_hex has explicit size limits and KDF constraints. This goes beyond the schema descriptions without fully replacing them.

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 clearly identifies the operation as SM9 identity-based encryption ('SM9 标识加密') and states that anyone holding the master public key can encrypt, which distinguishes it from sibling operations like sm9_decryption, sm9_sign, and sm9_verify. It also specifies the required inputs and output format.

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 usage context: encrypt for a specific identity using the Enc-type master public key. It does not explicitly name alternative tools or provide exclusion criteria, but the identity-based encryption workflow is sufficiently clear for an agent to select it.

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.