RFR: 8297878: KEM: Implementation [v2]
Sean Mullan
mullan at openjdk.org
Fri Apr 14 18:47:44 UTC 2023
On Thu, 13 Apr 2023 22:29:34 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> The KEM API and DHKEM impl. Note that this PR uses new methods in https://github.com/openjdk/jdk/pull/13250.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>
> spec change, getAlgorithm
src/java.base/share/classes/javax/crypto/KEM.java line 78:
> 76: * assert Arrays.equals(k1.getEncoded(), k2.getEncoded());
> 77: * }
> 78: */
Missing an `@since 21`.
src/java.base/share/classes/javax/crypto/KEMSpi.java line 45:
> 43: * {@code AlgorithmParameterSpec} argument that is specified when creating
> 44: * an encapsulator or decapsulator. The result of calling
> 45: * {@link #engineNewDecapsulator} or {@link #engineNewDecapsulator} must be of
First one should be engineNewEncapsulator.
Also, maybe say "... must return an encapsulator or decapsulator that maps to a single configuration, ..."
src/java.base/share/classes/javax/crypto/KEMSpi.java line 47:
> 45: * {@link #engineNewDecapsulator} or {@link #engineNewDecapsulator} must be of
> 46: * a single configuration, where its {@link EncapsulatorSpi#engineSecretSize()}
> 47: * and {@link EncapsulatorSpi#engineEncapsulationSize()} are constants.
Maybe change "are constants" to "methods return constant values."
src/java.base/share/classes/javax/crypto/KEMSpi.java line 54:
> 52: * <p>
> 53: * {@code EncapsulatorSpi} and {@code DecapsulatorSpi} implementations must
> 54: * be immutable. It must be safe to invoke multiple {@code encapsulate} and
suggest "... must also be immutable."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1166869294
PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1166871954
PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1166885398
PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1166887194
More information about the security-dev
mailing list