Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdk19 CryptoTests cryptotest/tests/CipherTests.java IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8 #16712

Closed
pshipton opened this issue Feb 13, 2023 · 7 comments

Comments

@pshipton
Copy link
Member

pshipton commented Feb 13, 2023

All platforms.

https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_aarch64_linux_Nightly_testList_0/99
https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_aarch64_mac_Nightly_testList_0/103
https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_ppc64_aix_Nightly_testList_1/100
https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_ppc64le_linux_Nightly_testList_1/101
https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_s390x_linux_Nightly_testList_1/102
https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_x86-64_linux_Nightly_testList_1/100
https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_x86-64_mac_Nightly_testList_0/99
https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_x86-64_windows_Nightly_testList_1/103
CryptoTests_0
cryptotest/tests/CipherTests.java

11)	SunJCE: 	AES_128/KW/NoPadding~AES_128/KW/NoPadding	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_128/KW/NoPadding from SunJCE version 19
Failed
12)	SunJCE: 	AES_128/KW/NoPadding~OID.2.16.840.1.101.3.4.1.5	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_128/KW/NoPadding from SunJCE version 19
Failed
13)	SunJCE: 	AES_128/KW/NoPadding~2.16.840.1.101.3.4.1.5	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_128/KW/NoPadding from SunJCE version 19
Failed
14)	SunJCE: 	AES_128/KW/NoPadding~AESWrap_128	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_128/KW/NoPadding from SunJCE version 19
Failed

22)	SunJCE: 	AES_256/KW/NoPadding~AES_256/KW/NoPadding	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_256/KW/NoPadding from SunJCE version 19
Failed
23)	SunJCE: 	AES_256/KW/NoPadding~OID.2.16.840.1.101.3.4.1.45	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_256/KW/NoPadding from SunJCE version 19
Failed
24)	SunJCE: 	AES_256/KW/NoPadding~2.16.840.1.101.3.4.1.45	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_256/KW/NoPadding from SunJCE version 19
Failed
25)	SunJCE: 	AES_256/KW/NoPadding~AESWrap_256	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_256/KW/NoPadding from SunJCE version 19
Failed
26)	SunJCE: 	AES/KW/NoPadding~AES/KW/NoPadding	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES/KW/NoPadding from SunJCE version 19
Failed
27)	SunJCE: 	AES/KW/NoPadding~AESWrap	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES/KW/NoPadding from SunJCE version 19
Failed

48)	SunJCE: 	AES_192/KW/NoPadding~AES_192/KW/NoPadding	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_192/KW/NoPadding from SunJCE version 19
Failed
49)	SunJCE: 	AES_192/KW/NoPadding~OID.2.16.840.1.101.3.4.1.25	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_192/KW/NoPadding from SunJCE version 19
Failed
50)	SunJCE: 	AES_192/KW/NoPadding~2.16.840.1.101.3.4.1.25	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_192/KW/NoPadding from SunJCE version 19
Failed
51)	SunJCE: 	AES_192/KW/NoPadding~AESWrap_192	 (Cipher)
cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
failed to use: AES_192/KW/NoPadding from SunJCE version 19
Failed

Total checks: 126, failed: 14
14 Cipher failed

java.lang.Exception: 11)	SunJCE: 	AES_128/KW/NoPadding~AES_128/KW/NoPadding	 (Cipher)
	at cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:83)
	at cryptotest.tests.CipherTests.main(CipherTests.java:72)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:1573)
Caused by: cryptotest.utils.AlgorithmRunException: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
	at cryptotest.tests.CipherTests.checkAlgorithm(CipherTests.java:141)
	at cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:79)
	... 5 more
Caused by: javax.crypto.IllegalBlockSizeException: data should be at least 16 bytes and multiples of 8
	at java.base/com.sun.crypto.provider.AESKeyWrap.encryptFinal(AESKeyWrap.java:153)
	at java.base/com.sun.crypto.provider.KeyWrapCipher.helperEncrypt(KeyWrapCipher.java:602)
	at java.base/com.sun.crypto.provider.KeyWrapCipher.implDoFinal(KeyWrapCipher.java:572)
	at java.base/com.sun.crypto.provider.KeyWrapCipher.engineDoFinal(KeyWrapCipher.java:523)
	at java.base/com.sun.crypto.provider.KeyWrapCipher.engineDoFinal(KeyWrapCipher.java:473)
	at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2207)
	at cryptotest.tests.CipherTests.checkAlgorithm(CipherTests.java:135)
	... 6 more
@pshipton
Copy link
Member Author

@llxia this is also failing on Adoptium builds, it should be excluded until it's working.

@llxia
Copy link
Contributor

llxia commented Feb 13, 2023

Just for the record, the link for Adoptium failed build: https://ci.adoptopenjdk.net/job/Test_openjdk19_hs_extended.functional_x86-64_linux/163/tapResults/

The test passed in 8, 11, and 17 (except windows see #16710). I will exclude the test for 19.

FYI @sophia-guo

@llxia
Copy link
Contributor

llxia commented Feb 13, 2023

Also, see the failure in JDK20: https://openj9-jenkins.osuosl.org/job/Grinder_testList_0/210/console. Will exclude for 19+

llxia added a commit to llxia/openjdk-tests that referenced this issue Feb 13, 2023
related: eclipse-openj9/openj9#16712
Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
smlambert pushed a commit to adoptium/aqa-tests that referenced this issue Feb 13, 2023
related: eclipse-openj9/openj9#16712

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
@zzambers
Copy link

I have made PR to fix this issue:
rh-openjdk/CryptoTest#31

@llxia
Copy link
Contributor

llxia commented Feb 14, 2023

Thanks @zzambers . The above KW tests passed.

The following tests failed due to Timeout :
cryptotest/CryptoTest.java.CryptoTest
cryptotest/tests/SignatureTests.java.SignatureTests

retested with JDK20 and the above fix: https://openj9-jenkins.osuosl.org/job/Grinder_testList_0/215
retested with JDK19 and the above fix: https://openj9-jenkins.osuosl.org/job/Grinder/2034/

@zzambers
Copy link

zzambers commented Feb 15, 2023

@llxia I can increase timeout in jtreg tags, but seems it gets unexpectedly long time to run.

I have a suspicion that test machine could be running low on entropy (causing random number generator to block, as OpenJDK uses blocking /dev/random by default). Can you please check the system whether there is entropy gathering daemon running there (such as rngd, jitterentropy-rngd, ...) ?

@llxia
Copy link
Contributor

llxia commented Feb 15, 2023

I think this issue can be closed as IllegalBlockSizeException is resolved.
@zzambers for /dev/random conversation, could we continue in #16720? Thanks.
FYI, I increased the timeout factor to 2. This is the value that we use for openjdk tests in general.

I will leave the CryptoTests tests excluded for JDK19+ until the rest of the related issues are resolved. @pshipton please let me know if you think otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants