RFR: 8325448: Hybrid Public Key Encryption [v18]

Weijun Wang weijun at openjdk.org
Thu May 1 15:38:51 UTC 2025


On Thu, 1 May 2025 15:02:11 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   engineGetBlockSize and engineGetOutputSize returns 0 when not initialized
>
> src/java.base/share/classes/javax/crypto/spec/snippet-files/PackageSnippets.java line 46:
> 
>> 44:         senderCipher.init(Cipher.ENCRYPT_MODE, kp.getPublic(), ps);
>> 45: 
>> 46:         // Retrieve the actual parameters used from the sender.
> 
> "from the sender" sound like it is being retrieved from the sender side over the network. Suggest replacing this with "from the senderCipher".

How about "Extracts the actual parameters from `senderCipher`"?

> src/java.base/share/classes/javax/crypto/spec/snippet-files/PackageSnippets.java line 50:
> 
>> 48:                 .getParameterSpec(HPKEParameterSpec.class);
>> 49: 
>> 50:         // Retrieve the key encapsulation message (the KEM output) from the sender.
> 
> Same comment as above about "from the sender".

How about "Extracts the key encapsulation message (the KEM output) from `senderCipher`"?

> src/java.base/share/classes/javax/crypto/spec/snippet-files/PackageSnippets.java line 51:
> 
>> 49: 
>> 50:         // Retrieve the key encapsulation message (the KEM output) from the sender.
>> 51:         // It can also be retrieved using sender.getIV().
> 
> s/sender/senderCipher/

Correct.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r2070417472
PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r2070418278
PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r2070419002


More information about the security-dev mailing list