ml_kem_decap
[pqc_kem] 使用 ML-KEM 私钥执行密钥解封装(FIPS 203)。 【算法】ML-KEM-512 / ML-KEM-768 / ML-KEM-1024。 【参数】
algorithm:必须与 keygen/encap 一致
secret_key_in_hex:ml_kem_keygen 返回的私钥 hex
ciphertext_in_hex:ml_kem_encap 返回的密文 hex 【输出】shared_secret_in_hex、shared_secret_in_base64、shared_secret_sha256、shared_secret_bytes、algorithm。 【安全特性】若密文被篡改,ML-KEM Implicit Rejection 不抛异常,返回确定性伪随机值(IND-CCA2 安全),不泄露私钥信息。 【完整流程】keygen → encap(pub) → decap(sk, ct) → 双方 shared_secret 一致
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ml_kem_decap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| algorithm | No | 密码算法名称(具体可选值因工具而异,见工具描述) | ML-KEM-768 |
| ciphertext_in_hex | No | ML-KEM 密文的十六进制字符串 | |
| secret_key_in_hex | No | ML-KEM 私钥的十六进制字符串 |