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

Update PQ code to be generic over EVP_KEM API's #4810

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

alexw91
Copy link
Contributor

@alexw91 alexw91 commented Sep 30, 2024

Resolved issues:

None

Description of changes:

First change in a multi-part series to make s2n's PQ code generic over the availability of the EVP KEM API's already being used instead of being specific to Kyber. This change will make it easier to add ML-KEM in a future PR.

Call-outs:

Cleaned up a few redundant usages of s2n_pq_is_enabled() and s2n_libcrypto_supports_evp_kem() to simplify the s2n code. s2n_pq_is_enabled() is just an alias for s2n_libcrypto_supports_evp_kem() now (since s2n no longer has an internal implementation of Kyber). Code paths that checked if these functions had different values have been deleted.

Testing:

Unit tests

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

crypto/s2n_evp_kem.c Outdated Show resolved Hide resolved
tests/unit/s2n_security_policies_test.c Outdated Show resolved Hide resolved
tests/unit/s2n_security_policies_test.c Show resolved Hide resolved
tls/s2n_kem.c Show resolved Hide resolved
crypto/s2n_pq.h Show resolved Hide resolved
tests/unit/s2n_kem_preferences_test.c Show resolved Hide resolved
tests/unit/s2n_kem_preferences_test.c Outdated Show resolved Hide resolved
crypto/s2n_evp_kem.c Outdated Show resolved Hide resolved
crypto/s2n_evp_kem.h Outdated Show resolved Hide resolved
tests/unit/s2n_security_policies_test.c Outdated Show resolved Hide resolved
@alexw91 alexw91 changed the title Update PQ code to be generic over EVP_KEM API's [Part 1] Update PQ code to be generic over EVP_KEM API's Oct 1, 2024
@alexw91 alexw91 changed the title [Part 1] Update PQ code to be generic over EVP_KEM API's Update PQ code to be generic over EVP_KEM API's Oct 2, 2024
crypto/s2n_evp_kem.c Outdated Show resolved Hide resolved
@goatgoose goatgoose enabled auto-merge (squash) October 2, 2024 18:39
@goatgoose goatgoose merged commit 2c23194 into aws:main Oct 2, 2024
37 checks passed
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