Browser-native post-quantum cryptography
Encrypt. Sign. Connect AI agents.
Hybrid encryption, digital signatures, MCP server, and LangChain tools — all in a pure TypeScript SDK. Try the full round trip locally.
The API stays small.
Encrypt, decrypt, sign, and verify — a handful of readable calls cover the complete cryptographic workflow.
import { pqc } from '@pqc-sdk/core';
// ── Hybrid encryption (X-Wing default) ──────────
const pair = await pqc.keys.generate(); // X-Wing
const ciphertext = await pqc.encrypt('secret', pair.publicKey);
const plaintext = await pqc.decrypt(ciphertext, pair.secretKey);
// ── Digital signatures (ML-DSA-65) ──────────────
const signer = await pqc.keys.generate({ algorithm: 'ml-dsa-65' });
const signature = await pqc.sign('document', signer.secretKey);
const valid = await pqc.verify('document', signature, signer.publicKey);Real work, measured locally.
A timing trace from this browser session.
TOTAL EXECUTION
Waiting
Results vary by browser, device, and workload.
Creates the post-quantum key pair
Seals the message with the public key
Recovers the message with the secret key
First-class AI integration
PQC operations as native AI tool calls.
The SDK ships an MCP stdio server and LangChain/LangGraph tool wrappers. Drop the same six operations — list algorithms, keygen, encrypt, decrypt, sign, verify — into any AI agent.
Works with Claude Desktop, Cursor, Continue, and any MCP-compatible host. Install globally and add one JSON config block.
npm install -g @pqc-sdk/mcp-server
# Claude Desktop: add "pqc": { "command": "pqc-mcp" }Structured tools for LangGraph agents, OpenAI tool-calling, and Anthropic tool-use. Drop pqcTools into any createReactAgent call.
import { pqcTools } from '@pqc-sdk/langchain';
const agent = createReactAgent({ llm: model, tools: pqcTools });Install the SDK.
Add browser-ready post-quantum encryption to a TypeScript project.
npm install @pqc-sdk/corenpm install @pqc-sdk/cliFour packages. One purpose.
Each package has a single responsibility. Use only what you need.
Encryption, signatures, key handling, and streaming. Node 20+, Deno, Cloudflare Workers, React Native.
pqc init / keygen / encrypt / decrypt / audit — project scaffolding and file-level crypto via npx.
stdio server exposing 6 PQC tool calls. Compatible with Claude Desktop, Cursor, Continue, and any MCP host.
StructuredTool wrappers for LangGraph agents, OpenAI tool-calling, and Anthropic tool-use.
Encrypted traffic can be stored today and targeted later.
Post-quantum cryptography is designed to protect against the risk of future large-scale quantum computers. NIST finalised FIPS 203 and FIPS 204 in 2024.
Self-assessment
FIPS 203 / 204 conformance.
Clause-by-clause matrices cover 43 requirements across both standards. Six NONCONFORMING findings were identified and closed: floating-point arithmetic, implicit-reject branches, missing zeroization, and wrong error attribution.
This is self-assessment, not CMVP validation. ACVP vectors passing is assurance evidence, not proof of every clause.
Floating-point in Compress_d — replaced with integer-only bit-shift arithmetic.
Floating-point in Decompose / Power2Round / HINT_M — verified over all 8M values of Z_q.
Branch-based implicit-reject — replaced with byte-wise arithmetic mask.
Missing zeroization on ML-DSA verify path — fixed with try/finally on all exit paths.
RBG failure misattributed as INVALID_KEY — dedicated RBG_FAILURE error code.
Wrong-length public key throws instead of returning false.
Built in the open.
Explore the implementation and install the package from its primary sources.
View on GitHub