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 分