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

ML-KEM FIPS 203 destruction of intermediate values #1883

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

dkostic
Copy link
Contributor

@dkostic dkostic commented Sep 26, 2024

Issues:

CryptoAlg-2616

Description of changes:

FIPS 203 Section 3.3 requires destruction of intermediate values.
AWS-LC ML-KEM implementation allocates intermediate values
only on stack, so this destruction seems a bit silly, but we do it
anyway for compliance.

Call-outs:

Point out areas that need special attention or support during the review process. Discuss architecture or design changes.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@dkostic dkostic requested a review from a team as a code owner September 26, 2024 22:37
@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.49%. Comparing base (36e0307) to head (db0a771).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1883      +/-   ##
==========================================
- Coverage   78.50%   78.49%   -0.02%     
==========================================
  Files         585      585              
  Lines       99516    99543      +27     
  Branches    14244    14242       -2     
==========================================
+ Hits        78122    78133      +11     
- Misses      20759    20777      +18     
+ Partials      635      633       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dkostic dkostic marked this pull request as draft September 27, 2024 18:40
@dkostic dkostic force-pushed the ml-kem-destruct-intermidiate-values branch from 4cd79ef to 4ebc30d Compare September 30, 2024 18:15
@dkostic dkostic marked this pull request as ready for review September 30, 2024 18:15
@rod-chapman
Copy link

Do you data on performance impact of this change?

@dkostic
Copy link
Contributor Author

dkostic commented Oct 3, 2024

Do you data on performance impact of this change?

yes, up to 1% performance regression on M1 mac (I suspect it's similar on other platforms).

@dkostic dkostic merged commit ee2f31d into aws:main Oct 4, 2024
106 of 110 checks passed
@dkostic dkostic deleted the ml-kem-destruct-intermidiate-values branch October 4, 2024 15:43
dkostic added a commit to dkostic/aws-lc that referenced this pull request Oct 4, 2024
FIPS 203 Section 3.3 requires destruction of intermediate values.
AWS-LC ML-KEM implementation allocates intermediate values
only on stack, so this destruction seems a bit silly, but we do it
anyway for compliance.
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.

6 participants