{"uid":"cap_vBbTMeerS6aDfUMHPXKGv","slug":"fractalai-post-quantum-signature-verification-22541fc8","name":"FractalAI Post-Quantum Signature Verification","description":"The first AI-native Layer 1 blockchain built from scratch in Rust. Post-quantum cryptography (CRYSTALS-Dilithium), Proof of Fractal Work consensus, WASM smart contracts, and 460+ RPC endpoints. Mine FRAC tokens with fractal analysis instead of hash puzzles.","url":"https://fractalai.net.co/api/x402/verify-proof","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"message":{"type":"string","description":"The UTF-8 message that was signed. Provide message OR message_b64. For an ML-DSA-65 signature this must be the EXACT bytes the client signed."},"signature":{"type":"string","description":"The base64 post-quantum signature to verify. Scheme auto-detected by size: 3309 bytes → ML-DSA-65 / Dilithium-3 (verified locally); 2420 bytes → Dilithium-2 / ML-DSA-44 (verified via the node PQC API). Required."},"public_key":{"type":"string","description":"The base64 public key to verify against. 1952 bytes → ML-DSA-65 / Dilithium-3; 1312 bytes → Dilithium-2 / ML-DSA-44. Must match the signature scheme. Required."},"message_b64":{"type":"string","description":"The base64-encoded exact bytes that were signed (use this if the original signer signed raw bytes, e.g. our /api/x402/sign). Provide message OR message_b64. For ML-DSA-65 the verifier checks ml_dsa65.verify(signature, base64-decode(message_b64), public_key) — pass the exact signed message (include any domain prefix the signer used)."}}},"responseSchema":{"type":"json","schema":{"type":"object","required":["valid","algorithm","verified_algorithm","input_signature","input_public_key"],"properties":{"valid":{"type":"boolean","description":"True iff the supplied client signature (ML-DSA-65 or Dilithium-2, auto-detected) is valid over the message for the public key."},"payment":{"type":"object","description":"Settlement receipt (scheme, network, asset, txHash, payer, settled)."},"algorithm":{"type":"string","description":"ml-dsa-65 — algorithm of THIS route's attestation signature over the verdict (NOT necessarily the client input scheme; see verified_algorithm)."},"signature":{"type":"string","description":"Base64 ML-DSA-65 / Dilithium-3 (NIST FIPS 204) signature (3309 bytes) by this server over the EXACT bytes echoed in `signed_message` = FRACTALAI-x402-served-v1\\nx402-verify-proof\\n<attestation_digest> (route-separated, 3 lines), attesting the verdict. Verify offline: ml_dsa65.verify(b64(signature), utf8(signed_message), b64(public_key)). Null (with served_signature_error) if the served signer was momentarily unavailable — the paid verdict is still served."},"public_key":{"type":"string","description":"Base64 ML-DSA-65 public key (1952 bytes) that verifies the attestation signature. Null if the served signer was unavailable."},"message_b64":{"type":"string","description":"The exact base64 bytes that were verified (echoed for reproducibility)."},"signed_message":{"type":"string","description":"The EXACT UTF-8 bytes the served signature covers (FRACTALAI-x402-served-v1\\nx402-verify-proof\\n<attestation_digest>). Pass verbatim to ml_dsa65.verify — do not reconstruct it yourself."},"algorithm_label":{"type":"string","description":"ML-DSA-65 / Dilithium-3 (NIST FIPS 204)"},"input_signature":{"type":"string","description":"The exact base64 client signature that was verified (echoed so a third party can recompute attestation_digest from this response alone)."},"input_public_key":{"type":"string","description":"The exact base64 client public key that was verified (echoed for attestation_digest reconstruction)."},"attestation_digest":{"type":"string","description":"sha256 hex over JSON({valid, verified_algorithm, message_b64, message_hash, signature: input_signature, public_key: input_public_key}) — reconstructible from this response."},"verified_algorithm":{"type":"string","description":"The DETECTED scheme of the CLIENT input signature that was verified: ml-dsa-65 or dilithium2."},"served_signature_error":{"type":"string","description":"Present only if the served attestation signer failed; the verdict is still authoritative and paid."},"verified_algorithm_label":{"type":"string","description":"Human label of verified_algorithm, e.g. \"ML-DSA-65 / Dilithium-3 (NIST FIPS 204)\" or \"Dilithium-2 (NIST FIPS 204)\"."}}},"example":{"valid":true,"algorithm":"ml-dsa-65","verified_algorithm":"dilithium2"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xQM5WIKAfP7I3BqMfQfjx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Verifies a post-quantum cryptographic signature (ML-DSA-65 / Dilithium-2) over a message and returns a signed attestation of the verdict","exampleAgentPrompt":"Can you verify this ML-DSA-65 post-quantum signature — here's the base64 message, the base64 signature, and the base64 public key — and give me a signed attestation receipt I can use as proof it was validated?","exampleUseCases":[{"title":"Audit trail for signed blockchain transactions","prompt":"I have a Dilithium-2 signature from a FractalAI blockchain transaction. Can you verify it against this public key and message, and return a server-signed attestation I can store as an audit record?"},{"title":"Verify quantum-resistant document signature","prompt":"Someone sent me a document signed with ML-DSA-65 post-quantum cryptography. Here's the base64 message, their signature, and their public key — can you confirm whether the signature is genuine and give me a verification receipt?"},{"title":"Integration test for post-quantum signing pipeline","prompt":"I'm testing my Dilithium signing code. Please verify this test signature against the message and public key I'm providing and tell me if it's valid, plus show me the algorithm that was detected."}],"resultDescription":"A JSON object containing: a boolean 'valid' field indicating whether the client's post-quantum signature is authentic; 'verified_algorithm' identifying whether ML-DSA-65 or Dilithium-2 was detected; echoed 'input_signature' and 'input_public_key' for reproducibility; a server-generated ML-DSA-65 attestation 'signature' (3309 bytes) over a canonical signed_message string; the server's 'public_key' (1952 bytes) for offline verification; and optionally a 'payment' settlement receipt with transaction hash and payer details.","failureModes":["Invalid or malformed base64 input for message, signature, or public key returns an error","Signature length mismatch (not 2420 bytes for Dilithium-2 or 3293 bytes for ML-DSA-65) causes rejection","Public key length mismatch causes scheme auto-detection to fail","Payment failure or insufficient USDC balance prevents the call from being processed","Server-side attestation signer temporarily unavailable returns null signature with served_signature_error flag but still delivers the paid verdict","Incorrect or mismatched public key/signature pair returns valid=false"],"whenToPreferThis":"Choose this endpoint when you need a verifiable, server-attested proof of post-quantum signature validation — not just a local library check. Ideal when you need an auditable receipt (the server's own ML-DSA-65 attestation signature) that a third party can independently verify offline. Prefer this over self-contained library verification when operating in regulated, audit-required, or zero-trust environments where an external attestation from an independent party strengthens non-repudiation. Also suitable when you need automatic scheme detection between Dilithium-2 and ML-DSA-65 (NIST FIPS 204).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:34:44.683Z","isFirstParty":false}