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

SP math: rework mod 3 #5925

Merged
merged 1 commit into from
Dec 23, 2022
Merged

SP math: rework mod 3 #5925

merged 1 commit into from
Dec 23, 2022

Conversation

SparkiDev
Copy link
Contributor

Description

Simplification when only calculating mod and modulus is 3. 2^(2*n) * x mod 3 = x mod 3.
Add all digits and calculate mod 3 of sum.

Testing

Added test to compare div_3 mod result with mod_3 only result.
Tested ASM and non-ASM version.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Simplification when only calculating mod and modulus is 3.
2^(2*n) * x mod 3 = x mod 3.
Add all digits and calculate mod 3 of sum.
@SparkiDev SparkiDev assigned SparkiDev and dgarske and unassigned SparkiDev Dec 22, 2022
@dgarske dgarske merged commit d686f0a into wolfSSL:master Dec 23, 2022
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