Skip to content

feat(curves): add hinted is_on_curve check#156

Merged
lucidLuckylee merged 1 commit intoBitVM:mainfrom
alpenlabs:feat/hinted_is_on_curve
Jan 2, 2025
Merged

feat(curves): add hinted is_on_curve check#156
lucidLuckylee merged 1 commit intoBitVM:mainfrom
alpenlabs:feat/hinted_is_on_curve

Conversation

@manishbista28
Copy link
Copy Markdown
Contributor

The G1 and G2 elements of groth16 proof need to be validated to be points on the curve. This PR requests adding hinted version of these scripts.

While non-hinted version of each of these were already present, this version is helpful because of the reduction in script size. For example, test_hinted_g2_affine_is_on_curve uses around 467K script size, while test_g2_affine_is_on_curve uses around 992K.

Unit tests added for each.

@manishbista28
Copy link
Copy Markdown
Contributor Author

this check is only necessary at the beginning of the pairing algorithm.
G1 and G2 points should be validated to not be point at inf and are points on curve.
current chunker impl doesn't seem to use it.

@manishbista28
Copy link
Copy Markdown
Contributor Author

i'd suggest merging this as well.
chunker impl can get to it after higher priority bugs are dealt with.

@lucidLuckylee lucidLuckylee merged commit 1c9bef8 into BitVM:main Jan 2, 2025
lucidLuckylee pushed a commit that referenced this pull request Jan 6, 2025
@manishbista28 manishbista28 deleted the feat/hinted_is_on_curve branch February 23, 2025 11:05
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.

2 participants