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

FIPS 203 IPD update: ML-KEM-IPD-768 and ML-KEM-IPD-1024 #1724

Merged
merged 7 commits into from
Jul 30, 2024
Merged

Conversation

jakemas
Copy link
Contributor

@jakemas jakemas commented Jul 25, 2024

Issues:

AWS-LC is tracking the standardization of FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard. This PR brings our implementation of ML-KEM up to the specification described in FIPS 203.

Most recent changes in this area:
a1f73bc
56f3569
4b07805

Description of changes:

NIST have made the following public statements regarding the planned changes to FIPS 203:

  • NIST will specify lower-level de-randomized API to enable CAVP testing with seeds as keys.

As such, this PR includes the following:

  • The addition of ML-KEM-IPD-768 and ML-KEM-IPD-1024 to AWS-LC. Note: as common functionality is already added to aws-lc, this lift is extremely light, as we need only to define crypto/ml_kem/ml_kem_768_ipd.c and crypto/ml_kem/ml_kem_1024_ipd.c.
  • The addition of de-randomized testing API for ML-KEM-IPD-768 and ML-KEM-IPD-1024
  • KATs for ML-KEM-IPD-768 and ML-KEM-IPD-1024 that use seeds as keys (as per CAVP requirement)
  • An update to the file that captures the divergence from the upstream reference listed at https://github.com/aws/aws-lc/tree/main/crypto/ml_kem#readme. This removes the outdated information regarding pq_custom_randombytes and updates with information regarding the de-randomized API.
  • Reserving NIDs 986 and 987 so that ML-KEM-IPD has reserved consecutive NIDs for better customer experience.

Call-outs:

Divergence from the reference implementation: I have checked upstream (https://github.com/pq-crystals/kyber/tree/standard) for any additional changes to the IPD reference implementation, and see two more recent commits since the previous import. These are:

I have not included these fixes into this PR, as AWS-LC independently addressed these issues in PR 4b07805.

Testing:

The new KEM algorithms have been added to the built_in_kems list, and as such, are included within the complete PerKEMTest suite. This includes testing of the de-randomized APIs added in #1578.

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.

@jakemas jakemas requested a review from a team as a code owner July 25, 2024 19:47
@jakemas jakemas marked this pull request as draft July 25, 2024 19:49
@jakemas jakemas added the FIPS label Jul 25, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.28%. Comparing base (b862b16) to head (ba6f0c8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1724      +/-   ##
==========================================
+ Coverage   78.26%   78.28%   +0.01%     
==========================================
  Files         580      580              
  Lines       96418    96521     +103     
  Branches    13830    13838       +8     
==========================================
+ Hits        75465    75562      +97     
- Misses      20340    20345       +5     
- Partials      613      614       +1     

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

@jakemas jakemas removed the FIPS label Jul 25, 2024
@jakemas jakemas marked this pull request as ready for review July 26, 2024 21:34
@dkostic dkostic merged commit 5cc9456 into aws:main Jul 30, 2024
105 of 106 checks passed
skmcgrail added a commit that referenced this pull request Aug 1, 2024
## What's Changed
* Added options to x509 tool by @ecdeye in
#1696
* Add support to detect Neoverse V2 cores by @andrewhop in
#1706
* Move OCSP functions for Ruby out of internal.h by @samuel40791765 in
#1704
* Add aes-256-xts to EVP_get_cipherbyname by @torben-hansen in
#1707
* Match using CMAKE_SYSTEM_PROCESSOR_LOWER by @justsmth in
#1709
* Update MySQL to 9.0.0 by @skmcgrail in
#1685
* [EC] Unify scalar multiplication for P-256/384/521 by @dkostic in
#1693
* Adds const qualifier to ciphertext parameter in EVP_PKEY_decapsulate
by @maddeleine in #1713
* Upstream merge 2024 06 24 by @nebeid in
#1661
* NIST SP 800-108r1-upd1: KDF Counter Implementation by @skmcgrail in
#1644
* Upstream merge 2024 07 09 by @nebeid in
#1694
* Design for support of HMAC precomputed keys by @fabrice102 in
#1574
* Fix for select point from table in ec_nistp scalar_mul by @dkostic in
#1719
* X509toolcomparison by @ecdeye in
#1714
* AWS-LC s2n-bignum update 2024-07-22 by @dkostic in
#1718
* Add OpenVPN to CI by @smittals2 in
#1705
* Lower required Go version, add CI test for specific version by
@andrewhop in #1717
* ec2-test-framework enhancements and graviton 4 testing by
@samuel40791765 in #1715
* sha + chacha: Move AArch64/X86-64 dispatching to C. by @justsmth in
#1625
* Show number of pruned ec2 instances in dashboard by @samuel40791765 in
#1728
* rsa and md5 tools by @ecdeye in
#1722
* FIPS 203 IPD update: ML-KEM-IPD-768 and ML-KEM-IPD-1024 by @jakemas in
#1724
* bump mysql CI to 9.0.1 by @samuel40791765 in
#1727
* Support utility OCSP request functions by @samuel40791765 in
#1708
* add support for OCSP_SINGLERESP functions by @samuel40791765 in
#1703
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.

5 participants