On Fri, 31 Mar 2023 02:25:04 GMT, Weijun Wang <wei...@openjdk.org> wrote:
> The KEM API and DHKEM impl. Note that this PR uses new methods in > https://github.com/openjdk/jdk/pull/13250. src/java.base/share/classes/javax/crypto/KEM.java line 430: > 428: /** > 429: * Returns a {@code KEM} object that implements the specified > algorithm > 430: * and supports the specified {@code KEMParameterSpec} parameters There are no parameters for this method. src/java.base/share/classes/javax/crypto/KEM.java line 441: > 439: * to {@link #getInstance(String)}. > 440: * @return the new {@code KEM} object > 441: * @throws NoSuchAlgorithmException if no {@code Provider} supports a This sounds like the provider argument is ignored. Maybe add some more words to take into account both cases "if a {@code provider} is specified and it does not support the specified KEM algorithm, or if {@code provider} is {@code null} and there is no provider that supports a KEM implementation of the specified algorithm" src/java.base/share/classes/javax/crypto/KEM.java line 460: > 458: /** > 459: * Returns a {@code KEM} object that implements the specified > algorithm > 460: * and supports the specified {@code KEMParameterSpec} parameters There are no parameters. src/java.base/share/classes/javax/crypto/KEM.java line 471: > 469: * to {@link #getInstance(String)}. > 470: * @return the new {@code KEM} object > 471: * @throws NoSuchAlgorithmException if no {@code Provider} supports a See above for similar comments. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1165814719 PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1165816835 PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1165821821 PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1165822406