Section 7: ZkProver ZkASM & PIL

zkProver uses two novel languages: zero-knowledge assembly language (zkASM) and polynomial identity language (PIL). Both languages are designed to meet the specific needs of zkEVM and provide a foundation for wider adoption.

Zero-Knowledge Assembly Language (zkASM):

Zero-knowledge assembly (zkASM) is a low-level programming language designed for zero-knowledge proof systems, specifically for building and executing zero-knowledge state machines. In the context of zkEVM (Zero-Knowledge Ethereum Virtual Machine), zkASM is used to map high-level instructions to individual state machines that are responsible for performing calculations related to zero-knowledge proofs.

As an assembly language, zero-knowledge assembly (or zkASM) language is specifically designed to map instructions from zkProver's main state machine to other state machines. For state machines with firmware, zkASM is the interpreter for the firmware.

The prescribed assembly code is generated by the zkASM code using instructions in the main state machine to specify how a given SM executor must perform computations. The executor Executor strictly adheres to the logic and conventions of zkASM code, making calculation verification simple.

Polynomial Identity Language (PIL):

Polynomial Identity Language (PIL) is a language specially designed for zkProver. Its core idea is to use polynomials to express and verify calculations. In zkEVM, the state transitions of a state machine are usually expressed by polynomials, which means that the state transitions must satisfy specific polynomial identities.

The role of PIL in zkProver is crucial. It allows developers to write code for state machines, which are essentially collections of polynomial identities. These identities form the basis of the verifier code, which verifies that state machine execution follows predetermined polynomial rules. Therefore, the PIL code can be considered as the "DNA" of the verifier code, which defines the core logic of the verification process.

Both languages were designed with not only the needs of zkEVM in mind, but broader adoption prospects as well. Their flexibility and efficiency make them not only suitable for zkEVM, but may also be adopted by other systems that require zero-knowledge proofs.

Last updated