Skip to content

Conversation

@therealyingtong
Copy link
Collaborator

p_poly is constructed as a linear combination of q_prime and the q_polys in steps 18 and 19 of the protocol description. Previously, the expression used in the protocol description did not match the implementation:

  • let (p_poly, p_poly_blind) = q_polys.into_iter().zip(q_blinds.into_iter()).fold(
    (q_prime_poly, q_prime_blind),
    |(q_prime_poly, q_prime_blind), (poly, blind)| {
    (
    q_prime_poly * *x_4 + &poly.unwrap(),
    Blind((q_prime_blind.0 * &(*x_4)) + &blind.0),
    )
    },
    );
  • // Compute the final commitment that has to be opened
    msm.append_term(C::Scalar::ONE, q_prime_commitment);
    let (msm, v) = q_commitments.into_iter().zip(u.iter()).fold(
    (msm, msm_eval),
    |(mut msm, msm_eval), ((q_commitment, _), q_eval)| {
    msm.scale(*x_4);
    msm.add_msm(&q_commitment);
    (msm, msm_eval * &(*x_4) + q_eval)
    },
    );

p_poly is constructed as a linear combination of q_prime and the
q_polys in steps 18 and 19 of the protocol description.
@therealyingtong therealyingtong changed the title Update p_poly in protocol to match implementation Fix p_poly in protocol to match implementation May 21, 2023
@therealyingtong therealyingtong changed the title Fix p_poly in protocol to match implementation [book] Fix p_poly in protocol to match implementation May 21, 2023
@therealyingtong therealyingtong added A-documentation Area: Improvements or additions to documentation A-book Area: The Halo 2 book labels May 21, 2023
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

ACK with non-blocking suggestion; doc-only.

therealyingtong and others added 2 commits May 22, 2023 19:51
Co-authored-by: Daira Hopwood <[email protected]>
Co-authored-by: str4d <[email protected]>
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

ACK, this change looks correct. (I have not fully reviewed the protocol.) Doc-only.

@therealyingtong therealyingtong changed the title [book] Fix p_poly in protocol to match implementation [book] Fix p_poly to match implementation; specify synthetic blinding factor f construction May 27, 2023
@therealyingtong therealyingtong requested a review from daira June 2, 2023 14:47
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

ACK with nonblocking suggestions.

@therealyingtong therealyingtong requested a review from daira June 6, 2023 05:36
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

ACK with suggestions.

* Starting at $i=0$ and ending at $n_a - 1$ $\prover$ sets $q_{\sigma(i)} := x_1 q_{\sigma(i)} + a'(X)$.
12. $\prover$ initializes $q_0(X), q_1(X), ..., q_{n_q - 1}(X) = 0$ and blinding factors $q^*_0, q^*_1, ..., q^*_{n_q-1} = 0$.
* Starting at $i=0$ and ending at $n_a - 1$ $\prover$ sets $q_{\sigma(i)} := x_1 q_{\sigma(i)} + a'(X)$ and $q^*_{\sigma(i)} := x_1 q^*_{\sigma(i)} + a^*_i$.
* $\prover$ finally sets $q_0(X) := x_1^2 q_0(X) + x_1 h'(X) + r(X)$.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
* $\prover$ finally sets $q_0(X) := x_1^2 q_0(X) + x_1 h'(X) + r(X)$.
* $\prover$ finally sets $q_0(X) := x_1^2 q_0(X) + x_1 h'(X) + r(X)$ and $q^*_0 := x_1^2 q^*_0 + x_1 h'^* + r^*$.

* $\prover$ sends a hiding commitment $A_j = \innerprod{\mathbf{a'}}{\mathbf{G}} + [a^*_j] W$ where $\mathbf{a'}$ are the coefficients of the univariate polynomial $a'_j(X)$ and $a^*_j$ is some random, independently sampled blinding factor. (Similar notation is used throughout this protocol description, if the value is not reused we will use $\cdot$ to simplify exposition.)
* $\verifier$ responds with a challenge $c_j$.
2. $\prover$ sets $g'(X) = g(X, c_0, c_1, ..., c_{n_a - 1}, \cdots)$.
3. $\prover$ sends a commitment $R = \innerprod{\mathbf{r}}{\mathbf{G}} + [\cdot] W$ where $\mathbf{r} \in \field^n$ are the coefficients of a randomly sampled univariate polynomial $r(X)$ of degree $n - 1$.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
3. $\prover$ sends a commitment $R = \innerprod{\mathbf{r}}{\mathbf{G}} + [\cdot] W$ where $\mathbf{r} \in \field^n$ are the coefficients of a randomly sampled univariate polynomial $r(X)$ of degree $n - 1$.
3. $\prover$ sends a commitment $R = \innerprod{\mathbf{r}}{\mathbf{G}} + [r^*] W$ where $\mathbf{r} \in \field^n$ are the coefficients of a randomly sampled univariate polynomial $r(X)$ of degree $n - 1$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-book Area: The Halo 2 book A-documentation Area: Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants