Skip to content

feat: add PQ only policy support#5545

Merged
CarolYeh910 merged 19 commits intoaws:mainfrom
CarolYeh910:pq-only-policies
Oct 24, 2025
Merged

feat: add PQ only policy support#5545
CarolYeh910 merged 19 commits intoaws:mainfrom
CarolYeh910:pq-only-policies

Conversation

@CarolYeh910
Copy link
Copy Markdown
Contributor

@CarolYeh910 CarolYeh910 commented Oct 7, 2025

Release Summary:

Adds support for PQ only policies, which should not include classical ECC curves. This feature only works on libcryptos that support TLS 1.3 and PQ kem groups.

Description of changes:

  1. Modify s2n_generate_default_ecc_key_share() and s2n_process_client_hello() to skip the classical ECC path when a PQ only policy is provided.
  2. Check available kem groups and throw errors when setting an invalid policy via s2n_config_set_cipher_preferences or s2n_connection_set_cipher_preferences.
  3. Define a PQ only test policy test_pq_only and upload the policy snapshot.
  4. Add unit tests in s2n_pq_mlkem_policies_test.c and assert on different behaviors/errors depending on libcryptos.

Testing:

Existing tests with non PQ-only policies should continue to pass. I also added unit tests specific to PQ-only policies.

Run the test with the latest AWS-LC (PQ supported):

Running /home/ubuntu/s2n-tls/tests/unit/s2n_pq_mlkem_policies_test.c ... PASSED        382 tests

Run the test again with my default libcrypto (PQ unsupported):

Running /home/ubuntu/s2n-tls/tests/unit/s2n_pq_mlkem_policies_test.c ... PASSED        349 tests

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

@github-actions github-actions bot added the s2n-core team label Oct 7, 2025
@CarolYeh910 CarolYeh910 requested a review from goatgoose October 7, 2025 23:09
@CarolYeh910 CarolYeh910 requested a review from jmayclin October 9, 2025 16:30
@CarolYeh910 CarolYeh910 requested a review from goatgoose October 14, 2025 18:15
@CarolYeh910 CarolYeh910 requested a review from goatgoose October 14, 2025 23:20
@CarolYeh910 CarolYeh910 requested a review from goatgoose October 15, 2025 20:39
Copy link
Copy Markdown
Contributor

@jmayclin jmayclin left a comment

Choose a reason for hiding this comment

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

Do we think that this is funky enough behavior that it'd be worth adding an integration test against openssl?

@CarolYeh910
Copy link
Copy Markdown
Contributor Author

Do we think that this is funky enough behavior that it'd be worth adding an integration test against openssl?

Good callout. I'll add an integration test later in a separate PR.

@CarolYeh910 CarolYeh910 enabled auto-merge October 16, 2025 18:11
@goatgoose goatgoose disabled auto-merge October 16, 2025 20:17
@CarolYeh910 CarolYeh910 enabled auto-merge October 24, 2025 20:25
@CarolYeh910 CarolYeh910 added this pull request to the merge queue Oct 24, 2025
Merged via the queue into aws:main with commit 77f8cdd Oct 24, 2025
50 checks passed
@CarolYeh910 CarolYeh910 deleted the pq-only-policies branch October 24, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants