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

Patch Kyber to fix ASAN error on ARM64 #1922

Merged
merged 3 commits into from
Sep 13, 2024
Merged

Patch Kyber to fix ASAN error on ARM64 #1922

merged 3 commits into from
Sep 13, 2024

Conversation

praveksharma
Copy link
Member

Patch Kyber to fix address sanitiser issue on ARM64 as described in #1914. Patch copied from PQClean, in line with fix submitted in #1914.

  • [No] Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
  • [No] Does this PR change the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in fully supported downstream projects dependent on these, i.e., oqs-provider will also need to be ready for review and merge by the time this is merged.)

praveksharma and others added 3 commits September 12, 2024 21:55
Signed-off-by: Pravek Sharma <[email protected]>
Co-Authored-By: Kyle Nekritz <[email protected]>
Co-Authored-By: Mingtao Yang <[email protected]>
Signed-off-by: Pravek Sharma <[email protected]>
@praveksharma
Copy link
Member Author

Thank you for your work on #1914 @mingtaoy! I've copied the changes from PQClean as you pointed and added them as a patch. I've also added the authors from #1914 as co-authors. Would you please have a look at the changes?

@praveksharma praveksharma marked this pull request as ready for review September 12, 2024 22:53
@baentsch
Copy link
Member

@praveksharma Thanks for pulling this over from PQClean. To make reviewing easier would you mind pointing to the actual PQClean commit you pulled over? This PR doesn't seem to be the identical logic as in #1914.

@praveksharma
Copy link
Member Author

Sorry for the inadequate documentation @baentsch.

The changes were first introduced this commit. The logic is slightly different where instead of defining a function to round up integers this is done manually -- KYBER_SYMBYTES is 32 for Kyber 512, 768, and 1024 so KYBER_SYMBYTES + 2 + 6 is divisible by 8 while KYBER_SYMBYTES + 2 is not.

@baentsch
Copy link
Member

Sorry for the inadequate documentation @baentsch.

No need to apologize; I've been too lazy to try to understand the logic (differences). So this LGTM then. So when this lands #1914 gets closed without merge: OK also for you @mingtaoy?

@mingtaoy
Copy link

@baentsch - Yes! When I worked on #1914, I was unaware at the time that this was already fixed upstream.

@praveksharma praveksharma merged commit 306140e into main Sep 13, 2024
5 checks passed
@baentsch baentsch mentioned this pull request Sep 13, 2024
2 tasks
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.

4 participants