Skip to content

Proof-Carrying Code

A code-admission method in which an untrusted producer supplies executable code with a formal proof that the consumer checks against its policy for that received code.

Core Idea

Proof-carrying code (PCC) lets an untrusted producer send an executable with a formal proof that the code consumer can check before running it. The consumer fixes a safety policy and computes the obligation for the code it actually receives; the producer's certificate must prove that obligation. The result is policy-relative admission, not a blanket claim of secure code or a trusted statement about its author. Proof construction can be hard and producer-side; checking is intended to be simpler and consumer-side.[1][2][3]

The conclusion depends on a sound policy and machine model, correct verification-condition generation and proof checking, valid calling assumptions, and execution of the same code that was checked. Editing code before checking may fail validation or produce another policy-compliant program with a valid proof; editing code after checking is not covered by that validation.[3][4]

How would you explain it like I'm…

The Robot with a Safety Proof

Imagine a stranger hands you a toy robot and says it's safe. Instead of just trusting them, the robot comes with a puzzle answer that shows it can't do anything bad. You check the answer against the very robot you got, and only switch it on if the answer checks out.

Code That Brings Its Own Proof

Proof-carrying code is a way to safely run a program from someone you don't trust. The person receiving the program sets the safety rules. The program's maker sends the program along with a mathematical proof that it follows those rules. Before running it, the receiver works out from the actual program what needs to be proven, checks the proof, and only runs the program if the check passes. The receiver doesn't have to trust the maker's tools at all, just their own checker.

Consumer-Checked Safety Certificates

Proof-carrying code (PCC) lets an untrusted program bring along evidence that the receiving system — the code consumer — can check before running it. The consumer defines a safety policy and a formal way to turn executable code into a safety obligation (what must be proven). The producer supplies the code plus a formal proof of that obligation. When the code arrives, the consumer generates the obligation from the code it actually received, checks the proof against it, and accepts the code only if the check passes. The producer may use expensive compilers or provers, but the consumer doesn't need to trust them. The guarantee is limited: the checked code meets the stated policy, assuming the consumer's checker is sound — it is not general security, proof of who wrote it, or protection against changes after checking.

 

Proof-carrying code (PCC) attaches to an untrusted program a certificate that a separate code consumer can validate before execution. The consumer fixes the safety policy and a formal method (a semantics and obligation generator) for deriving a safety obligation from executable code; the producer supplies the code together with a formal proof of that obligation. On receipt, the consumer computes the obligation from the code actually received, checks the supplied proof against it with its proof validator, and admits the code only if validation succeeds. The producer may use expensive compilers or provers that the consumer need not trust. The conclusion is precisely scoped: the checked executable satisfies the stated policy, given the soundness and calling assumptions of the consumer's semantics, obligation generator and validator. It is not blanket security or authorship authentication; if the code or certificate is altered before admission, validation either fails or certifies the altered program, while modifications after validation fall outside the one-time check.

Scope of Application

Necula and Lee's original prototype certified native packet filters that run inside an operating-system kernel. Its policy restricted reads and writes, branch direction and preserved registers under a valid kernel calling precondition; validation happened at admission rather than at each filter operation.[5] Their later mobile-agent experiment applied the same architecture to agents accessing an airfare database, with record-access levels and instruction/network resource bounds. This was an experiment, not a production-deployment claim.[6][4]

PCC does not replace every runtime check or authenticate a sender. It also is not the same as ordinary local formal verification, bytecode verification or signed code: the distinctive event is a producer-shipped proof checked against the consumer's own predicate for its received executable.[3][4]

Clarity

Ask what code the receiver will execute, what policy it requires, how that code generates an obligation, and whether the accompanying proof discharges that obligation. A proof about a source file or some earlier binary is insufficient unless it is soundly tied to the actual executable. “Tamperproof” here means only that the checked received bundle must prove the stated policy, conditional on sound machinery and no post-check change; it is not ongoing integrity monitoring.[2][3]

Manages Complexity

PCC shifts proof search to the code supplier and leaves the receiving host with a bounded validation task. That can make sense for frequently run kernel filters: a one-time check can justify omitting selected repeated safety checks. The price moves into formal policy design, program semantics, proof production, certificate size and the trusted validation machinery; a tiny checker is an engineering aim, not an unconditional property of every PCC design.[5][4][7]

Abstract Reasoning

Classify a proposed system by tracing consumer policy → exact received code → derived predicate → attached derivation → consumer verdict. If any binding is missing, the claimed assurance does not follow. For an altered binary, the consumer recomputes the predicate: it rejects if the certificate no longer proves it, but may admit a changed program that still comes with a valid proof. This separates policy compliance from code provenance and load-time admission from later integrity.[3]

Knowledge Transfer

The packet-filter and airfare-agent cases share the proof-transfer and consumer-admission structure while proving unlike properties: memory/control restrictions in one, database access and resource bounds in the other. PCC is proposed as a strict subtype of live Formal Verification, which need not deliver a certificate across an untrusted code boundary. A generic evidence-carrying admission skeleton outside executable software is a future-prime question, not this named computing method.[5][6]

Relationships to Other Abstractions

Local relationship map for Proof-Carrying CodeParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Proof-Carrying CodeDOMAINDomain-specific abstraction: Formal Verification — is a kind ofFormalVerificationDOMAIN

Current abstraction Proof-Carrying Code Domain-specific

Parents (1) — outgoing typed relations

  • Proof-Carrying Code is a kind of Formal Verification Domain-specific

    PCC specializes formal verification to a producer-supplied proof checked by a distrustful code consumer before execution.

Hierarchy paths (5) — routes to 3 parentless roots

Neighborhood in Abstraction Space

Proof-Carrying Code sits in a moderately populated region (52nd percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Network Security Vulnerabilities & Trust (32 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] George C. Necula and Peter Lee, “Safe Kernel Extensions Without Run-Time Checking,” OSDI (1996), “Proof-Carrying Code” section. https://www.usenix.org/legacy/publications/library/proceedings/osdi96/full_papers/necula/html/node2.html . registry ↩

[2] Necula and Lee, “Safe Kernel Extensions Without Run-Time Checking,” “Defining a Safety Policy.” https://www.usenix.org/legacy/publications/library/proceedings/osdi96/full_papers/necula/html/node3.html . registry ↩a ↩b

[3] Necula and Lee, “Safe Kernel Extensions Without Run-Time Checking,” “Validating the Safety Proofs.” https://www.usenix.org/legacy/publications/library/proceedings/osdi96/full_papers/necula/html/node10.html . registry ↩a ↩b ↩c ↩d ↩e

[4] George C. Necula, original “Proof-Carrying Code” research-project account, especially Overview and Experiments §5. https://people.eecs.berkeley.edu/~necula/pcc.html . registry ↩a ↩b ↩c ↩d

[5] Necula and Lee, “Safe Kernel Extensions Without Run-Time Checking,” “Application: Network Packet Filters.” https://www.usenix.org/legacy/publications/library/proceedings/osdi96/full_papers/necula/html/node11.html . registry ↩a ↩b ↩c

[6] George C. Necula and Peter Lee, “Safe, Untrusted Agents Using Proof-Carrying Code,” in Mobile Agents and Security, LNCS 1419 (1998). https://doi.org/10.1007/3-540-68671-1_5 . registry ↩a ↩b

[7] George C. Necula and Robert R. Schneck, “Proof-Carrying Code with Untrusted Proof Rules” (2002), author companion abstract. https://people.eecs.berkeley.edu/~necula/ISSS02/ . registry ↩