RFR: 8325448: Hybrid Public Key Encryption [v10]
Weijun Wang
weijun at openjdk.org
Thu Mar 13 19:55:41 UTC 2025
On Thu, 13 Mar 2025 18:47:58 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> switch to Asserts.assertThrows in test; use traditional javadoc style
>
> src/java.base/share/classes/javax/crypto/spec/HPKEParameterSpec.java line 67:
>
>> 65: * <a href="https://www.iana.org/assignments/hpke/hpke.xhtml">IANA HPKE page</a>.
>> 66: * <p>
>> 67: * Once an {@code HPKEParameterSpec} object is created, additional methods
>
> Are these additional methods commonly called? If so, did you consider using something like a Builder to avoid the extra object creations?
`info` and `encapsulation` are frequently called. I don't think it's worth using a builder. The final `build()` call is always the same and unnecessary.
> src/java.base/share/classes/javax/crypto/spec/HPKEParameterSpec.java line 137:
>
>> 135: * // and the key encapsulation message from the sender
>> 136: * Cipher recipient = Cipher.getInstance("HPKE");
>> 137: * HPKEParameterSpec pr = HPKEParameterSpec.of()
>
> I think it would be useful to give an example with some of the constants.
I've just pushed a new commit that includes them in the example (the screenshot in the description is also updated). While I haven't used them in `of`, they are compared to values retrieved through `getParameters`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r1994206296
PR Review Comment: https://git.openjdk.org/jdk/pull/18411#discussion_r1994214300
More information about the security-dev
mailing list