-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8297878: KEM: Implementation #13256
8297878: KEM: Implementation #13256
Conversation
👋 Welcome back weijun! A progress list of the required criteria for merging this PR into |
Webrevs
|
src/java.base/share/classes/javax/crypto/DecapsulateException.java
Outdated
Show resolved
Hide resolved
* | ||
* @param pk the receiver's public key, must not be {@code null} | ||
* @param secureRandom the source of randomness for encapsulation, | ||
* If {@code null}, the implementation should provide |
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.
s/should/must/
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.
This spec is not written for the implementor. How about "If {@code} null, a default one from the implementation will be used.".
Mailing list message from Stephen Farrell on security-dev: Hi, Apologies for the interruption from the sidelines but I Is there any relationship between this work and RFC1980 Reason to ask is HPKE is a mechanism that'll be needed for Cheers, PS: I implemented HPKE for OpenSSL so if there's interest |
We know about HPKE, and it can makes use of the DHKEM implementation here (if the AuthEncap/AuthDecap functions are not used). However, we (Oracle's Java SE Security Team) don't have a plan to include HPKE inside OpenJDK yet. This PR is mainly about adding the KEM SPI so 3rd security providers can implement other KEM algorithms. DHKEM is included mainly to prove that the API is usable. |
Mailing list message from Stephen Farrell on security-dev: Hiya, On 13/04/2023 23:35, Weijun Wang wrote:
Of course:-)
FWIW, I'm not aware of any protocol yet attempting to make
Entirely fair. If doing so is of interest (to you or others),
Grand. I'll get out of the way of this thread so:-) But Cheers, |
Thanks a lot. I'll remember that. |
Mailing list message from Kevin Driver on security-dev: Some interesting side discussion here. I wanted to chime in to point out that HPKE is built upon the ?primitives? of KEM and HKDF. As mentioned on the list, KEM is underway. I am also spearheading our effort reviving the HKDF JEP<https://bugs.openjdk.org/browse/JDK-8189808> which has gone a bit stale. HPKE is certainly something we?re looking into as well. Once the building blocks of KEM and HKDF are in place, HPKE will ramp up next. Kevin Driver Subject: Re: RFR: 8297878: KEM: Implementation Hi, Apologies for the interruption from the sidelines but I Is there any relationship between this work and RFC1980 Reason to ask is HPKE is a mechanism that'll be needed for Cheers, PS: I implemented HPKE for OpenSSL so if there's interest -------------- next part -------------- |
New commit pushed. The "the caller has validated" sentences are removed since that will be an implementation detail. Now each provider needs to validate the arguments themselves. Also, when a null key is provided to |
I don't see this as a modern vs old API style, it's consistency. Also
One could argue that |
Maybe 1.6 is already modern enough. ;-)
|
New commit pushed. |
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.
I'm fine with the changes
@wangweij This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 161 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
New commit. Resolve Sean's comments. Make SecureRandom settable. |
/integrate |
Going to push as commit 6b90b05.
Your commit was automatically rebased without conflicts. |
The KEM API and DHKEM impl. Note that this PR uses new methods in #13250.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13256/head:pull/13256
$ git checkout pull/13256
Update a local copy of the PR:
$ git checkout pull/13256
$ git pull https://git.openjdk.org/jdk.git pull/13256/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13256
View PR using the GUI difftool:
$ git pr show -t 13256
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13256.diff
Webrev
Link to Webrev Comment