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

Inversion tests #639

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

dvdplm
Copy link
Contributor

@dvdplm dvdplm commented Aug 5, 2024

As a follow-up to #606, this PR extends the set of tests for modular inversion.

@tarcieri
Copy link
Member

tarcieri commented Aug 6, 2024

It looks like the tests are breaking on 32-bit platforms because you're hardcoding the number of limbs

@dvdplm
Copy link
Contributor Author

dvdplm commented Aug 6, 2024

Ah, so that's what that was. 🤦

const MODULUS: [u8; 256] = hex!("5DC56576A9F077F2FD05CC35DD0B1060857CD5A44011891ED05D8C56359A9302FC9FB1D6B2FF411FAC318009C519FB7D883ACF327C2FC1181642B7A076C7DB244AB265D20605AA55EB04B5F5100B961A684033BD4E98A45DFD2AAD4B13625808FF3C947BC3712CE8D2A5688579F08B5B523B9C6EC3361535379620F49E94C85508A6E0D264A284E3F6B3C54447D5DB9A421D1FBE2A1F59FFF92D1D9F68985E51C316CA027B4E6D9AAEED0D9F41DF77CFF021BF8F7A2E55E1F2B80859C466686305671C615757BA9712513A92764F399B486723549976024BEFF7A9484C40F5E765904E3477E1B6849468D513C26997D2A9BD038511C98E48FAE3493EC6A7FE49");

#[cfg(feature = "rand_core")]
mod randomized_tests {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem somewhat similar to the existing proptests. Maybe it would be better to expand those to more sizes?

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

Successfully merging this pull request may close these issues.

2 participants