Skip to content

Conversation

@swasilyev
Copy link
Contributor

To check that the signer belongs to the ring we:

  1. compute pk1 = sk.G
  2. witness the index of the signer k=(0,...,0,1,0,...,0) and compute pk2 = <k, pks>
  3. check the equality between pk1 == pk2

@swasilyev swasilyev requested review from davxy and drskalman March 1, 2025 20:23
@swasilyev
Copy link
Contributor Author

atm to make it pass the test, set https://github.com/w3f/ring-proof/blob/9dc7c15b17ef12bdd79c716b6d652034516deef4/w3f-plonk-common/src/verifier.rs#L77 to

    let lin_comm = CS::C::combine(&challenges.alphas[2..10], &lin_pices);

@swasilyev
Copy link
Contributor Author

swasilyev commented Mar 1, 2025

TODO:

let (out_x_coeff, out_y_coeff) = self.out_from_in.acc_coeffs_2();
let out_from_in_c2_lin = out_x.mul(out_x_coeff) + out_y.mul(out_y_coeff);

let pk_from_index_x = &self.witness_columns_committed.pk_from_index[0];
Copy link
Contributor Author

@swasilyev swasilyev Mar 1, 2025

Choose a reason for hiding this comment

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

todo: internalize this logic inside the gadget. Same for ec_add.

@swasilyev swasilyev marked this pull request as ready for review March 19, 2025 22:14
@swasilyev swasilyev changed the base branch from skalman--ring-vrf-snark to master March 19, 2025 22:15
@swasilyev
Copy link
Contributor Author

swasilyev commented Mar 20, 2025

@drskalman I think now it's fully constrained.

  • pk_index is boolean and the bits of pk_index[0..domain.capacity - 1] sum to 1. pk_index[domain.capacity - 1] doesn't participate in the ec add gadget.
  • sk is just boolean. I assume that computing PK = b0.G + b1.(2G) + ... + bn.(2^nG) is not less hard for any n than a dlog.
    @AlistairStewart? (he says that's ok)

@swasilyev swasilyev merged commit 7700526 into master Apr 7, 2025
5 checks passed
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.

1 participant