[Paper Review] Verifiable Provenance of Software Artifacts with Zero-Knowledge Compilation
This paper presents CosmicTurtle, a system that compiles software inside a zero-knowledge VM to produce both the compiled binary and a cryptographic proof of provenance binding source code, compiler identity, and output.
Verifying that a compiled binary originates from its claimed source code is a fundamental security requirement, called source code provenance. Achieving verifiable source code provenance in practice remains challenging. The most popular technique, called reproducible builds, requires difficult matching and reexecution of build toolchains and environments. We propose a novel approach to verifiable provenance based on compiling software with zero-knowledge virtual machines (zkVMs). By executing a compiler within a zkVM, our system produces both the compiled output and a cryptographic proof attesting that the compilation was performed on the claimed source code with the claimed compiler. We implement a proof-of-concept implementation using the RISC Zero zkVM and the ChibiCC C compiler, and evaluate it on 200 synthetic programs as well as 31 OpenSSL and 21 libsodium source files. Our results show that zk-compilation is applicable to real-world software and provides strong security guarantees: all adversarial tests targeting compiler substitution, source tampering, output manipulation, and replay attacks are successfully blocked.
Motivation & Objective
- Establish cryptographic provenance guarantees for compiled artifacts without full rebuilds or trusted hardware.
- Bind source code, compiler identity, and output into a verifiable proof during compilation.
- Enable independent verification of provenance by any party without reproducing the build.
- Evaluate practicality on real-world crypto libraries and synthetic programs.
Proposed method
- Execute a compiler inside a zero-knowledge VM to produce a binary and a succinct proof of correct execution.
- Bind the input source digest and the compiler identity (ImageID) into the proof.
- Verify the proof against the committed source and compiler without re-running the build.
- Use a handshake to fix the compiler binary (or its identity) before production runs.
- Prototype CosmosTurtle uses RISC Zero zkVM and the ChibiCC C compiler cross-compiled to RISC-V.
Experimental results
Research questions
- RQ1Can zero-knowledge execution provide cryptographic proof that a specific source code was compiled by a claimed compiler to produce a given binary?
- RQ2Does the approach resist compiler substitution, source tampering, binary tampering, and replay attacks?
- RQ3What are the performance characteristics of zk-compilation and verification on realistic software and cryptographic libraries?
Key findings
- zk-compilation produces a cryptographic receipt that binds source digest, compiler identity, and output.
- The system successfully zk-compiles and verifies 252 programs (200 synthetic Csmith programs, 31 OpenSSL files, 21 libsodium files).
- Security tests show resistance to compiler substitution, source tampering, output manipulation, and replay attacks.
- Verification is faster than proof generation, enabling multiple verifications after a single expensive proof generation.
- Proof sizes scale with program size; receipts can reach over 100 MB for larger inputs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.