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

refactor: add libcrypto PRF impl for openssl-3.0-fips #5158

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lrstewart
Copy link
Contributor

@lrstewart lrstewart commented Mar 2, 2025

Release Summary:

Resolved issues:

resolves #5143

Description of changes:

Add a new libcrypto PRF using openssl-3.0's EVP_KDF methods and "EVP_KDF-TLS1_PRF" algorithm:
https://docs.openssl.org/3.4/man3/EVP_KDF/
https://docs.openssl.org/3.4/man7/EVP_KDF-TLS1_PRF/

I also moved the libcrypto PRFs to a separate file. I think it belongs in the crypto folder?

Testing:

I mostly reused the existing tests, but with some improvements to make them more useful:

  • I added more known-value tests to cover variations on how s2n_prf executes.
  • I made the values used in the s2n_prf tests different. I had some issues figuring out bugs because they were all just identically all-zero.
  • Run the s2n_prf tests before the tests for all the methods that depend on s2n_prf.

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 Mar 2, 2025
Comment on lines +23 to +25
#if defined(OPENSSL_IS_AWSLC)

/* The AWSLC TLS PRF API is exported in all AWSLC versions. However, in the AWSLC FIPS branch, this
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't modify any of the AWSLC PRF code. I just moved it.

@lrstewart lrstewart marked this pull request as ready for review March 2, 2025 06:29
@lrstewart lrstewart requested a review from dougch as a code owner March 2, 2025 06:29
@lrstewart lrstewart requested review from goatgoose and jmayclin March 2, 2025 06:30
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.

openssl-3.0-fips support for PRF
2 participants