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

Add checks that field elements are canonical #20

Merged
merged 6 commits into from
Dec 13, 2022
Merged

Add checks that field elements are canonical #20

merged 6 commits into from
Dec 13, 2022

Conversation

xrchz
Copy link
Contributor

@xrchz xrchz commented Dec 2, 2022

Addresses #11

@kevaundray
Copy link
Contributor

Hmm bindings are failing here, might need to ping the respective code owners about making sure the blobs are actually canonical and not just random bytes

@StefanBratanov
Copy link
Contributor

Hmm bindings are failing here, might need to ping the respective code owners about making sure the blobs are actually canonical and not just random bytes

Once this PR is rebased, I can work on fixing the java bindings. Think only the pointEvaluation test needs fixing. All random blobs are canonical in the java tests after the last PR.

We ensure we are below the modulus by just using a zero final byte for
each field element encoding.

In the test, I do not understand why changing the final (zero) byte
causes verification to succeed instead of failing. But this is why the
change is now to the first byte.
@xrchz xrchz marked this pull request as ready for review December 12, 2022 20:10
@xrchz xrchz merged commit c0e5adf into main Dec 13, 2022
@xrchz xrchz deleted the check_encodings branch December 13, 2022 07:34
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

5 participants