Skip to content

Multi-pair assert pairing is one with previous GTEl - #1808

Open
shramee wants to merge 2 commits into
Consensys-Incorporated:masterfrom
mistcash:multi-miller-is-one
Open

Multi-pair assert pairing is one with previous GTEl#1808
shramee wants to merge 2 commits into
Consensys-Incorporated:masterfrom
mistcash:multi-miller-is-one

Conversation

@shramee

@shramee shramee commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Allow multiple pairs when asserting pairing is one with previous GTEl (target group element).

This adds AssertMultiMillerLoopAndFinalExpIsOne (notice Multi) functions following AssertMillerLoopAndFinalExpIsOne. Clean way to do this involves,

  1. Update millerLoopAndCheckFinalExpHint to support multiple pairs
  2. Update base millerLoopAndFinalExpResult to use multiple pairs
  3. Current public AssertMillerLoopAndFinalExpIsOne calls millerLoopAndFinalExpResult with P and Q as slices, public API signature has no changes.
  4. New AssertMultiMillerLoopAndFinalExpIsOne exposing multi pair signature.

Description

Allow multiple pairs when checking pairings are 1 with previous result. Currently this is only supported for one pair.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

  • sw_bn254.TestMultiMillerLoopAndFinalExpIsOneTestSolve
  • sw_bls12381.TestMultiMillerLoopAndFinalExpIsOneTestSolve

How has this been benchmarked?

  • No specific benchmarks for this.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • na 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
  • na Any dependent changes have been merged and published in downstream modules

Note

Cursor Bugbot is generating a summary for commit 5d24724. Configure here.

@shramee
shramee force-pushed the multi-miller-is-one branch 2 times, most recently from ce60923 to 6d21947 Compare August 13, 2026 20:42
@shramee shramee changed the title feat(sw_bn254): multi-pairing with previous fq12 is one Multi-pair assert pairing is one with previous GTEl Aug 13, 2026
* millerLoopAndCheckFinalExpHint multiple points
* millerLoopAndFinalExpResult takes P and Q slices
* new `AssertMultiMillerLoopAndFinalExpIsOne` for multiple point pairs
* test: bn254 multi pairing with prev check
@shramee
shramee force-pushed the multi-miller-is-one branch from 4708e6f to 5d24724 Compare August 20, 2026 11:02
@shramee
shramee marked this pull request as ready for review August 20, 2026 11:10
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.

1 participant