On Tue, 23 Mar 2021 18:39:27 GMT, Greg Rubin
<[email protected]> wrote:
>> Valerie Peng has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Changed AlgorithmParameters impls to register under AES/KW/NoPadding and
>> AES/KWP/NoPadding
>
> src/java.base/share/classes/com/sun/crypto/provider/AESKeyWrap.java line 41:
>
>> 39: * and represents AES cipher in KW mode.
>> 40: */
>> 41: class AESKeyWrap extends FeedbackCipher {
>
> I see lots of unsupported operations and `encrypt/decryptFinal` ignores their
> output parameters. Should we be extending `FeedbackCipher` if so much doesn't
> seem to quite fit?
I chose to extend FeedbackCipher since we are supporting KW and KWP as cipher
modes and given that FeedbackCipher represents "a block cipher in one of its
modes", it seems a natural fit. As for the various unsupported operations,
those methods aren't currently used and instead of a no-op, I chose to throw
UnsupportedOperationException to prevent future accidental use.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2404