or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
One-Pager: Formal Verification of GROTH16 Zero-Knowledge Proof Scheme
Introduction
The formal verification of the GROTH16 zero-knowledge proof scheme is a central effort under the zkproof.org standardization workshop (stream, slides), endorsed by prominent researchers including Professor Shafi Goldwasser and Professor Dan Boneh. This initiative aims to ensure the reliability and security of cryptographic protocols widely used in blockchain applications.
This one-pager addresses critical questions and aspects that arise in this context, providing a detailed framework for understanding the scope, approach, challenges, and deliverables. Insights from experts in the field have been synthesized to guide this effort, ensuring it is both comprehensive and actionable.
Our motivation is end-to-end trust in deployed schemes
Summary: Verifying GROTH16 is a strategic starting point due to its simplicity and widespread use. The effort is motivated by the need to provide strong guarantees of correctness, which can enhance trust in the ecosystem. The Ethereum Foundation's interest in funding this effort underscores its importance.
Discussion:
Carla agreed with Matter Labs that verifying GROTH16 is a good starting point, given its simplicity and widespread use. Marco also highlighted that formal verification of GROTH16 is a good use case, providing strong guarantees of correctness. Denis emphasized the importance of motivating formal verification people to work on the effort, noting that the Ethereum Foundation's interest in funding this project underscores its significance.
We selected the Groth16 scheme, but still need to pick a variant
Summary: Given the multiple variants of GROTH16, the focus should be on the most popular and widely used implementations, such as those in Circom, Semaphore, TornadoCash, GNARK in ConsenSys, Worldcoin, Succinct SP1, and BNB. Starting with Plonk might also be considered due to its increasing usage. The goal is to select a variant that maximizes impact and community adoption.
Discussion:
Marcin noted that GROTH16 is used in various implementations like Circom and GNARK, but these differ from each other. He highlighted the importance of selecting the most popular variant to maximize impact. Carla mentioned that GROTH16 is the most "standard" and simplest to verify, making it a good starting point. Justin pointed out that there are multiple variants of GROTH16, suggesting the need for careful selection. Marcin also suggested considering Plonk due to its growing popularity.
The scope of the Verified Verifier is deep before we expand
Summary: The formal verification effort for the GROTH16 zero-knowledge proof scheme should encompass both Solidity and EVM implementations. The scope should include verifying the precompiles and elliptic curves used in the protocol. This comprehensive approach ensures that all critical components are covered, providing a robust verification framework.
Discussion:
Marcin raised the question of whether the formal verification should be done in Solidity or EVM, highlighting the importance of covering both implementations. He also emphasized the need to include precompiles and elliptic curves in the scope, as these are critical components of the protocol. Ben echoed the importance of defining the scope clearly, questioning whether the verified verifier should only focus on blockchain uses, given the broader applicability of the technology.
Full Verification encompases the paper, the protocol, the implementation
Summary: The formal verification process should begin with a high-level description of the proof system, capturing families of proof systems that include GROTH16. This approach allows for a reusable framework that can be instantiated for specific variants like GROTH16. The verification should cover both the correctness of the protocol and the precompiles, ensuring that the implementation aligns with the theoretical proofs.
Discussion:
Marcin discussed the need for a part that shows GROTH16 does the correct thing and another part that looks at the precompiles. He also mentioned the importance of connecting a proof of the paper to the implementation. Denis suggested capturing families of proof systems, including GROTH16, to create a reusable framework. This approach ensures that the verification effort is broad enough to be useful for other proof systems as well.
The process: build momentum then get commitment
Summary: The process should be well-organized, starting small and finishing fast to build momentum. It involves getting commitments from key stakeholders and experts, defining clear tasks, and setting up a structured approach. Public challenges and competitions can be used to engage the community and validate the verification efforts.
Discussion:
Carla suggested getting organized and committing to the effort, asking about the process for the formal verification. She preferred starting small and finishing fast to build momentum. Marco outlined a plan to work on the formal verification effort, emphasizing the need for a structured approach. Ben proposed a format for the effort, including tasks and a process for engaging the community through public challenges and competitions.
The tools dictate some of the challenges
Summary: Key challenges include the complexity of proving elliptic curves, ensuring the protocol holds water, and addressing the malleability of GROTH16. The verification process must also handle the compilation from circuit to constraints and ensure that the prover is correctly implemented. Collaboration with experts and leveraging tools like EasyCrypt can help mitigate these challenges.
Discussion:
Marcin mentioned that proving elliptic curves are correct is not easy, involving Rust and Golang. He also noted that it's not enough to have the verifier; the protocol must hold water, as it can forge proofs. Carla highlighted the malleability of GROTH16 and the need for changes to lock it down. Eli discussed the challenges of formal verification, including the need to be in touch with EasyCrypt people and spending a lot of time on simple math. Denis emphasized the need for a structured approach to address these challenges.
We should produce useful deliverables such as EVM elliptic curves proofs
Summary: The deliverables should include a formal proof of GROTH16 soundness, focusing on both the circuit and prover. Verification of elliptic curves in Geth and pairing verification as a precompile are critical components. The effort should also produce a verified verifier that is efficient and can be used by the community.
Discussion:
Marcin mentioned the formal proof of GROTH16 soundness, noting that it involves both the circuit and prover. He proposed formal verification of elliptic curves in Geth, as it gives the most value to the community. Carla highlighted the efficiency of the verifier, mentioning public input exponentiation and three terms. Marco outlined the deliverables, including writing polynomials for proof of GROTH16 proof itself. Denis provided a timeline and deliverables for the effort, while Ben asked how to appreciate complete, difficult, or incomplete formal verification efforts.
Thoughts on budget sources focus on the Ethereum ecosystem
Summary: The Ethereum Foundation has indicated a willingness to fund up to $20M for a general formal verification effort, which includes proving zkEVM correctness and formal semantics for RISC-V. A detailed budget should be prepared to outline the costs associated with the verification tasks, expert consultations, and community engagement activities.
Discussion:
Marcin noted that Ethereum wants to fund $20M to prove zkEVM correct and formal semantics for RISC-V. Denis mentioned the budget for the formal verification effort, emphasizing the need for a detailed budget to outline the costs associated with the tasks, consultations, and community engagement.
Create public challenges to mitigate risk of low participation
Summary: Risks include the potential for incomplete or incorrect formal verification and lack of participation or engagement. Mitigation strategies involve conducting the effort as a public activity, organizing challenges, and ensuring expert review. Incremental progress and clear milestones can help manage these risks.
Discussion:
Marcin expressed uncertainty about the interest in verifying the verifier, as it's hard to get the verifier wrong. Ben mentioned the risk of incomplete or incorrect formal verification and suggested mitigation strategies, including public challenges and expert review. He also highlighted the risk of lack of participation or engagement, emphasizing the need for incremental progress and clear milestones.
From families of proofs around Groth16 to other schemes
Summary: The effort should also consider the broader implications and lessons learned from the verification process. This includes understanding the complexities of formal verification, the need for a structured approach, and the potential for generalizing the results to other proof systems. Engaging with the community and leveraging existing resources and expertise will be crucial for the project's success.
Discussion:
Marcin explained that GROTH16 is simple, just passing points to a pre-compile, and gave GNARK as an example of a zkSNARK implementation. Carla mentioned her work on making GROTH16 simulation extractable and commit and proof extension for relaxed R1CS. Eli shared his experience with formal verification and mentioned a DSL for MPC programs. Marco discussed writing correct circuits and using a typical approach for verification. Denis emphasized the importance of capturing families of proof systems and suggested talking to experts in the field. Ben referenced ZPrize activities and mentioned the team involved in the effort.
Conclusion and Next Steps
To successfully verify the GROTH16 zero-knowledge proof scheme, the following concrete steps are recommended:
By following these steps, the formal verification of GROTH16 can provide strong guarantees of correctness, enhancing trust in cryptographic protocols and benefiting the broader blockchain ecosystem. This effort, blessed by leading researchers and supported by the Ethereum Foundation, aims to set a new standard in zero-knowledge proof verification.
ANNEX - Interviews on Formal Verification of a zkSNARK Verifier
MARCIN start
fv of verifiers
in solidity? / evm
groth16 on evm
what happens is simple
gnark is example
if evm has formal
scope
with evm
part that shows groth16 does the correct thing
part that looks at the precompiles
eth want fund 20M
formal proof of f16 soundness
not sure verif very interesting
not enough to have verif
the protocols are the dragon
connecting a proof of the paper to implementation
which g16 to pick
wheere do you stop the proving
g16 used
maybe first plonk?
proposal
MARCIN END
Carla START
Why do it
next
who are the people
whats the process
preference
worked on groth16
simulation extract
commit and proof extension
works on high level, not implementation
what could be a roadmap
verifier very efficient
other critical parts that could be attacked
proof of groth16 proof itself
Carla END
ELI START
took fv class
phd in mpc
good application
tool
early dec 24 @ bu
from experience
suspicion
dsl for mpc programs
ELI END
JUSTIN START
There's more than 1 Groth16
JUSTIN END
marco START
use-case
plan to work up
prob
work
deliverable
onchain
cpu version
people & companies
hacl*
fiatcrypto - http://adam.chlipala.net/
easycrypt
bas spitters
clients today
cpu
evm
who runs?
note on bn
MARCO END
tobias tu munich START
formalizing kzg
isabelle comments
good in isabelle / lean vs easycrypt
acaedmic recognition
TOBIAS END
DENIS START
Pitch to EF
Motivation
Challenges back & forth
Motivate FV ppl, it's a bar
Capture families
It's a waste
Ressources
Talk to
Tech description
Timeline and deliverables
Budget
Cautionary tale
Lots to learn
Denis END
Ben START
Verified Verifier
risk
mitigation
format
joker
how to appreciate complete / difficuly / incomplete
tasks
targets
team right now
refs
succeed. / fail
process
target time to ef
BEN END
Work document compiled by Jonathan Rouach, June 2024, for ZKProof.org