RFR: 8271745: Correct block size for KW, KWP mode and use fixed IV for KWP mode for SunJCE
Sean Mullan
mullan at openjdk.java.net
Tue Aug 31 12:08:24 UTC 2021
On Tue, 31 Aug 2021 00:09:10 GMT, Valerie Peng <valeriep at openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/KeyWrapCipher.java line 237:
>>
>>> 235: @Override
>>> 236: protected int engineGetBlockSize() {
>>> 237: return 8;
>>
>> Line 186 still says:
>>
>> `* symmetric cipher whose block size must be 128-bit`
>>
>> Should that also be updated?
>
> Line 186 is correct in that the underlying Cipher block size must be 128-bit. However, the KW/KWP processing affected the input size requirement into 8-byte blocks, thus the overall cipher block size is now 8 instead of 16 bytes.
So the block size is always 8 even when there is no padding?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5236
More information about the security-dev
mailing list