Skip to main content
Glama

CipherHUB Cryptography Toolkit

ml_kem_keygen

[pqc_kem] 生成 ML-KEM 密钥对(FIPS 203,后量子密钥封装标准)。 【算法选择】ML-KEM-512(NIST Level 1)/ ML-KEM-768(Level 3,推荐)/ ML-KEM-1024(Level 5)。 【参数】

  • algorithm:算法名

  • seed_in_hex:64 字节种子 hex(128 字符),确定性生成

  • use_random_seed:True 时忽略 seed_in_hex,使用 CSPRNG 【输出】public_key_in_hex、public_key_in_base64、secret_key_in_hex、secret_key_in_base64、seed_in_hex、algorithm、nist_level、public_key_bytes、secret_key_bytes。 【后续操作】公钥用于 ml_kem_encap,私钥用于 ml_kem_decap。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algorithmNo密码算法名称(具体可选值因工具而异,见工具描述)ML-KEM-768
seed_in_hexNoML-KEM 密钥生成种子的十六进制字符串,固定 128 个 hex 字符(64 字节)30313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233
use_random_seedNoTrue 时忽略 seed_in_hex,使用 CSPRNG 随机生成种子

TDQS

A4.4/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 transparency burden. It discloses deterministic generation via a provided seed, the CSPRNG option when use_random_seed is true, and the complete set of output fields. It also names the standard and NIST security levels. However, it omits potential error conditions and side-effect behavior, which would be useful for a tool that generates sensitive key material.

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-organized into labeled sections (algorithm, parameters, outputs, subsequent operations), with every sentence contributing necessary information. It is compact enough for an agent to parse quickly while providing a complete overview of the tool's behavior.

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?

Given there is no output schema, the description compensates by enumerating all nine output fields and explaining the downstream workflow. It covers algorithm selection, parameter semantics, and output formats. Minor gaps include lack of error-handling details, but overall the tool description is contextually complete for a key generation operation.

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 describes all three parameters with high coverage (100%), so the baseline is 3. The description adds value beyond the schema by noting that seed_in_hex enables deterministic generation, that use_random_seed overrides the seed, and by mapping each algorithm choice to a NIST security level—additional context not present in the schema 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 clearly states its core function with a specific verb and resource: '生成 ML-KEM 密钥对' (generate ML-KEM key pair) and names the FIPS 203 standard. This distinguishes it from sibling operations like ml_kem_encap and ml_kem_decap, which are explicitly referenced as downstream uses for the generated keys.

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 provides clear guidance on when to use this tool by explaining the algorithm options (with a recommendation for ML-KEM-768) and specifying that the public key is used for ml_kem_encap and the private key for ml_kem_decap. It does not offer explicit 'when-not-to-use' exclusions, but the downstream workflow makes the usage context unmistakable.

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.