-
Notifications
You must be signed in to change notification settings - Fork 3k
extract EC group from private key for explicit curves #9729
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
base: master
Are you sure you want to change the base?
Conversation
Going though the curve NID or name only works for standardized curves. However, explicit curves can use parameters that that deviate from the named curves. The public key generation would in that case fail to extract the group parameters from the key. Instead extract all parameters explicitly and build the group from that. fixes erlang#9723
CT Test Results 2 files 14 suites 4m 44s ⏱️ Results for commit 8df6f90. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
The new test case They seem to have their own patched OpenSSL. When drilling down I found this in OpenSSL source file ec_lib.c:
The error on This looks to me like they have disabled the use of unnamed curves. |
@sverker it seems that RedHat decided that their OpenSSL version always operates in FIPS mode and that mode forbids explicit curves with parameters that don't match well known, named curves. The patch that breaks it points to https://bugzilla.redhat.com/show_bug.cgi?id=2066412 for an explanation. That URL is hidden behind logins and I seems normal RH or Fedora accounts can not access it. So I can't know why this is broken. Maybe you have some corporate RH account that has access? I found a reference to the Bug in here https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/9.1_release_notes/bug_fixes#bug-fix_security, it says:
In any case, this leaves two options for OTP:
As much as I hate it, option 1. is probably the simplest for OTP as it is highly unlikely that anyone else has a use case for explicit curves. |
When we looked at adding newer ASN.1 specs in public_key we noticed that they are removed from the (newer, but still old) ASN.1 specs. |
Going though the curve NID or name only works for standardized curves. However, explicit curves can use parameters that that deviate from the named curves. The public key generation would in that case fail to extract the group parameters from the key.
Instead extract all parameters explicitly and build the group from that.
fixes #9723