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

chore: Validate Recursive Elements are on the Curve. #194

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

suyash67
Copy link
Contributor

@suyash67 suyash67 commented Mar 2, 2023

Description

We don't check if the points $P_0, P_1$ from either the previous output or public inputs of the current proof are on the curve in the recursive verifier circuit. This makes debugging the recursive verifier circuit very difficult if any of the recursive proof elements are incorrect/corrupted. This PR adds a simple check to inform the developer if the recursive proof elements are not on the curve.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • There are no circuit changes, OR specifications in /markdown/specs have been updated.
  • There are no circuit changes, OR a cryptographer has been assigned for review.
  • I've updated any terraform that needs updating (e.g. environment variables) for deployment.
  • The branch has been rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.
  • New functions, classes, etc. have been documented according to the doxygen comment format. Classes and structs must have @brief describing the intended functionality.
  • If existing code has been modified, such documentation has been added or updated.

{
typename Curve::Composer* ctx = element_.get_context();
if (!element_.get_value().on_curve()) {
std::cerr << label << " not on curve!" << std::endl;
Copy link
Contributor

@Rumata888 Rumata888 Mar 2, 2023

Choose a reason for hiding this comment

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

Please don't use standard outputs, they break wasm communication

@kevaundray kevaundray changed the title Validate Recursive Elements are on the Curve. chore: Validate Recursive Elements are on the Curve. Jun 12, 2023
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.

None yet

2 participants