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

Big optmizations to ecAdd, ecMul and ecPairing and small refactor #328

Draft
wants to merge 12 commits into
base: develop-feijoa
Choose a base branch
from

Conversation

hecmas
Copy link
Contributor

@hecmas hecmas commented Feb 5, 2024

This PR contains the following significative optimizations:

  • ecMul.zkasm calls to ecAdd.zkasm now to avoid unnecessary checks.
  • Added a new file doublePointBN254.zkasm to perform doublings.
  • ecMul.zkasm now does not use any binary to perform the scalar k reconstruction.
  • A new file bitwiseReconstruction.zkasm has been added to allow "fill in" the missing bits of a particular $256$-bit number.
  • Some files renaming, to be more consistent with the theory; e.g., instead of scalarMulBN254, we now use scalarMulFP2BN254 to put emphasy on the underlying finite field.
  • All scalar reconstructions have been optimized with the slogan: "focus on verifying, not computing".
  • Minor optimizations and reorganizations of the code.
  • A new function has been added to perform point scalar multiplication by $6 x^2$ directly, where $x$ is the BN254 generator parameter.
  • Added explicit counters for ecAdd, ecMul and ecPairing.

@hecmas hecmas self-assigned this Feb 5, 2024
@cla-bot cla-bot bot added the cla-signed label Feb 5, 2024
@hecmas hecmas changed the title Big optmizations to ecPairing and small refactor Big optmizations to ecAdd, ecMul and ecPairing and small refactor Feb 5, 2024
@hecmas hecmas changed the base branch from develop-feijoa to feature/precompiled-optz February 5, 2024 19:03
@hecmas hecmas changed the base branch from feature/precompiled-optz to develop-feijoa February 5, 2024 19:05
@hecmas hecmas changed the base branch from develop-feijoa to develop February 6, 2024 17:06
@hecmas hecmas changed the base branch from develop to develop-feijoa February 6, 2024 17:06
@krlosMata krlosMata marked this pull request as draft February 7, 2024 13:52
@hecmas hecmas added this to the fork-feijoa milestone Feb 22, 2024
@hecmas hecmas marked this pull request as ready for review February 22, 2024 08:39
Copy link

sonarcloud bot commented Feb 22, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@hecmas hecmas requested a review from zkronos73 as a code owner March 7, 2024 12:08
@krlosMata krlosMata marked this pull request as draft March 22, 2024 15:42
Copy link

sonarcloud bot commented May 30, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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

Successfully merging this pull request may close these issues.

3 participants