Skip to main content
Glama

AegisQore — Post-Quantum AI Agent Firewall, Scoped EVM Policy Registry & MCP Server for QoreChain / QoreX

AegisQore Featured Cover

AegisQore is a unified, Apache-2.0 post-quantum security stack for autonomous AI agents operating on QoreChain / QoreX (qorechain-diana, EVM Chain ID 9800). It pairs real NIST post-quantum cryptography (@qorechain/pqc FIPS-204 ML-DSA-87 / ML-DSA-65, FIPS-205 SLH-DSA, FIPS-202 SHAKE-256), on-chain Scoped EVM Windows & 30-day owner-to-agent link leases, official qorechain-msg-v1|<chainId>|<data> hybrid secp256k1 + ML-DSA-87 authenticated messaging, a 6-tool Model Context Protocol server (qoreguard-mcp), live QoreX Testnet precompile verification, and an interactive web console (web/).


Live QoreX Testnet Verification Proof

Running npm run probe:testnet executes a real read-only probe against QoreChain Testnet (qorechain-diana, EVM Chain ID 9800), generating a fresh FIPS-204 ML-DSA-87 keypair (2,592-byte public key, 4,627-byte signature) via @qorechain/pqc and verifying it both locally and on-chain via QoreChain's live EVM precompile IQorePQC.pqcVerify (0x0000000000000000000000000000000000000A01):

  • Network: qorechain-diana (EVM Chain ID: 9800, live verified block 10,801,339, consensus height 10,801,340)

  • IQorePQC.pqcVerify (0x...0A01): available: true, verified: true (on-chain ML-DSA-87 verify=true)

  • IQorePQC.pqcKeyStatus (0x...0A02): available: true

  • IQoreConsensus.rlConsensusParams (0x...0C01): available: true (blockTime=5000, baseGasPrice=100, validators=4, epoch=1)

  • On-Chain Smart Contract (contracts/QoreGuardPolicyRegistry.sol):

    • Integrates directly with QoreChain native precompiles 0x...0A01 (pqcVerify), 0x...0A02 (pqcKeyStatus), 0x...0B01 (aiRiskScore), and 0x...0B02 (aiAnomalyCheck).

    • Enforces 30-day maximum owner-to-agent link TTL (MAX_LINK_TTL = 30 days, renewAgentLink(), relinkAgentKey()), Scoped EVM Windows (openScopedEvmWindow(agent, startBlock, endBlock, maxTxCount, maxTotalValue, windowTargets)), official qorechain-msg-v1|<chainId>|<data> hybrid secp256k1 + ML-DSA-87 message verification (verifyAuthenticatedMessage & verifyAgentAuthenticatedMessage), per-tx & O(1) two-epoch sliding-window daily caps, target/selector allowlists (default-blocking approve and setApprovalForAll), strict monotonic nonces, emergency owner revocation, and tamper-evident PolicyApproved / PolicyRejected / AgentRevoked events.

    • Live QoreX EVM 9800 Dry-Run Gas Estimate (npm run deploy:registry -- --dry-run): 3,480,337 gas (0.3915379125 QOR @ 112.5 gwei, block 10,802,524, 15,896-byte Solc 0.8.28 paris creation bytecode, SHA-256 7c304cb1...87c2cdce).

    • Static Security Audit (Slither 0.11.6, 102 detectors): 0 High / 0 Medium / 0 Optimization findings.

  • Automated Test Suites: 62 / 62 PASS (18/18 Foundry incl. 256-run fuzz + 36/36 core Vitest incl. InMemory MCP round-trip + 8/8 web Vitest)


Related MCP server: Trust Gate MCP

Visual Walkthrough

Live Telemetry & Hybrid PQC Overview

Post-Quantum Policy Console & Adversarial Breaker Lab

Hero Telemetry

Policy Console

PQC Comparison

Adversarial Lab


Monorepo Architecture

aegisqore-qorechain/
├── contracts/
│   ├── QoreGuardPolicyRegistry.sol        # On-chain QoreX EVM 9800 PQ Agent Policy Registry (0x...0A01/0A02/0B01/0B02)
│   └── test/QoreGuardPolicyRegistry.t.sol # 18 Foundry tests (vm.etch precompiles, 30d TTL, Scoped EVM Window, qorechain-msg-v1, fuzz)
├── foundry.toml                           # Solc 0.8.28 (paris, optimizer=200) + QoreChain RPC endpoints
├── src/
│   ├── contracts/registry-artifact.ts     # Compiled QoreGuardPolicyRegistry ABI + verified creation bytecode
│   ├── networks.ts              # Verified QoreChain testnet/mainnet/localnet presets, precompile ABIs (0x...0901-0C01), 30d MAX_AGENT_LINK_TTL_SEC
│   ├── types.ts                 # Strict TypeScript contracts for policies, Scoped EVM Windows, 30d link leases, qorechain-msg-v1, and audit bundles
│   ├── crypto.ts                # FIPS-204 ML-DSA-87/65/44 (@qorechain/pqc) + FIPS-205 SLH-DSA + secp256k1/ed25519 + hybridSignBytes('v2') + qorechain-msg-v1
│   ├── policy-engine.ts         # Stateful spending caps, Scoped EVM Windows, 30d link renewal, selector firewall, 6-vector breaker, SHAKE-256 + ML-DSA-87 ledger
│   ├── guard.ts                 # Secret-input refusal guard (blocks private keys / BIP-39 mnemonics in MCP tool calls)
│   ├── testnet-client.ts        # Live QoreX read-only RPC/precompile probe + env-var-driven turnkey guarded tx runner (honest simulation fallback)
│   ├── registry-deployer.ts     # Turnkey QoreGuardPolicyRegistry gas estimator & EVM deployer
│   ├── mcp/
│   │   ├── server.ts            # 6-tool AegisQore MCP server (`qoreguard-mcp`) aligned with @qorechain/mcp conventions
│   │   └── bin.ts               # Stdio CLI entry point for MCP clients
│   └── scripts/
│       ├── deploy-registry.ts   # `npm run deploy:registry -- --dry-run` live EVM 9800 gas estimator & turnkey deployer
│       ├── testnet-probe.ts     # `npm run probe:testnet` live QoreX read-only probe
│       └── turnkey-tx.ts        # `npm run tx:turnkey` env-var-driven guarded tx / dry-run demo
├── test/                        # 36 Vitest tests (crypto + qorechain-msg-v1, policy-engine + 30d TTL + Scoped Window, MCP, testnet, deployer)
├── web/                         # Interactive React 19 + Vite 6 + TypeScript console deployed to GitHub Pages (8 Vitest tests)
├── docs/
│   ├── cover-image.png          # 1200x630 Featured Cover Image for AegisQore QoreChain submission
│   ├── aegisqore-deck.pdf       # 8-slide 16:9 Judge Pitch Deck PDF
│   └── screenshots/             # Captured high-resolution UI screenshots
├── AI_USAGE.md                  # AI-assisted engineering disclosure (Best AI-Native Build)
└── SUBMISSION_READY.md          # Complete QoreChain Developer Fest submission checklist & evidence

MCP Tools (qoreguard-mcp)

Aligned with @qorechain/mcp (structuredContent + JSON content + secret-input refusal):

Tool

Purpose

verify_pq_tx

Verifies hybrid classical + ML-DSA-87/SLH-DSA envelopes against active policy and commits nonce/spend/audit state on ALLOW.

quote_policy_decision

Side-effect-free pre-flight quote returning ALLOW/DENY, remaining caps, velocity snapshot, and rejection codes.

simulate_quantum_downgrade_attack

Runs 6 deterministic adversarial vectors in an isolated shadow engine (strip PQC, v2→v1 sign-bytes downgrade, ML-DSA-87→44 downgrade, commitment amount tamper, signature bit-flip, nonce replay).

export_audit_bundle

Exports the SHAKE-256 hash-chained & ML-DSA-87 attested audit bundle with independent verifyAuditBundle confirmation.

probe_qorex_network

Live read-only probe of QoreChain Testnet/Mainnet RPC, consensus status, and PQC/AI/Consensus EVM precompiles.

register_agent_policy

Registers a scoped PQ agent policy and returns its deterministic SHAKE-256 policyHashHex.


Quickstart & Reproducibility

Core SDK, Policy Engine & MCP Server (36 / 36 Vitest PASS)

npm install
npm run typecheck
npm run build
npm test

On-Chain Smart Contract (18 / 18 Foundry PASS, Slither 0 High / 0 Medium)

forge build
forge test -vv
# Live QoreX EVM 9800 deployment gas estimation (no private key required):
npm run deploy:registry -- --dry-run
# Turnkey live broadcast (env var QOREX_PRIVATE_KEY only; never commit keys):
# QOREX_PRIVATE_KEY=0x... npm run deploy:registry -- --broadcast

Live QoreX Testnet Probe & Turnkey Guarded Tx Runner

# Live read-only probe against qorechain-diana (EVM 9800) + on-chain IQorePQC.pqcVerify (0x...0A01)
npm run probe:testnet

# Offline deterministic simulation fallback
QOREGUARD_OFFLINE=true npm run probe:testnet

# Turnkey guarded tx dry-run (zero hardcoded keys; set QOREGUARD_PRIVATE_KEY + QOREGUARD_DRY_RUN=false for live broadcast)
npm run tx:turnkey

# Start MCP stdio server
node dist/mcp/bin.js --network testnet

Interactive Web Console (8 / 8 Vitest PASS)

cd web
npm install
npm run typecheck
npm test
npm run build

Credits & Open-Source Libraries

AegisQore builds directly on the official QoreChain developer ecosystem and audited open-source cryptography libraries:

License

Apache-2.0 (see LICENSE).

Available Tools

6 tools
export_audit_bundleExport Tamper-Evident PQ Audit BundleA
Read-onlyIdempotent

Exports the SHAKE-256 hash-chained audit ledger of all evaluated and blocked agent transactions, optionally attested with an ML-DSA-87 post-quantum signature, and includes an independent integrity verification check.

Inputs: attest.

probe_qorex_networkProbe QoreX / QoreChain Network & PQC PrecompilesB
Read-onlyIdempotent

Read-only probe of QoreChain testnet (qorechain-diana, EVM 9800) or mainnet (qorechain-vladi, EVM 9801), checking EVM RPC, consensus status, and live PQC/AI precompiles (0x...0A01, 0x...0A02, 0x...0B01, 0x...0C01) with honest offline fallback.

Inputs: network, offline.

quote_policy_decisionQuote Policy Decision (Dry-Run)A
Read-onlyIdempotent

Side-effect-free pre-flight evaluation of a hybrid post-quantum transaction envelope against active QoreGuard spending caps, rolling velocity windows, allowlist/selector firewall, and anti-downgrade rules.

Inputs: envelope (required), nowUnix, aiSignal.

register_agent_policyRegister Scoped Post-Quantum Agent PolicyC

Replaces the active QoreGuard policy with a new scoped post-quantum policy (spending caps, velocity windows, allowlisted targets, minimum PQ algorithm) and returns its deterministic SHAKE-256 policyHashHex and public demo identity metadata.

Inputs: agentId (required), policyId (required), maxSingleTxUqor (required), network, +5 more.

simulate_quantum_downgrade_attackSimulate Quantum Downgrade & Tamper AttacksA
Read-onlyIdempotent

Runs deterministic adversarial simulations (strip PQC to classical-only, downgrade v2->v1 sign bytes, downgrade ML-DSA-87->ML-DSA-44, tamper commitment amount, flip signature bit, replay consumed nonce) in an isolated shadow engine to verify QoreGuard blocks every vector.

Inputs: vectors, envelope.

verify_pq_txVerify Post-Quantum Agent TransactionB

Verifies a hybrid classical + ML-DSA-87/SLH-DSA signed transaction envelope against the active QoreGuard policy (anti-quantum-downgrade, spending caps, velocity windows, allowlist, monotonic nonce) and optionally commits the authorized state to the tamper-evident audit ledger.

Inputs: envelope (required), commit, nowUnix, aiSignal.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation4/5

    The closest overlap is between quote_policy_decision and verify_pq_tx, but the descriptions sharply distinguish them as side-effect-free pre-flight vs. authoritative verification with optional ledger commit. The remaining four tools (simulate attack, network probe, policy registration, audit export) target clearly separate concerns, so misselection risk is low but the quote/verify pair still invites care.

    Naming Consistency4/5

    All six tools follow a verb_noun pattern (export_audit_bundle, verify_pq_tx, quote_policy_decision, simulate_quantum_downgrade_attack, probe_qorex_network, register_agent_policy). Minor deviations are stylistic only—abbreviations like 'pq' and mixed specificity ('qorex' vs 'qoreguard')—so the set remains predictable.

    Tool Count5/5

    Six tools is well-scoped for a policy/transaction guard: policy write, pre-flight quote, verification, adversarial simulation, network health probe, and audit export each map to a distinct need. No tool looks like filler or a duplicate of another.

    Completeness3/5

    The core lifecycle (register policy, quote, verify, simulate, export audit) is covered, but there is no read-only way to fetch the current active policy or inspect individual ledger entries—only wholesale export. Policy replacement is also the sole write path with no update/patch or revoke semantics, leaving gaps an agent may hit when auditing or troubleshooting.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides tools to sign and verify post-quantum attestations of AI agent actions (mint, trajectory, coherence) using ML-DSA-65 signatures, with offline verification always free.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Signed receipts for agent actions and a read-only-allowlist decision gate, as an MCP server. Ed25519, plus ML-DSA-65 when the post-quantum backend is available. gate_decision returns ALLOW, DENY or ESCALATE from action names and does not observe or block anything. verify_receipt takes expected_kid to pin which key signed. Seven tools.
      16
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to operate through a local, signed boundary that blocks prompt injection and secret leakage, verifies outputs, preserves cross-session memory, and provides offline-verifiable receipts. It also exposes 900+ MCP tools for discoverable agent actions.
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to construct SHA-256 Merkle trees and generate/verify inclusion proofs, validate JWT HMAC-SHA256 claims, run Schnorr zero-knowledge identification, and enforce constant-time secret comparison with nonce replay protection for tamper-evident state attestation. It runs as a zero-dependency, stdlib-only MCP stdio server for clients such as Claude Desktop, Cursor, and Windsurf.
      7
      MIT