Skip to main content
Glama

CipherHUB Cryptography Toolkit

cms_signed_verify

[cms_signed] 验签 CMS SignedData(RFC 5652 §5),BER/DER 输入均容忍。 【算法】按消息声明还原 digestAlgorithm / signatureAlgorithm: RSA PKCS#1 v1.5、ECDSA、Ed25519、SHA1 消息均可验;rsassa_pss 按 RFC 8017 A.2.3 参数(hashFunc / MGF1 / saltLength)重建 padding;signedAttrs 验签体是 EXPLICIT SET OF DER 重编码(§5.4), BER 消息先规范形重编码再验。 【参数】

  • cms_in_hex:SignedData DER/BER 的十六进制(≤16MB)

  • data_in_hex:外部内容(仅 detached 消息必填;attached 消息 以消息内嵌内容为准,忽略此字段)

  • signer_certificate_in_pem:签名者证书 PEM(可选;留空则从 消息 certificates 集按 sid 定位——KMS 验 Nitro 证明文档同思路) 【输出】verified(bool)、reason、key_source(provided_pem / embedded_certificates)、detached、content_in_hex(attached 时 回显 eContent)、content_matches(外部内容与 messageDigest 一致)、 digest/signature 算法与 OID、ber_features、structure_tree。 【注意】验签语义 = 签名可验证 + messageDigest 与内容一致;证书 链有效性属 cert_verify 职责(warnings 注明);验签失败不返回 错误码,而是 verified=false + reason。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cms_in_hexNoCMS 信封 DER/BER 编码的十六进制字符串(≤16MB;KMS 回包这类 BER 不定长编码可直接输入)
data_in_hexNo数据的十六进制字符串。RAW 模式为消息原文 Hex,DIGEST 模式为哈希摘要 Hex
signer_certificate_in_pemNo签名者证书的 PEM 文本(嵌入 certificates 集,验签方可按 sid 定位)

Schema Changelog

Changes observed during successful MCP inspections.

  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, the description carries the full burden and does so: it discloses BER normalization behavior, per-algorithm padding reconstruction (PSS params, RSA PKCS#1 v1.5, ECDSA, Ed25519, SHA1), and the non-obvious failure semantics that verification failure returns verified=false + reason rather than an error code. It also flags that chain warnings are advisory, not failures.

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?

Front-loaded with purpose and organized under clear 【算法】【参数】【输出】【注意】 headings, so it is scannable despite its length. It is dense but each section carries information an agent needs; there is mild overlap with the schema descriptions, which keeps it just short of a 5.

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?

There is no output schema, so the description must enumerate returns, and it does (verified, reason, key_source, detached, content_in_hex, content_matches, algorithm OIDs, ber_features, structure_tree). Combined with algorithm coverage, failure semantics, and the cert_verify boundary, nothing an agent needs to call this correctly is missing.

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, but the description adds real meaning beyond it: the ≤16MB bound, the attached-vs-detached rule that makes data_in_hex conditionally required despite the schema marking nothing required, and the sid-based fallback for the certificate parameter.

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?

States a specific verb (验签/verify) and resource (CMS SignedData, RFC 5652 §5) with a scope note that BER/DER inputs are both tolerated. It also draws an explicit boundary against the sibling cert_verify (chain validity is out of scope), so an agent can tell it apart from cms_signed_sign and cose_sign1_verify without opening the schema.

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?

Gives clear conditional guidance: detached messages require data_in_hex, attached messages use the embedded eContent and ignore the field, and empty signer_certificate_in_pem triggers lookup from the certificates set by sid. It also names cert_verify as the owner of chain validity. No explicit exclusion of the signing sibling, but the context is unambiguous.

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.