Skip to content

Accelerate odd-degree polynomial square-root recovery - #184

Merged
odraccir1 merged 2 commits into
masterfrom
ra/square_root_recovery
Oct 25, 2026
Merged

odraccir1 merged 2 commits into
masterfrom
ra/square_root_recovery

Conversation

@odraccir1

@odraccir1 odraccir1 commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Replace Tonelli–Shanks in odd-degree polynomial X-norm recovery with a direct norm/Frobenius construction. This avoids searching for a quadratic nonresidue and computing modular powers with exponents that grow with the factor degree.

The implementation adds a reusable Frobenius-product helper using binary doubling and shared composition caches. For BN254 Fp12, seed construction uses one characteristic-sized exponentiation and coefficient Frobenius maps instead of a full coefficient-field exponentiation.

Even-degree recovery retains the existing algorithm. Higher odd degrees also retain the fallback when modular composition is disabled; linear factors use coefficient-field square roots. The new path consumes no coefficient-generator samples. Existing reconstruction and exact norm-identity checks remain in place.

Completed recovery of real degree-153, 259, and 707 factors in approximately 1.59 s, 3.76 s, and 16.44 s.

On the saved cubic fixture, recorded clean-build median recovery time decreased from 2.74 s to 42.9 ms, approximately 64×. This is a fixture-specific measurement, not a general speedup claim.

@odraccir1 odraccir1 changed the title Odd degree square root recovery Accelerate odd-degree polynomial square-root recovery Oct 25, 2026
@odraccir1
odraccir1 requested a review from spaceships October 25, 2026 04:35
@odraccir1
odraccir1 merged commit 84be94b into master Oct 25, 2026
2 checks passed
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