RFR: 8325448: Hybrid Public Key Encryption [v46]
Weijun Wang
weijun at openjdk.org
Fri Nov 7 23:08:13 UTC 2025
On Wed, 5 Nov 2025 19:35:59 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:
>> Weijun Wang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 62 commits:
>>
>> - merge
>> - Merge branch 'master' into 8325448
>> - Tony's comment
>> - more key checks; some small spec change
>> - Merge branch 'master' into 8325448
>> - about transformation
>> - cannot reset with withMethods
>> - algorithm identifier
>> - withMethods
>> - duplicated "value" words
>> - ... and 52 more: https://git.openjdk.org/jdk/compare/cf45e09c...b5112151
>
> src/java.base/share/classes/com/sun/crypto/provider/HPKE.java line 137:
>
>> 135: throws InvalidKeyException, InvalidAlgorithmParameterException {
>> 136: impl = new Impl(opmode);
>> 137: if (!(key instanceof AsymmetricKey ak)) {
>
> Is a null check needed for `key` and `params`? It appears Cipher leaves that to the SPI to accept or reject.
If `key` is null, you will see "InvalidKeyException: Not an asymmetric key". I assume that's also OK?
I'll deal with `params`, there is a similar exception but unfortunately I called `params.getClass()` there.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r2505795657
More information about the security-dev
mailing list