Skip to main content
Glama

CipherHUB Cryptography Toolkit

ml_dsa_compute_mu

[pqc_signature] 独立计算 ML-DSA 的 64 字节 mu 值(FIPS 204 Section 6.2)。 【用途】用于验证或调试 EXTERNAL_MU 模式的中间值,或与 AWS KMS EXTERNAL_MU 签名流程对接。 【计算公式】

  • tr = SHAKE-256(raw_pk, 64)

  • M' = 0x00 || len(ctx) || ctx || message

  • mu = SHAKE-256(tr || M', 64) 【参数】

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

  • message_in_hex:原始消息 hex(最大 2048 字节,空字符串表示空消息)

  • context_in_hex:可选上下文 hex(最大 255 字节)

  • algorithm:ML-DSA-44 / ML-DSA-65(默认)/ ML-DSA-87 【输出】tr_in_hex、mu_in_hex、raw_pk_in_hex、algorithm、message_bytes。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algorithmNo密码算法名称(具体可选值因工具而异,见工具描述)ML-DSA-65
context_in_hexNoML-DSA 上下文的十六进制字符串(可选,最大 255 字节)
message_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?

No annotations are provided, so the description takes on the full burden. It thoroughly discloses behavior: the exact formula, input validation (OID/length consistency check), constraints (max message 2048 bytes, max context 255 bytes), and all output fields. This is well beyond a mere 'compute mu' statement.

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 sections for purpose, usage, formula, parameters, and output. Every sentence adds value, and the most important information (what it does) is front-loaded. Length is justified given the technical complexity.

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?

Given there is no output schema, the description appropriately lists all output fields. It covers the formula, input requirements, constraints, and purpose, making the tool fully usable without external documentation. This is a complete description for a computation tool.

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?

The schema already covers 100% of parameters with basic descriptions, but the tool description adds meaningful semantics: public key can be SPKI DER or bare, message empty string means empty message, and size limits for message and context. This adds real value beyond the schema.

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 the tool's function: independently compute the 64-byte mu value for ML-DSA per FIPS 204 Section 6.2. It also distinguishes itself from siblings like ml_dsa_sign and ml_dsa_verify by specifying it is for EXTERNAL_MU mode intermediate values.

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 names the two use cases: verifying/debugging EXTERNAL_MU mode intermediate values and integrating with AWS KMS EXTERNAL_MU signing flow. It does not explicitly state when not to use it compared to sibling signing/verification tools, but the use cases are 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.