Q-Trust is a post-quantum cryptography (PQC) migration assurance platform that registers, plans, and audits cryptographic asset migrations on-chain. It combines Solidity smart contracts, a Fastify backend API, a Python SDK, a TLS/file inspector, and a GNN-based planner to guide organizations from legacy algorithms to NIST-approved PQC standards.
All eleven contracts are Solidity 0.8.24, UUPS-proxy upgradeable via OpenZeppelin ERC1967Proxy, and use AccessControl role-based permissions. Admin operations route through QTrustGovernance (7-day timelock, DEFAULT_DELAY = 7 days). Gasless meta-transactions use EIP-712 typed signatures with nonce tracking.
| Contract | Description |
|---|---|
| AssetRegistry | Registers CBOM hashes (SHA-256) with IPFS metadata URIs; supports EIP-712 gasless registration. |
| VendorRegistry | Vendors (DigiCert, Thales, AWS) post PQC-readiness attestations per product/version/algorithm. |
| MigrationRegistry | Records each migration step (from-algo → to-algo) with evidence hashes; validates asset existence against AssetRegistry. |
| AuditRegistry | Third-party auditors post attestation results (Passed/Failed/Conditional); binds to on-chain migration count. |
| EvidenceRegistry | Stores verifiable evidence records (hashes + metadata) referenced by audits and migrations for tamper-evident traceability. |
| QTrustGovernance | Timelock-gated wrapper around the four core registries for pausing, retiring, role grants, and upgrades. |
| RevocationAnchor | Anchors off-chain Merkle roots for privacy-preserving credential revocation checks. |
| PolicyCommitment | Versioned on-chain policy hash anchors for reproducible trust assessments. |
| ComplianceAttestation | Records regulatory/compliance attestations (jurisdiction, standard, status) bound to assets and vendors. |
| SchemaRegistry | Registers JSON Schema documents for CBOM/credential formats with cross-domain equivalence mappings. |
| TrustAnchorRegistry | Accreditation of credential issuers by governance multisig; verifiers reject non-accredited issuers. |
/api/*.GET /v1/assets/:id/verify — on-chain asset verificationGET /v1/orgs/:did/summary — organization dashboard dataPOST /v1/write/assets — admin CBOM registration (API-key gated)POST /v1/relay/attestation — EIP-712 gasless attestation relayPOST /v1/webhooks/subscribe — real-time event subscriptionsqtrust package).QTrustClient — connects to Base Sepolia via Web3.py, wraps all four core registry ABIs.cbom.py (CBOM builder), ipfs.py (Pinata pinning with retry + multi-vendor fallback), schema.py (Pydantic models for CBOM, AssetRecord, MigrationRecord, ProductAttestation).qtrust_inspector.cli CLI module.CryptoScanner — performs TLS handshakes (Python ssl + cryptography), optional Nmap port scanning, PEM file scanning, and SSH key inspection.ScanResult containing AssetFinding objects serialized as CBOM JSON conforming to schema qtrust.cbom.v1.Module dependencies (derived from actual imports):
graph TD
cli[cli]
mcp[mcp_server]
scanner[scanner]
subgraph probes["scanners / probes"]
ast[ast_scanner]
binary[binary_scanner]
pcap[pcap_scanner]
source[source_scanner]
manifest[manifest_scanner]
tlsp[tls_probe]
pem[file_scanner]
end
risk[risk_engine]
comp[compliance]
conf[conformance]
cdx[cyclonedx]
sarif[sarif]
ev[evidence]
road[roadmap]
rem[remediation]
k8s[k8s_policy]
models
cli --> scanner
cli --> risk
cli --> comp
cli --> conf
cli --> cdx
cli --> sarif
cli --> ev
cli --> road
cli --> rem
cli --> k8s
mcp -.-> source
mcp -.-> ast
mcp -.-> scanner
mcp -.-> pcap
mcp -.-> binary
mcp -.-> risk
mcp -.-> comp
mcp -.-> rem
scanner --> pem
ast --> source
binary --> source
pcap --> tlsp
risk --> models
comp --> models
ast --> models
binary --> models
source --> models
manifest --> models
pem --> models
cdx --> models
sarif --> models
cli --> models
Dataflow: cli drives scanner, which fans out to the format-specific
probes (ast_scanner/binary_scanner reuse source_scanner’s skip rules;
pcap_scanner reuses tls_probe’s codepoint tables); every probe emits
models.AssetFinding. Those findings flow through risk_engine,
compliance/conformance scoring into the output layers — cyclonedx
(CBOM), sarif, evidence, roadmap, remediation, and k8s_policy.
mcp_server wraps the same scan/risk/compliance surface as JSON-RPC tools for
AI coding agents.
MigrationGNN — PyTorch Geometric GCN that takes a cryptographic-asset dependency graph and outputs per-node priority and risk logits.[algorithm_type, key_size, vendor_pqc_ready, criticality].model.pt) is available.POST /plan (CBOM → ordered migration plan), POST /plan/deadline (feasibility check)./ — landing page/dashboard — organization summary view (role-gated)/v — verification index/v/:id — individual asset verification page/vendors — vendor attestation explorer/api/* to the Fastify backend at localhost:3001.Inspector scan → CBOM JSON (qtrust.cbom.v1)
→ SDK pins to IPFS, computes SHA-256 hash
→ AssetRegistry.registerCBOMSigned (EIP-712 gasless)
→ Planner reads CBOM, builds dependency graph
→ MigrationGNN outputs priority-ordered migration plan
→ MigrationRegistry.recordMigrationSigned per step
→ AuditRegistry.postAudit by third-party auditor
→ TrustAnchorRegistry / RevocationAnchor for credential lifecycle
84532, RPC via QTRUST_BASE_SEPOLIA_RPC env var.QTRUST_USE_MAINNET=true.PublicClient for read calls; WalletClient with deployer private key for writes.AccessControl with named roles per contract (REGISTRAR_ROLE, VENDOR_ROLE, MIGRATOR_ROLE, AUDITOR_ROLE).QTrustGovernance wraps all admin mutations through a 7-day TimelockController (DEFAULT_DELAY = 7 days), preventing single-key compromise.