-
Notifications
You must be signed in to change notification settings - Fork 274
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
Add support for X25519 algorithm alias to XDH #1156
Conversation
e24a0ce
to
4e7a406
Compare
Thanks very much for this! I noticed it was missing but hadn't got around to it. However, it should be done as an alias rather than a top-level entry, e.g. instead of
you need
and so on. That way you should need fewer test changes too. Are you OK with making this change? |
* Added X25519 aliases for KeyPairGenerator, KeyFactory, and KeyAgreement in OpenSSLProvider
36917f3
to
1c6e83e
Compare
Thanks for the review and feedback @prbprbprb! I adjusted the alias settings to use the appropriate I retained the X25519 Key Agreement test and related test changes, but if you don't think that is necessary, I can also remove it as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the quick turnaround!
Good news, you can use that in source builds right away. Bad news, the earliest it will be available in the Android platform is November. Plus we plan a maven release "soon" once we finish figuring out Gradle issues. |
Thanks again @prbprbprb! |
And add missing tests to the OpenJDK suite which is how this got missed in google#1156.
And add missing tests to the OpenJDK suite which is how this got missed in #1156.
This pull request adds
X25519
as a supported algorithm name alias forKeyPairGenerator
,KeyFactory
, andKeyAgreement
implementations in theOpenSSLProvider
.Based on the work completed in PR #950 providing the X25519 implementation, this pull request allows integrating libraries to use the
X25519
alias instead ofXDH
.The alias references align with the JDK 11 implementation of Curve25519 Key Agreement described in JEP 324, which notes that referencing the specific algorithm name provides convenient shorthand for
KeyAgreement
and related components. It is also worth noting that the JDK 11 implementation returnsXDH
for calls togetAlgorithm()
on generated keys, and this alias strategy follows the same convention.