This repository introduces various ZK languages via a simple program, which is as similar as possible for each language.
The used program has the following characteristics:
- It has two inputs:
a
andb
. Of these,a
is a private input (if the language supports privacy) andb
is public - It has one public output, which is the multiple of
a
andb
.
The program, therefore, demonstrates how to write a ZK program where you can prove that you know a private a
so that a * b = c
.
ZK languages can usually be used at least as stand-alone. This means that proofs generated for ZK programs or for ZK-VM executions.
Some languages (or the ecosystems around them) support also ZK smart contracts (or zkApps). In this case, the same multiplication code is also expressed in a contract format, which typically differs from the stand-alone version.
Do note that especially the contract format evolves rapidly in all ecosystems. Anything written here may be outdated already the day after it's written.
Language | Stand-alone supported | Contracts supported | Privacy supported |
---|---|---|---|
Cairo | ✅ | ✅ | ❌ |
Circom | ✅ | ❌ | ✅ |
Compact | ❌ | ✅ | ✅ |
Leo | ✅ | ✅ | ✅ |
Lurk | ✅ | ❌ | ✅ |
Noir | ✅ | ✅ | ✅ |
Noname | ✅ | ❌ | ✅ |
o1js | ✅ | ✅ | ✅ |
Polylang | ✅ | ❌ | ❌ |
Powdr | ✅ | ❌ | ✅ |
Zirgen | ✅ | ❌ | ✅ |
ZoKrates | ✅ | ❌ | ✅ |
All folders under the root folder are based on the language's name. Under that, there is a README and a standalone
folder, which contains the stand-alone programs with that language.
If the language has smart contract capabilities, they are demonstrated in a contract
folder.
The languages folders have at least the following possible differences:
- Different technologies, so different required files and instructions
- Some languages generate proofs explicitly, some do things more in the background
- Some languages don't have local proving available at all, currently
- Some languages support privacy, while others don't
- Some languages require a trusted setup
- Some languages (or ecosystems around the language) support ZK smart contracts
Questions? Wanna see some language here? Other issues? Feel free to get in touch or just open an issue / PR here.