Skip to content

Add support for bw6-767#48

Open
seunlanlege wants to merge 17 commits intoparitytech:mainfrom
polytope-labs:seun/bw6-767
Open

Add support for bw6-767#48
seunlanlege wants to merge 17 commits intoparitytech:mainfrom
polytope-labs:seun/bw6-767

Conversation

@seunlanlege
Copy link
Copy Markdown

Builds on the work previously started here #47

Summary

  • Generic curve infrastructure: Refactor the entire codebase (keyset, prover, verifier, setup, BLS, transcript, endomorphism, PIOP) to be generic over curve types and PCS, replacing the hardcoded BLS12-377/BW6-761 pairing. Introduces an instances module with concrete configurations for both BLS12-377/BW6-761 and BLS12-381/BW6-767.
  • Smooth-domain FFT for low two-adicity fields: Implement SmoothSubgroupDomain for fields like BW6-767 Fr (TWO_ADICITY=1), using Good-Thomas + Rader's and Cooley-Tukey + Rader's mixed-radix FFT strategies. Domain size 1034 (2×11×47) for BW6-767.
  • Generic evaluation domain: Thread D: EvaluationDomain<F> through all core structs so both Radix2 (BW6-761) and SmoothSubgroup (BW6-767) domains work transparently.
  • Fix non-power-of-2 domain assumptions: Fork fflonk to remove TWO_ADICITY check in KZG SRS generation, ensure 2x/4x domains are proper multiples of base domain size, and remove power-of-2 assumptions in PIOP (rotate_left, vanishing poly eval, last-point indexing).
  • Generalize bitmask packing: compute_block_size() finds the largest divisor of domain size that fits in the field bit capacity, replacing the hardcoded 256-bit block size.
  • Optimize Rader's FFT: Performance improvements to the Rader's algorithm implementation.
  • Migrate to arkworks 0.5 and fflonk 0.0.3

Results

BW6-767 APK proof: 773 bytes, keyset size 1033, domain size 1034.

Testing

  • cargo test passes for existing BW6-761 tests
  • bw6_767_apk integration test passes
  • Bitmask packing test verifies BW6-767 block=94, 11 chunks
  • Endomorphism constants verified via compute_endo test

k-gunjan and others added 17 commits July 18, 2025 19:30
SmoothSubgroupDomain for fields with low two-adicity
(BW6-767 Fr has TWO_ADICITY=1), using Good-Thomas + Rader's
and Cooley-Tukey + Rader's mixed-radix FFT strategies.

- domain type is now generic (D: EvaluationDomain<F>) throughout
  piop, utils, transcript modules
- domain size 1034 (2×11×47) for BW6-767
- BW6-767 GLV endomorphism constants
- parallelized with rayon
Thread D: EvaluationDomain<F> through all core structs so
both Radix2 (BW6-761) and SmoothSubgroup (BW6-767) domains
work transparently.
Three issues fixed:
1. fork fflonk to remove TWO_ADICITY check in KZG SRS generation
2. find_multiple_domain ensures 2x/4x domains are proper multiples
   of base domain size
3. remove power-of-2 assumptions in PIOP (rotate_left, vanishing
   poly eval, last-point indexing)

BW6-767 APK proof: 773 bytes, keyset 1033, domain 1034.
compute_block_size() finds the largest divisor of domain_size
that fits in the field bit capacity, replacing hardcoded 256.
Adds packed scheme test for BW6-767 (block=94, 11 chunks).
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