On Tue, 31 Aug 2021 12:05:48 GMT, Sean Mullan <mul...@openjdk.org> wrote:
>> 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? Yes, with KW (no pad), data must be in multiples of 8. When data does not meet this size requirement, an external padding scheme such as PKCS5/7 padding is needed to pad the data to multiples of 8 in order for KW mode to process the data. As for KWP mode, it internally pads the data to multiples of 8 before starting the internal processing. Thus, no external padding is needed. Are you asking if 8 should be returned for KWP mode due to its internal padding? KWP is like a variant of KW, so it seems to me that it should return the same block size as KW. ------------- PR: https://git.openjdk.java.net/jdk/pull/5236