With Java, you must get a Cypher:
Cipher decryptCipher = Cipher.getInstance("AES");
byte deciphertext = decryptCipher.doFinal(encripted);
String decryptedString = new String(deciphertext);
But this code causes this error:
javax.crypto.IllegalBlockSizeException: 9 trailing bytes
The problem is with PADDING, but I don't know exactly where does the problem is.
When I get the Cipher, I can choose with diferent options:
Cipher decryptCipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
Cipher decryptCipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
Cipher decryptCipher = Cipher.getInstance("AES/CFB8/NoPadding");
Maybe the problem is I don't get the good Cipher.
Can anybody help me?
Glad you found the new crypto commands! They're pretty powerful, and we're excited to have them available. What extra documentation would help you make use of the new commands? If there is something specific I can look into getting it added, depending on what it is.
We are having a similar issue between F5 and our Java application. Do you know if there is a way to make encryption and decryption work between systems?
Our developers are using AES-128-CBC with PKCS5 padding. However when decrypting the data with an iRule on F5 we are not capable of decrypting the data correctly.
Is there a way to know which type of PKCS, F5 is using please?
Please Help its urgent!!!