feat(fields): add fast KoalaBear/BabyBear arithmetic#258
Conversation
🤖 PR SummaryThis pull request implements native 32-bit Montgomery arithmetic for the KoalaBear and BabyBear prime fields, replacing self-contained implementations with a shared, verified Montgomery reduction pipeline. The changes span new modules for radix-generic and 32-bit-word-level reduction, field typeclasses and fast field carriers, facade refactors for both fields, simplification of the Statistics
Lean Declarations ✏️ Removed: 150 declaration(s)
✏️ Added: 129 declaration(s)
✏️ Affected: 2 declaration(s) (line number changed)
📋 **Additional Analysis**The diff introduces a refactoring of the fast field implementations for BabyBear and KoalaBear into a shared Montgomery framework. Overall, the changes are consistent with the project's style and guidelines. The most notable deviation is a systematic violation of the 100-character line limit in several Line length violations (
(Note: Markdown files and CI configuration are exempt from this rule per the guidelines.) Naming conventions – All new names follow the required Module layout – The refactoring correctly places shared Montgomery infrastructure in a separate Documentation – Every top-level definition and theorem in the new files has a docstring. The Other guidelines – The diff uses 📄 **Per-File Summaries**
The file provides:
No
Last updated: 2026-07-15 12:55 UTC. |
Simplify 32-bit Montgomery fields
No description provided.