Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Barrett Reduction Techniques in Metal #7

Open
moven0831 opened this issue Oct 25, 2024 · 0 comments
Open

Implement Barrett Reduction Techniques in Metal #7

moven0831 opened this issue Oct 25, 2024 · 0 comments
Assignees

Comments

@moven0831
Copy link
Collaborator

Problem

Efficient modular reduction is essential for converting point coordinates into Montgomery form. The current implementation does not use the Montgomery form in Metal, resulting in unnecessary computational overhead.

Details

Integrate efficient Barrett reduction methods within Metal shaders to facilitate the conversion of point coordinates into Montgomery form. Evaluate both "vanilla" Barrett reduction and Barrett-Domb reduction to determine the most performant approach on iOS devices.

Acceptance criteria

  • Implement "vanilla" Barrett reduction based on Project Nayuki's algorithm within Metal.
  • Implement Barrett-Domb reduction as an alternative method.
  • Conduct benchmarks to compare the performance of both methods on iOS devices.
  • Select and integrate the most efficient reduction technique into the MSM pipeline based on benchmark results.
  • Ensure comprehensive testing to validate the correctness of the reduction methods.

Reference

@moven0831 moven0831 self-assigned this Jan 5, 2025
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

No branches or pull requests

1 participant