Skip to content

Security: AntChainOpenLabs/zkDTVM

SECURITY.md

Security Policy

Audit Status

zkDTVM's circuits, runtime, prover, and verifiers have not undergone a formal third-party security audit. Do not use zkDTVM in production without an independent security audit.

For protocol parameters, soundcalc soundness bounds, and reproduction commands, see the Security Analysis.

Supported Versions

zkDTVM is in alpha. Security fixes are applied only to the latest release and the default branch.

Reporting a Vulnerability

Report vulnerabilities through GitHub private vulnerability reporting. Do not open a public issue or publish exploit details before the report has been addressed.

Please include:

  • the affected commit SHA or release tag;
  • the affected component (runtime, rv32-air, recursion, prover-core, whir-pcs, verifier, cuda, or guest);
  • minimal reproduction steps and the observed security impact (soundness, completeness, memory safety, or denial of service).

Do not include private keys, credentials, or sensitive third-party data in reports.

Verification Trust Contract

  1. Authenticate every proof against an externally trusted 32-byte SealKey. Derive the SealKey from the trusted guest ELF and OutputHash choice (zkdtvm key --elf ... or zkdtvm::derive_seal_key) and distribute it through a trusted configuration channel. Never derive trust from key material carried inside an untrusted receipt or proof envelope.
  2. Loading or proving does not establish trust. Receipt::from_bytes only parses wire bytes, and App::prove returns an unverified Receipt. The zkdtvm prove CLI performs an extra local self-check before writing output files, which does not replace verification on the receiving side. Before acting on any public output, call Verifier::verify_receipt, Verifier::verify_seal, zkdtvm verify, zkdtvm-verify, or the WASM seal_verify export with your own trusted SealKey.
  3. Check guest exit status and public outputs. Every verifier requires guest exit code 0 and checks the public-output digest (SHA-256 or BLAKE3).
    • Receipt verification authenticates the public bytes embedded in the receipt.
    • Bare Seal verification with expected public bytes checks them directly.
    • Bare Seal verification without public bytes returns the authenticated VerifiedSeal.output_digest; the caller must compare it with its expected digest.
  4. Treat prover-reported cycle counts as unauthenticated metadata. Receipt::cycles() is intended for operational accounting only. When execution cycles are part of an application contract, compare them against an independent execution of the same ELF (zkdtvm::execute).
  5. Ship verifier binaries and catalogs together. zkdtvm-verifier embeds the baked Seal AIR catalog (seal-air.deflate) that every SealKey commits to. Mismatched verifier and catalog releases fail verification cleanly.

Execution and Deployment Boundaries

  • Set resource budgets on CPU and GPU provers for untrusted inputs. When proving external ELFs or inputs, configure with_max_elf_words, with_cycle_limit, and with_io_limits on CpuConfig or GpuConfig. CpuConfig and GpuConfig both default to unbounded execution and I/O limits for trusted offline workloads. The standalone zkdtvm::execute(elf, input) helper takes no CpuConfig and runs without limits; isolate untrusted dry runs externally or run them through a budgeted Prover::cpu configuration.
  • Protect native AOT .so caches and libraries. On Linux x86-64, compiled AOT shared libraries execute host machine code via dlopen. Build them with a trusted toolchain into a builder-owned writable directory, then publish the ELF, keys, and .so artifacts together into a read-only runtime directory whose parent directories are also protected. Keep writable build, AOT, and CUDA caches separate and restricted to trusted identities, and never overwrite a shared library while it is loaded. Re-hashing a file before dlopen does not defend against an attacker-writable directory.
  • Guest randomness is deterministic. Guest getrandom / sys_rand expands a fixed public seed (0x123456789abcdef0) for reproducible execution only. Never use it for private keys, signing nonces, or zero-knowledge blinding.

There aren't any published security advisories