Skip to main content
Glama

CipherHUB Cryptography Toolkit

ecc_key_exchange

[ecc] ECDH + HKDF 密钥协商,双方各用私钥+对方公钥派生相同对称密钥。 【参数】

  • alice_ecc_private_key_in_pem:己方私钥 PEM

  • bob_ecc_public_key_in_pem:对方公钥 PEM

  • hash_algorithm:HKDF 底层哈希(Sha256/Sha384/Sha512 等,不支持 Sm3)

  • salt:HKDF salt Hex(可选)

  • additional_info:HKDF info Hex(可选)

  • derived_key_length:派生密钥长度 16~1024 字节

  • alice_ecc_private_key_password:若私钥加密则传入 【输出】derived_key_in_hex、derived_key_length。 【曲线限制】Ed25519 不可用,X25519 可用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saltNoHKDF salt 的十六进制字符串(可选)e5af86e7a081e5ada6e4babae38090436970686572485542e38091
hash_algorithmNo哈希算法名称,可选值:Sha1 / Sha224 / Sha256 / Sha384 / Sha512(ECC 不支持 Sm3)Sha512
additional_infoNoHKDF info 的十六进制字符串(可选)536572696f75732043727970746f6772617068790a20202020437265617469766520536f6c7574696f6e730a202020204d617070696e67204469676974616c205472757374
derived_key_lengthNoHKDF 派生密钥长度(整数,16~1024 字节)
bob_ecc_public_key_in_pemNoBob 侧 ECC 公钥的 PEM 文本
alice_ecc_private_key_in_pemNoAlice 侧 ECC 私钥的 PEM 文本
alice_ecc_private_key_passwordNoAlice 侧 ECC 私钥的加密密码(原始字符串,非编码格式)

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of disclosure. It is transparent about the algorithm (ECDH+HKDF), output fields (derived_key_in_hex and derived_key_length), and limitations (Ed25519 not usable, X25519 usable). It also notes optional salt/info and password handling. It does not discuss error cases, but for a crypto tool this level of transparency is solid.

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 well-structured with a clear breakdown of parameters, output, and limitations. It is slightly verbose but every section earns its place, and the front-loaded purpose statement makes it easy to scan. The use of bullet-like formatting enhances readability without unnecessary fluff.

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 the tool's complexity (7 parameters) and lack of an output schema, the description covers the essential aspects: algorithm, parameter purposes, output format, and curve restrictions. It falls short of explicitly marking required parameters and handling edge cases, but overall it is sufficiently complete for an agent to invoke the tool correctly.

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. The description adds meaningful clarity beyond the schema by explaining roles (own private key vs. other's public key), the condition for the password, and the valid range for derived_key_length. It also explicitly calls out unsupported Sm3, which is useful. This additional context justifies the higher score.

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 purpose: ECDH + HKDF key negotiation, where both parties derive the same symmetric key using their own private key and the other's public key. This specific verb+resource combination distinguishes it from sibling tools like hybrid_kex and ecc_key_sign, making its function unambiguous.

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 context: both parties need their own private key and the other's public key, and the output is a derived symmetric key. It also provides exclusions such as Ed25519 not available and Sm3 not supported, plus a conditional for encrypted private keys. However, it does not explicitly mention alternatives like hybrid_kex, so it stops short of a perfect 5.

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.