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 Montgomery backend with 32 bits #538

Open
3 tasks
MauroToscano opened this issue Sep 4, 2023 · 6 comments
Open
3 tasks

Implement Montgomery backend with 32 bits #538

MauroToscano opened this issue Sep 4, 2023 · 6 comments

Comments

@MauroToscano
Copy link
Collaborator

MauroToscano commented Sep 4, 2023

Currently montgomery backend works with limbs of 64 bits. For really small fields, like babybear, it may be useful to have a 32 bits version. This version doesn't need to support multiple limbs, since it's use is limited to this field, but it may be useful to generalize it.

  • Implement a montgomery backend of 32 bits, with only one u32 as limb.
  • Add a fuzzer to compare both montgomery backends
  • Generalize it to be multi limb

We recommend just doing the first task, then generalizing

@RajeshRk18
Copy link

I can take up this!

@iammadab
Copy link

I can take up this!

@RajeshRk18 still working on this?

@RajeshRk18
Copy link

I can take up this!

@RajeshRk18 still working on this?

Yeah, wip

@skaunov
Copy link

skaunov commented Feb 24, 2024

👋 Could I take this one?

@RajeshRk18
Copy link

👋 Could I take this one?

It's almost done. Just need to add fuzzer.

@skaunov
Copy link

skaunov commented Feb 25, 2024

Am I correct that for generalizing over both word size the only way is to move const fn from impl blocks, as being generic instantly prevents them from working? So minimum boilerplating would be with a trait Word for generic and having macros for const fn (anyway they're associated) which would generate it for the type aliases... And is intricate to balance readibility/maintainability of such solution with wins from having u32 backend?

Just trying to understand this issue better. Sorry if miss/confused something. Would be nice to see correction of my comprehension of this one! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants