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

Kyber: fix kyber_from_msg() #7613

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Conversation

SparkiDev
Copy link
Contributor

Description

New compilers with specific optimization levels will produce non-constant time code for kyber_from_msg().
Add in an optimization blocker that stops the compiler from assuming anything about the value to be ANDed with KYBER_Q_1_HALF.

Fixes zd#18075

Testing

./configure '--disable-shared' '--enable-experimental' '--enable-kyber'

Checklist

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

New compilers with specific optimization levels will produce
non-constant time code for kyber_from_msg().
Add in an optimization blocker that stops the compiler from assuming
anything about the value to be ANDed with KYBER_Q_1_HALF.
@SparkiDev SparkiDev assigned SparkiDev and wolfSSL-Bot and unassigned SparkiDev Jun 4, 2024
@SparkiDev SparkiDev requested a review from wolfSSL-Bot June 5, 2024 23:06
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Such an odd workaround but I understand how it resolves things.

@dgarske dgarske merged commit 5132a17 into wolfSSL:master Jun 6, 2024
107 checks passed
jefferyq2 pushed a commit to jefferyq2/wolfssl that referenced this pull request Jun 9, 2024
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.

3 participants