Feat: add purego ext 6 over koalabear and babybear fields#772
Open
Feat: add purego ext 6 over koalabear and babybear fields#772
Conversation
gbotrel
previously approved these changes
Dec 15, 2025
Collaborator
gbotrel
left a comment
There was a problem hiding this comment.
lgtm, just add goimports to your flow half of the files are modified / staticcheck doesn't pass because of this :)
9 tasks
|
Hello! I am curious, what is the current state of performance of the degree 6 extension for koala-bear (in particular vs degree 5 if you have any number), and which algorithm is the fastest on gnark? (is it Toom3?) Thanks in advance ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We might need extension 6 over koalabear instead of 4 for higher security. This PR implements purego ext 6 over koala/baby bears.
Type of change
How has this been tested?
Corresponding tests implemented in
e6_test.goHow has this been benchmarked?
Benchmarks in
e6_test.goChecklist:
golangci-lintdoes not output errors locallyNote
Adds pure-Go 𝔽r⁶ extensions (tower E6 and direct E6D) for babybear/koalabear, updates docs/generator, and renames non-residue ops in E2/E4 with full tests/benchmarks.
E6and directE6Dimplementations forbabybearandkoalabearwith ops:Add/Sub/Mul/Square/Inverse/Exp/BatchInvertE6/Div/Halve/ButterflyE6.e6.go(.tmpl),e6_direct.go(.tmpl), and tests in generator; enable ingenerate_extensions.MulByNonResidue→MulByQuadraticNonResidue; remove inverse variant and addMulByCubicNonResidue(where applicable).E4to useMulByQuadraticNonResidueinMul/Square/Inverse/norm; drop non-residue benchmarks.SetOnecomment clarified.extensions/doc.goto document extension-6 constructions and equivalences for babybear/koalabear; clarify goldilocks extension-2.goimportsstep to formatter; register new E6 files in extensions generator.E6/E6D; update E2/E4 tests to new method names and benches accordingly.Written by Cursor Bugbot for commit 3df636f. This will update automatically on new commits. Configure here.