RFR: 8297878: KEM: Implementation [v2]

Weijun Wang weijun at openjdk.org
Tue Apr 18 16:27:59 UTC 2023


On Fri, 14 Apr 2023 14:21:05 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> src/java.base/share/classes/javax/crypto/KEM.java line 242:
>> 
>>> 240:          *          shared secret as a key with algorithm being "Generic",
>>> 241:          *          the key encapsulation message, and optional parameters.
>>> 242:          *          The return value should not be {@code null}.
>> 
>> "should" means it *could* still return null. I assume that is not what we want. Although I would be more inclined to only specify cases where null may be returned, and if it isn't mentioned, then it should be implied that null is not a legal return value. If in doubt, perhaps check with Joe/CCC for advice when you file the CSR.
>> 
>> This general comment applies to the other return types in this API where you say "not null". I think you can omit those.
>
> I do mean "must not be null". Maybe I can ask Joe directly.

I've removed the "not null" words for return values.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1170288201



More information about the security-dev mailing list