quantakrypto pqc-tools

io.github.quantakrypto由 GitHub 账号 quantakrypto 发布v0.5.2更新于 Oct 24, 2026

Scan code for quantum-vulnerable cryptography and get NIST post-quantum migration guidance.

已验证Streamable HTTP可网页运行开发者工具安全与监控

概览

AI 生成的概览

为编程助手提供后量子就绪工具:解释量子脆弱加密发现、建议混合迁移方案并验证修复。

可以做什么
  • 解释检测规则与发现,并列出检测器目录
  • 查询某个依赖是否在已知量子脆弱依赖库中
  • 推荐后量子或混合替代方案,并给出修改前后代码示例
  • 生成供宿主代理推理的分诊与修复请求包,再附加判定并按暴露度重排
  • 验证整文件补丁,并重新扫描代码片段中残留的经典加密
  • 比较两组发现之间的就绪评分与“先收集后解密”风险变化
适用场景
适合在审计代码库中的 RSA、ECDH、ECDSA 等经典加密并规划向后量子或混合算法迁移时使用,也适合让助手在确定性校验下检查并验证自己的修复改动。
运行要求
可作为远程 HTTP 端点运行,也可作为本地 npm 包通过 stdio 运行;README 说明工具链需要 Node 20 或更高版本。未声明认证、环境变量或请求头,所述工具无需 API 密钥或网络访问。
安装前请注意
写入或应用补丁的工具会作用于你提供的代码;verify_fix 与 apply_verified_patch 只检查代码片段和拟议内容,提交前请自行审阅改动。分诊与修复请求包是交给宿主代理推理的,其结论反映模型判断而非密码学证明。

安装

在 SourceWeft 中

  1. 打开 控制台中的 quantakrypto pqc-tools,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.quantakrypto%2Fpqc-tools/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "quantakrypto-pqc-tools": {
      "type": "http",
      "url": "https://mcp.quantakrypto.com/mcp"
    }
  }
}

README

quantakrypto-tools

[CI] [License: Apache-2.0] [OpenSSF Best Practices] [npm @quantakrypto/core] [npm @quantakrypto/qscan] [npm @quantakrypto/mcp] [npm @quantakrypto/sieve] [npm @quantakrypto/agent] [npm @quantakrypto/qprobe] [Node ≥20] [TypeScript strict] [Runtime deps: 0] [PQC targets: FIPS 203/204/205]

Open-source post-quantum readiness tooling by quantakrypto. Find quantum-vulnerable cryptography in any codebase, wire post-quantum readiness into your editor and your CI, and conformance-test post-quantum implementations — with zero runtime dependencies (Node built-ins only).

Design goals: simple, clean, reusable code; zero runtime dependencies; everything documented, tested, and example-driven.

What's inside

ToolWhat it doesGet it
qScan (@quantakrypto/qscan)CLI that finds quantum-vulnerable crypto (RSA, (EC)DH, ECDSA, EdDSA, …) across 14 languages (JS/TS, Python, Go, Java/Kotlin/Scala, C#, Rust, Ruby, PHP, Elixir, C/C++, Swift, Objective-C, Dart, Solidity/Move/Cairo) and prints a readiness score. SARIF / JSON / CBOM / evidence (ISO 27001 A.8.24) / OpenVEX output, baselines, incremental & parallel scans. Compliance mandate gate: --mandate cnsa-2.0 / nist-ir-8547 reports each prohibited finding with its dated clause and fails the build on the mandate's deadlines (--lead-months, --fail-now). Opt-in --triage (BYOK LLM re-rank/explain) and a qremediate codemod CLI.npx @quantakrypto/qscan ./
MCP (@quantakrypto/mcp)Model Context Protocol server that gives AI coding agents post-quantum readiness tools (16 tools — scan, inventory, explain, suggest-hybrid, CBOM, plan-migration, triage, remediate, probe-endpoint, …). Local stdio + hostable HTTP.claude mcp add quantakrypto npx @quantakrypto/mcp
Sieve (@quantakrypto/sieve)Conformance battery for ML-KEM (FIPS 203), ML-DSA (FIPS 204), and SLH-DSA (FIPS 205) implementations, driven over a JSON stdin/stdout protocol.npx @quantakrypto/sieve --help
Action (@quantakrypto/action)GitHub Action that runs the qScan/Sieve/qProbe checks in CI, writes SARIF for code-scanning upload, annotates the diff, and fails the build only on new quantum-vulnerable crypto.uses: quantakrypto/pqc-tools/packages/action@v1
agent (@quantakrypto/agent)Optional, zero-dependency BYOK (bring-your-own-key) LLM client (native fetch; Anthropic + OpenAI-compatible adapters) that powers qScan --triage and qremediate --llm. Networked, key-holding — kept isolated (see also qProbe).npm i @quantakrypto/agent
qProbe (@quantakrypto/qprobe)Actively probes live TLS/SSH endpoints you own for post-quantum readiness — PQC-hybrid key exchange (X25519MLKEM768) and classical certificate posture. Gated behind an ownership attestation; reports, never modifies ("engine disposes"). See THREAT-MODEL.npx @quantakrypto/qprobe --i-own-this host

All of qScan, MCP, the Action, agent, and qProbe share the engine in @quantakrypto/core (npm i @quantakrypto/core) — detectors, the vulnerable-dependency DB, the readiness score, SARIF/JSON/CBOM/evidence/OpenVEX reporting, and the offline agent-plane primitives (context redactor, verify_fix gate, codemods, patch policy). Sieve is standalone: it tests other implementations and implements no crypto itself.

Infrastructure coverage. Beyond application source, the shared core engine carries config-scope detectors for Terraform/OpenTofu IaC and cloud KMS, JSON Web Keys, Kubernetes / cert-manager / Istio, CI/CD artifact & code signing (cosign/GPG/jarsigner/codesign/minisign), secrets at rest (SOPS/age, PGP, Sealed Secrets), message brokers (Kafka/MQTT), databases (pgcrypto, libpq sslmode), and JOSE/JWE key management — so qscan, the Action, and MCP flag infrastructure crypto with no extra install. qProbe adds the live-endpoint dimension (see the table above). The narrative anchor for infrastructure is harvest now, decrypt later: data and secrets captured today are decryptable once a CRQC exists.

Quick start

bash
# 1. Scan a codebase for quantum-vulnerable cryptography.npx @quantakrypto/qscan ./
# 2. Give your AI coding agent post-quantum readiness tools.claude mcp add quantakrypto npx @quantakrypto/mcp
# 3. Conformance-test a post-quantum implementation (adapter speaks the JSON protocol).npx @quantakrypto/sieve --impl "node ./my-impl.js" --param ml-kem-768
# 4. Gate against a compliance mandate's dated deadlines (CNSA 2.0 / NIST IR 8547).#    Verdicts also ride in --format json/sarif/evidence; --policy lets an org#    acknowledge families it is knowingly migrating (exempt from early gating).npx @quantakrypto/qscan ./ --mandate cnsa-2.0 [--policy .quantakrypto/crypto-policy.json]

Add the CI gate by dropping packages/action/examples/quantum-readiness.yml into .github/workflows/, or wire it up directly:

yaml
- uses: quantakrypto/pqc-tools/packages/action@v1  with:    path: "."    severity-threshold: "high"

Each package README has the full options reference and more examples: qScan · MCP · Sieve · Action · core · agent.

Using quantakrypto alongside a PQC library (liboqs / OQS)

quantakrypto does not implement post-quantum cryptography, by design — it is the scanner, the CI gate, and the conformance harness you wrap around a real PQC library like liboqs / Open Quantum Safe. They compose: quantakrypto finds and gates classical crypto (qscan, the Action), tells you what to migrate to and in what order (qscan --tier, MCP plan_migration, qremediate), and conformance-tests the replacement (sieve runs any ML-KEM/ML-DSA/SLH-DSA implementation against FIPS 203/204/205, with exact-value KATs when you supply official NIST ACVP vectors). liboqs supplies the primitives.

See the worked end-to-end walkthrough — scan → migrate → verify → gate — in examples/liboqs-migration/.

Workspace layout

quantakrypto-tools/├── packages/│   ├── core/     @quantakrypto/core    — shared engine (the contract lives in src/types.ts + src/index.ts)│   ├── qscan/    @quantakrypto/qscan   — CLI│   ├── mcp/      @quantakrypto/mcp     — MCP server (stdio now, HTTP scaffold for hosting)│   ├── action/   @quantakrypto/action — GitHub Action│   ├── sieve/    @quantakrypto/sieve   — conformance battery + JSON protocol│   ├── agent/    @quantakrypto/agent   — opt-in BYOK LLM client (triage + remediation)│   └── qprobe/   @quantakrypto/qprobe  — active TLS/SSH endpoint probing (gated; the only prober)├── docs/         architecture, hosted-MCP design, improvement roadmap└── examples/     end-to-end examples

Development

Requires Node ≥ 20.

bash
npm install        # links the workspacesnpm run build      # tsc --build (project references)npm test           # node:test across all packages

The toolchain is intentionally tiny: TypeScript + tsx (to run node:test on .ts) are the only dev dependencies; there are no runtime dependencies.

Documentation & compliance

Full documentation lives in docs/:

  • Objectives & scope — what the toolchain is for, what each library does, the load-bearing decisions, and the deliberate scope boundaries. Start here.
  • Architecture decisions — the immutable "why" behind each load-bearing choice (zero deps, shared core contract, two-plane agent, …).
  • Standards & compliance — what the tools touch and could align to: NIST FIPS 203/204/205, SP 800-208, CNSA 2.0, SARIF, CWE, ISO/IEC 27001 (A.8.24), Common Criteria, FIPS 140-3, EU DORA/NIS2, US M-23-02 / NSM-10, and OSS assurance (SLSA, OpenSSF Scorecard, SPDX/REUSE).
  • Governance: Contributing · Security · Code of Conduct · Changelog.

License

Apache-2.0. The methodology is open; the assessments, attestation reports, and deliverables are where the quantakrypto practice lives.

Support & training

Questions, commercial support, or post-quantum readiness training for your team — visit quantakrypto.com or email [email protected].

来源:README.md,提交 6a81b55

工具

11

apply_triage

Deterministically attach your triage verdicts to their findings and re-sort by exposure (highest first). Never suppresses. Pass the same 'findings' array you triaged plus a 'verdicts' array of { fingerprint, exposureScore, priority, rationale }.

输入参数findings必填verdicts必填

apply_verified_patch

Deterministically VERIFY a proposed fix before writing it — runs the same patch-policy + verify_fix + blast-radius gates as `qremediate` (offline, no key, no network). Give the finding, the file's current content, and your proposed FULL corrected content; returns approved:true only if the patch is in-policy, clears the finding, adds no new finding, introduces no network/exec sink, and is bounded in size. This does NOT write the file — you write it, only when approved, and never auto-merge.

输入参数finding必填newContent必填originalContent必填

check_dependency

Check whether a package is in quantakrypto's known quantum-vulnerable dependency database (the classical crypto it exposes). Provide 'name' and optional 'ecosystem' (default npm).

输入参数name必填ecosystem

explain_finding

Explain a quantakrypto finding and its post-quantum remediation. Provide a ruleId (e.g. 'forge-rsa-keygen', 'elliptic-ec', 'node-rsa', 'pem-ec-private-key') and/or an algorithm (e.g. 'RSA', 'ECDSA'). The ruleId is resolved against the core detector set, so library and config rules explain correctly.

输入参数ruleIdalgorithm

get_fix_examples

Return before/after code examples for migrating a classical algorithm to a post-quantum / hybrid replacement. Provide an 'algorithm' (RSA, ECDH, ECDSA, …) or a 'ruleId' from a finding.

输入参数ruleIdalgorithm

list_rules

List the quantakrypto detector catalog: every detector id and what it looks for.

无需输入参数。

remediate_findings

Produce a deterministic remediation REQUEST bundle (rubric + fix schema + per-finding metadata + fingerprints) for YOU (the host agent) to fix. This tool calls no model and needs no key. For each finding, propose the corrected FULL file content, then VERIFY with verify_fix and keep only fixes that clear the finding. Never touch files with secrets; never auto-merge. Pass 'findings' from scan_path --format json.

输入参数findings必填

score_delta

Compute the readiness-score and HNDL change between two finding sets (e.g. before and after a migration). Pass 'before' and 'after' as arrays of findings from scan_path --format json.

输入参数after必填before必填

suggest_hybrid

Recommend a post-quantum / hybrid migration. Provide an 'algorithm' (e.g. RSA, ECDH, ECDSA) or free-text 'context' describing the usage. Set 'tier' to 'category-5' for CNSA 2.0 / national-security systems.

输入参数tiercontextalgorithm

triage_findings

Produce a deterministic triage REQUEST bundle (rubric + verdict schema + per-finding metadata) for YOU (the host agent) to reason over. This tool does NOT call any model and needs no API key. Assess each finding's real-world exposure, then call apply_triage with your verdicts. Pass 'findings' as an array from scan_path --format json.

输入参数findings必填

verify_fix

Run the quantakrypto detectors over a code snippet (NOT the filesystem) and report any classical crypto that remains. Use this to confirm an edit actually removed the quantum-vulnerable usage. Provide 'code' plus a 'language' or 'filename'.

输入参数code必填filenamelanguage

版本历史

1
  1. v0.5.2最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分