Skip to main content
Glama

CipherHUB Cryptography Toolkit

ml_dsa_verify

[pqc_signature] 使用 ML-DSA 公钥验证签名(FIPS 204)。 【双模式】sign_mode 支持 RAW(默认)和 EXTERNAL_MU 两种模式,必须与签名时使用的模式一致。

  • RAW 模式:直接验证原始消息签名(liboqs,最大 256 字节,空消息合法)

  • EXTERNAL_MU 模式:先计算 mu,再通过 OpenSSL 3.5+ mu 模式验签,可验证 AWS KMS EXTERNAL_MU 签名(最大 2048 字节,空消息合法) 【算法】algorithm 支持 ML-DSA-44 / ML-DSA-65(默认)/ ML-DSA-87。 【参数】

  • public_key_spki_in_hex:公钥 hex(SPKI DER 或裸公钥均可),并校验 OID/长度与 algorithm 一致

  • message_in_hex:原始消息 hex,空字符串表示空消息

  • signature_in_hex:签名 hex

  • context_in_hex:签名时使用的 context(必须一致)

  • sign_mode:RAW 或 EXTERNAL_MU(默认 RAW) 【输出】verified(bool,True=验签通过)、algorithm、message_bytes。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algorithmNo密码算法名称(具体可选值因工具而异,见工具描述)ML-DSA-65
sign_modeNoML-DSA 签名模式,可选值:RAW(默认,直接签名原文)/ EXTERNAL_MU(先计算 mu 再签名,与 AWS KMS 语义等价)RAW
context_in_hexNoML-DSA 上下文的十六进制字符串(可选,最大 255 字节)
message_in_hexNo消息的十六进制字符串(空字符串表示空消息)
signature_in_hexNo签名的十六进制字符串
public_key_spki_in_hexNoML-DSA 公钥的十六进制字符串(SPKI DER 或裸公钥均可)

TDQS

A4.7/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 of behavioral disclosure. It discloses byte limits (256/2048), legal empty messages, key format flexibility (SPKI DER or raw), OID/length validation, OpenSSL 3.5+ dependency for EXTERNAL_MU, and the exact output fields. This is rich, actionable behavioral context.

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 clearly labeled sections (双模式, 算法, 参数, 输出) and uses bullet points for readability. Every sentence carries important information with no repetition or fluff, making it efficient despite its length.

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 tool with 6 parameters, multiple modes, and algorithm variants, the description covers all essential aspects: purpose, mode semantics, algorithm options, parameter details, constraints, and output structure. Since there is no output schema, it even lists output fields. This is a complete standalone reference.

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?

Although the schema covers 100% of parameters, the description adds critical semantics beyond field names: public_key_spki_in_hex accepts SPKI or raw and is validated against algorithm, message_in_hex empty means empty message, context_in_hex must match signing context, and sign_mode behavior is explained with byte limits. This elevates the parameter understanding well above the baseline.

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 states '使用 ML-DSA 公钥验证签名' (verify signature using ML-DSA public key) and references FIPS 204. It distinguishes this tool from siblings like ml_dsa_sign and ml_dsa_compute_mu by explicitly scoping it to verification, and provides specific mode and algorithm details that reinforce its unique purpose.

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 explicit guidance on when to use each sign_mode (RAW vs EXTERNAL_MU), including a concrete use case (AWS KMS EXTERNAL_MU signatures) and constraints like message size limits. It doesn't explicitly name alternative tools for exclusion, but the sibling list and algorithm scope make the intended usage clear.

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.