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

Modexp revision #341

Merged
merged 17 commits into from
Mar 26, 2024
Merged

Modexp revision #341

merged 17 commits into from
Mar 26, 2024

Conversation

hecmas
Copy link
Contributor

@hecmas hecmas commented Feb 12, 2024

This PR introduces several corrections and optimizations to the modexp folder:

  • Array capacity of modexp has been increased from 16 to 32. This means that we can now carry a modexp computation of at most 8192 bits.
  • array _utils folder has been removed. Functions inside it (i.e., array_compare) are now performed directly in the array arithmetic operations. This avoids the unnecessary actions of copying memory from one place to another if its not needed.
  • All lops in arithmetic operations have been split to be able to exploit particularities inside them. For example, putting aside the first row computation of an array_mul_long avoids the need of cleaning the previous output of a previous long multiplication.
  • Counters are now more precise and more high level that before, controlling better possible malicious behaviors.
  • Some assumptions have been introduced to the code. For instance, now both array_div_short and array_div_long assume that the denominator cannot be zero (which is a save assumption in the context of modexp).
  • Merged PR Adding division by two #356 into it. See it for details.

@hecmas hecmas self-assigned this Feb 12, 2024
@cla-bot cla-bot bot added the cla-signed label Feb 12, 2024
@hecmas hecmas changed the base branch from feature/modexp-tests to develop-eldelberry February 12, 2024 15:48
@hecmas hecmas mentioned this pull request Feb 12, 2024
@hecmas hecmas marked this pull request as draft February 13, 2024 10:49
@hecmas hecmas force-pushed the feature/array-len branch 4 times, most recently from a748df9 to 232193b Compare February 18, 2024 15:46
@hecmas hecmas marked this pull request as ready for review February 19, 2024 10:54
@hecmas hecmas changed the title Improving array capacity Modexp revision Feb 19, 2024
@hecmas hecmas added this to the fork-feijoa milestone Feb 22, 2024
@hecmas hecmas force-pushed the feature/array-len branch from 74cebd4 to 6015004 Compare March 14, 2024 07:51
@hecmas hecmas changed the base branch from develop-eldelberry to develop-feijoa March 14, 2024 18:24
@hecmas hecmas changed the base branch from develop-feijoa to develop March 23, 2024 11:10
@hecmas hecmas changed the base branch from develop to develop-feijoa March 23, 2024 11:10
@hecmas hecmas force-pushed the feature/array-len branch 3 times, most recently from de4563f to 74cb873 Compare March 25, 2024 09:41
@hecmas hecmas force-pushed the feature/array-len branch from 8d9ed3b to 28f4e0a Compare March 25, 2024 16:26
@hecmas hecmas force-pushed the feature/array-len branch from 28f4e0a to 5e43ad9 Compare March 25, 2024 18:01
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@ignasirv ignasirv left a comment

Choose a reason for hiding this comment

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

💯

@ignasirv ignasirv merged commit 0410c25 into develop-feijoa Mar 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants