Skip to content

feat(bw6-761): Miller loop using direct sextic extension#608

Merged
yelhousni merged 2 commits intomasterfrom
bw6/direct-E6
Jan 16, 2025
Merged

feat(bw6-761): Miller loop using direct sextic extension#608
yelhousni merged 2 commits intomasterfrom
bw6/direct-E6

Conversation

@yelhousni
Copy link
Copy Markdown
Collaborator

Description

This corresponds to the gnark circuit and is needed to compute the same residueWitness in- and out-circuit for Consensys/gnark#1365.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Please describe the tests that you ran or implemented to verify your changes. Provide instructions so we can reproduce.

Added tests for the new E6D struct in internal/fptower/e6_direct_test.go and pairing computation using towered and direct extensions in pairing_test.go.

How has this been benchmarked?

MillerLoopDirect is much slower than MillerLoop but it is only used in the hint computation for the gnark circuit.

benchmark                 tower ns/op   direct ns/op     delta
BenchmarkMillerLoop-8     1195105       3922503       +228.21%

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yelhousni yelhousni added the dep: linea Issues affecting downstream Linea label Jan 16, 2025
@yelhousni yelhousni requested a review from ivokub January 16, 2025 02:06
@yelhousni yelhousni self-assigned this Jan 16, 2025
@yelhousni yelhousni added this to the v0.10.0 milestone Jan 16, 2025
Copy link
Copy Markdown
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

Small cosmetic comments, otherwise looks perfect. Didn't check fully the direct mulMontgomery equations, but as the tests check compatibility with fp2fp3 tower multiplication, then should be good.

Thanks!

@yelhousni yelhousni merged commit e7fd38b into master Jan 16, 2025
@yelhousni yelhousni deleted the bw6/direct-E6 branch January 16, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dep: linea Issues affecting downstream Linea

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants