-
Notifications
You must be signed in to change notification settings - Fork 26
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
[fix] modular setup macro padding #1252
Conversation
Commit: f0502f0 |
} | ||
|
||
// The largest power of two so that at most 10% of all space is wasted | ||
let block_size = 1usize << ((limbs - 1) ^ (limbs + limbs / 9)).ilog2(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am not sure if i understand this correctly, but since the limbs is either 32 or 48, i just make the block 32 or 16 for them (like the memory read block). lmk if this doesn't work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok for now, but maybe at some point we need to do something to the adapters or at least to how many limbs we are using exactly in the operations
Yes will revisit. @manh9203 can help track this issue. |
Currently, if the modulus has 40 bytes, the blocksize is 8 and final number of limbs is still 40.
But we can't really do 40, as the adapter is either 32 or 48. Change the macro to match that logic