Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Setup Ceremony Math #2855

Merged
merged 10 commits into from
Jul 25, 2023
Merged

Document Setup Ceremony Math #2855

merged 10 commits into from
Jul 25, 2023

Conversation

cronokirby
Copy link
Contributor

@cronokirby cronokirby commented Jul 20, 2023

Fixes #2854.

This documents the mathy parts of the ceremony, in enough detail for us to get started on implementation.

Some undocumented aspects are touching on the coordination side of things, like how the transaction log should be organized. I think those might be better documented in situ (i.e. in the code), but we might want to backfill docs for that later.

Anyhow, I think this chunk is self-contained and worth getting out there.

@cronokirby cronokirby temporarily deployed to smoke-test July 20, 2023 15:03 — with GitHub Actions Inactive
@cronokirby cronokirby changed the title Create new section for Groth16 Setup Docs Document Setup Ceremony Math Jul 20, 2023
The intro page should be complete, and I don't expect to need more sections, at least for the current documentation push.
@cronokirby cronokirby temporarily deployed to smoke-test July 21, 2023 13:47 — with GitHub Actions Inactive
@cronokirby cronokirby temporarily deployed to smoke-test July 21, 2023 15:28 — with GitHub Actions Inactive
@cronokirby cronokirby temporarily deployed to smoke-test July 24, 2023 16:52 — with GitHub Actions Inactive
@cronokirby cronokirby marked this pull request as ready for review July 24, 2023 16:54
Copy link
Member

@redshiftzero redshiftzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great docs - a few minor comments inline, but LGTM!

We take the convention that lowercase letters (e.g. $x, a$)
are taken to be scalars in $\mathbb{F}$,
and uppercase letters (e.g. $X, A$) are taken to be elements
of $\mathbb{G}_1$, $\mathbb{G}_2$, or $\mathbb{G}_2$.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last one should be target group, i.e. $\mathbb{G}_2$ -> $\mathbb{G}_T$

- $\displaystyle B := [\beta]_2 + \sum_i z_i \cdot v_i([x]_2) + s \cdot [\delta]_2$
- $\displaystyle \hat{B} := [\beta]_1 + \sum_i z_i \cdot v_i([x]_1) + s \cdot [\delta]_1$

- $\displaystyle C := \sum_{i \geq s} z_i \cdot \left[\frac{1}{\delta} p_i^{\alpha, \beta}(x)\right]_1 + \frac{t(x)}{\delta}h([x]_1) + s \cdot A + r \cdot \hat{B} - rs\delta$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the term involving $t(x)$ on the RHS, should it be $t([x]_1)$ instead of $t(x)$?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it should be the way it is now: I'm stretching the notation here a bit, but the idea is that here "rho" would be t(x)/delta, seen as a constant.
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh gotcha, makes sense!

**Verification**

$$
V_{\text{DL}}(\text{ctx}, X, Y, \pi = (K, s)) := s \cdot G \overset{?}{=} K + H(\text{ctx}, (X, Y, K)) \cdot X
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a correct understanding that G = Y here?

&\quad k \xleftarrow{\$} \mathbb{F}\cr
&\quad K \gets k \cdot Y\cr
&\quad e \gets H(\text{ctx}, (X, Y, K))\cr
&\quad (K, k + e \cdot x)\cr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a step in the proving stage where we generate x and then compute X?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary. What you care about is the link between these two specific elements, and the proof here is sufficient to get knowledge extraction for x, which is the other property you want out of this for the security proof of the ceremony; if my understanding of snarky ceremonies is accurate.

- $\hat{x}^i \cdot [x^i]_1\quad (i \in [0, \ldots, 2d - 2])$
- $\hat{x}^i \cdot [x^i]_2\quad (i \in [0, \ldots, 2d - 2])$
- $\hat{\alpha}\hat{x}^i \cdot [\alpha x^i]_1\quad (i \in [0, \ldots, d - 1])$
- $\hat{\beta}\hat{x}^i \cdot [\beta x^i]_1\quad (i \in [0, \ldots, d - 1])$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't need to be in this PR but at some point we should document where we deviate from KMSV21 (e.g. when I was looking at this I was comparing with Fig. 6 in the paper)

@cronokirby cronokirby temporarily deployed to smoke-test July 25, 2023 16:02 — with GitHub Actions Inactive
@cronokirby cronokirby merged commit 3763b41 into main Jul 25, 2023
8 checks passed
@cronokirby cronokirby deleted the 2854-setup-ceremony-math branch July 25, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the Setup Ceremony Math
2 participants