RFR: 8297878: KEM: Implementation [v16]

Weijun Wang weijun at openjdk.org
Wed May 17 13:11:04 UTC 2023


On Wed, 17 May 2023 07:10:49 GMT, Ferenc Rakoczi <duke at openjdk.org> wrote:

>> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   to and length and comments
>
> src/java.base/share/classes/javax/crypto/KEM.java line 233:
> 
>> 231:          *          of the shared secret as a 128-bit AES key.
>> 232:          * @throws IndexOutOfBoundsException if {@code from < 0},
>> 233:          *     {@code from > to}, or {@code to > secretSize()}
> 
> Shouldn't this say "{@code to - from > secretSize()}"?

`from` and `to` are indexes into the secret itself, so it's indeed `to` cannot exceed `secretSize()`.

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

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



More information about the security-dev mailing list