Arijit Dutta
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
1
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Notes on Plonk Prover's and Verifier's algorithm This is a brief note about my understanding of the prover's and verifier's algorithms in the [Plonk](https://https://eprint.iacr.org/2019/953.pdf) paper. The note directly jumps to Section 8.4 of the paper and tries to answer some questions which I had while going through the various steps of the algorithms. I would like to acknowledge the help and clarifications I got from Zac, Ariel, and Suyash in writing this note. The goal of the prover is described in the language $R_{\text{snark}}(\lambda)$ given in Section 8.3 of the paper. In the polynomial setting, this boils down to proving knowledge of the wire polynomials $a(X), b(X)$, $c(X)$, and the permutation polynomial $z(X)$ such that, 1. $a(X)b(X)q_M(X) + a(X)q_{L} (X) + b(X)q_R (X) + c(X)q_O (X) + PI(X) + q_C (X) = 0$ holds for all $X \in H$, where $H$ is the set containing the roots of unity. 2. $(a(X) + βX + γ)(b(X) + βk_1 X + γ)(c(X) + βk_2 X + γ)z(X) - \\ (a(X) + βS_{σ1}(X) + γ)(b(X) + βS_{σ2}(X) + γ)(c(X) + βS_{σ3}(X) + γ)z(Xω) = 0$ holds for all $X \in H$. 3. $(z(X) − 1) L_1 (X)=0$ holds for all $X \in H$. As explained in the paper, the first condition will validate the gate contraints (the witnesses satisfy the plonk circuit) and the second and third conditions will validate the copy constraints (all the connections of the plonk circuit are verified by the grand product argument). However, the prover should prove that the above conditions hold in zero-knowledge i.e. without revealing the polynomials $a(X), b(X)$,$c(X)$, and $z(X)$. To do so the prover proceeds as follows. ### Round 1: The prover constructs the polynomials $a(X),b(X)$, and $c(X)$ with some randomizations. Then it computes the commitments of $a(X),b(X)$, and $c(X)$ as per the Kate's polynomial commitment scheme. Here the commitment ${[k]}_1$ to a polynomial $k(X)=\sum_i{k_iX^i}$ is defined as the evaluation of the polynomial at the unknown SRS point $x$ in the exponent of the generator $G_1$ of the first group i.e., \begin{align} {[k]}_1 = (\sum_i{k_ix^i})G_1. \end{align} Note: The random parts of $a(X),b(X)$, and $c(X)$ are, $$ b_1X+b_2, b_3X+b_4, b_5X+b_6, $$ respectively. Note that they have zero contributions when the polynomials are evaluated at the roots of unity. This is due to the multiplication with the vanishing polynomial $Z_H(X) = X^n - 1$ which has all $n$ roots of unity as its roots. Q: Why do we need two random scalars to randomize $a(X),b(X)$ and $c(X)$. A: The prover needs to send the commitments to $a(X),b(X)$, and $c(X)$ and also their evaluations at $\mathfrak{z}$ to the verifier. Roughly, the two revelations costs two random scalars for the protocol to satisfy the special honest-verifier zero-knowledge (SHVZK) property. ### Round 2: Like the wire polynomials, the permutation polynomial $z(X)$ is computed by adding some randomization. In Section 5 (Polynomial protocols for identifying permutations), it is explained what should be the value of $z(X)$ for each roots of unity. Those values are set by using the Lagrange bases $L_i(X)$s. Q: Why do we need three random scalars to randomize $z(X)$. A: Unlike $a(X),b(X)$, and $c(X)$, the permutation polynomial $z(X)$ has been used to evaluate two opening proof polynomials $W_{\mathfrak{z}}(X)$ and $W_{\mathfrak{z}\omega}(X)$. This costs three random scalars to ensure the SHVZK property of the protocol. ### Round 3: Q: What is the quotient polynomial $t(X)$ and why it is computed? A: The quotient polynomial $t(X)$ has four elements. The numerators of the four elements are from the three conditions given above that the prover has to satisfy. Each of them are divided by $Z_H(X)$ and added after some random scaling by $\alpha$ and $\alpha^2$. The fact that the prover has successfully computed a "valid" commitment to $t(X)$ will ensure that $t(X)$ does not have any $a_iX^{-i}$ term. This is because the SRS used to compute the commitment does not have any $x^{-i}G_1$ term. This in turn proves that $Z_H(X)$ divides all the numerator i.e. the numerators evaluate to zero at every roots of unity. Hence the three conditions given above are satisfied. Instead of computing commitment to $t(X)$, the prover breaks $t(X)$ into three parts $t_{lo}(X)$, $t_{mid}(X)$, and $t_{hi}(X)$ and computes their commitments. This is done because of the folloing reasons. 1. We want the max degree of our polynomials to be n. 2. Kate opening proof $W_{\mathfrak{z}}(X)$ computation (in terms of $r(X)$) would require committing to size 3n polynomials which is very inefficient. ### Round 4: To prove the definition of $t(X)$, $a(X)$, $b(X)$, $c(X)$, $S_{\sigma1}(X)$, $S_{\sigma2}(X)$ are evaluated at a random challenge point $\mathfrak{z}$ which is generated non-interactively by Fiat-Shamir heuristic. Q: Why every polynomial in $t(X)$ is not evaluated? A: This is because of the linearization trick (described in page 18) where a partial evaluation of polynomials is done to prove an identity involving them. This is to reduce the communication cost of the prover. Q: Why $z(X)$ is evaluated at a different point $\mathfrak{z}\omega$? A: In $t(X)$, both $Z(X)$ and $Z(X\omega)$ appear. We do not evaluate $Z(X)$ to make use of the linearization trick and only evaluate $Z(X)$ at $\mathfrak{z}\omega$. As $Z(X)$ is opened in $\mathfrak{z}\omega$ instead of $\mathfrak{z}$, we need a separate opening polynomial $W_{\mathfrak{z}\omega}(X)$ for $Z(X)$ defined in Round 5. ### Round 5 Q: What is the linearization polynomial $r(X)$? A: To simplify, let \begin{align} & t(x) = t_{lo}(X) + X^nt_{mid}(X) + X^{2n}t_{hi}(X) = \frac{l(X)}{Z_H(X)}. \end{align} This implies, $r(X) = l(X)_{par} - Z_H(\mathfrak{z})(t_{lo}(X) + \mathfrak{z}^nt_{mid}(X) + \mathfrak{z}^{2n}t_{hi}(X))$ is zero if it is evaluated at $\mathfrak{z}$. Here $l(X)_{par}$ has a mixed form of polynomials and evaluations at $\mathfrak{z}$. Note that the verifier can calculate the commitment of $r(X)$ using the elements of the proof $\pi_{SNARK}$ generated so far i.e. $({[a]}_1, {[b]}_1, {[c]}_1, {[z]}_1,{[t_{lo}]}_1,{[t_{mid}]}_1,{[t_{hi}]}_1,\bar{a},\bar{b},\bar{c},\bar{s}_{\sigma1},\bar{s}_{\sigma2},\bar{z}_{\omega})$. Thus the prover does not have to send the commitment to $r(x)$ to prove that it vanishes at $\mathfrak{z}$. Now let us observe $W_{\mathfrak{z}}(X)$. Let, \begin{align} W_{\mathfrak{z}}(X) = \frac{M(X)}{X - \mathfrak{z}} \end{align} If the prover can compute the commitment to $W_{\mathfrak{z}}(X)$, then it is verified that $(X - \mathfrak{z})$ divides $M(X)$ (As the SRS does not have negetive exponents of $x$). Now consider each part of $M(X)$. As $v$ is random, $(X - \mathfrak{z})$ divides each term. $(X - \mathfrak{z})$ divides $r(X)$ implies $r(\mathfrak{z})=0$. Similarly $(X - \mathfrak{z})$ divides $(a(X)-\bar{a})$ implies $\bar{a}$ is the evaluation of $a(X)$ at $\mathfrak{z}$. >To show that if $(X - \mathfrak{z})$ divides $(a(X)-\bar{a})$, then $\bar{a} = a(\mathfrak{z})$. >We have $(a(X)-\bar{a})=q(X)(X - \mathfrak{z})$. Putting $x=\mathfrak{z}$, we get $\bar{a} = a(\mathfrak{z})$. > This applies for other polynomials and their evaluations as well. In this way the commitment to $W_{\mathfrak{z}}(X)$ verifies every evaluations of the polynomials and also $r(\mathfrak{z})=0$. As discussed above, we need a separate opening polynomial $W_{\mathfrak{z}\omega}(X)$ to validate the evaluation $\bar{z}_{\omega}$ of the polynomial $z(X)$ at $\mathfrak{z}\omega$. Finally, the prover outputs commitments ${[W_{\mathfrak{z}}]}_1$, ${[W_{\mathfrak{z}\omega}]}_1$ to these two opening polynomials and construct the proof $\pi_{\text{SNARK}}$. ## Verifier's algorithm: In steps 1 to 3, the verifier checks the sanity of different elements of $\pi_{\text{SNARK}}$. Steps 4 to 11 are the various steps that prepare the verifier for the pairing check. Let $W_{\mathfrak{z}}(X) = \frac{M(X)}{X - \mathfrak{z}}$ and $W_{\mathfrak{z}\omega}(X) = \frac{N(X)}{X - \mathfrak{z}\omega}$. After rearranging we get, \begin{align} XW_{\mathfrak{z}}(X) &= M(X) + \mathfrak{z} W_{\mathfrak{z}}(X) \\ XW_{\mathfrak{z}\omega}(X) &= N(X) + \mathfrak{z}\omega W_{\mathfrak{z}\omega}(X) \end{align} Combining these two identities with the multi-point evolution challenge $u$ gives, \begin{align} X(W_{\mathfrak{z}}(X)+uW_{\mathfrak{z}\omega}(X)) = \mathfrak{z}W_{\mathfrak{z}}(X) + u\mathfrak{z}\omega W_{\mathfrak{z}\omega}(X) + M(X)+uN(X) \end{align} Step 12 checks the above identity in the exponent using pairing and all the commitments and the evaluations of polynomials sent by the prover. Using the polynomial commitments, the unknown SRS value $x$ is used instead of the indeterminate $X$ and accumulated in $F$. The components involving constant terms and evaluations are accumulated in $E$. This is similar to the batch verification of the Kate commitment scheme described in Section 3 of the paper. This validates the opening commitments ${[W_{\mathfrak{z}}]}_1$, ${[W_{\mathfrak{z}\omega}]}_1$ and all the three statements to be proved by the prover are verified.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

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.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully