On Mon, 24 May 2021 20:09:06 GMT, Valerie Peng <valer...@openjdk.org> wrote:
>> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments update > > test/jdk/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java line 90: > >> 88: i++; >> 89: } >> 90: return b; > > The generated data seems too similar, all starts with 0 and increment. Maybe > use i = len to start with? Or take some additional argument for starting > value? I wanted consistent data because it's harder to solve crypto failures when you cannot see consistent pattern in the data. For example, the GCM case where the ciphertext is correct, but the tag is wrong. It is easier to know that the problem is in GHASH and not GCTR. I don't see any negatives to having similar data. > test/jdk/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java line 117: > >> 115: //int offset = ci.update(plainText, 0, plainText.length, >> cipherText, 0); >> 116: //ci.doFinal(cipherText, offset); >> 117: ci.doFinal(plainText, 0, plainText.length, cipherText, 0); > > This change seems un-necessary? I think it's better to not change it so > multi-part enc/dec are tested. Because it's commented out, I'm not sure I intended to change that. I think I was debugging something and never reverted the code ------------- PR: https://git.openjdk.java.net/jdk/pull/4072