WhatsApp-Crypt12-Decrypter icon indicating copy to clipboard operation
WhatsApp-Crypt12-Decrypter copied to clipboard

Illegal key size

Open rockyhalo opened this issue 6 years ago • 1 comments

Hi,

I am getting issue at line

cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));

Error : java.security.InvalidKeyException: Illegal key size at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039) at javax.crypto.Cipher.init(Cipher.java:1393) at javax.crypto.Cipher.init(Cipher.java:1327)

After debugging i came to know that int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); maxKeyLen = 128, but it should be 256.

The above error get fixed after replacing 2 jar files "local_policy.jar" and "US_export_policy.jar". Is there any way where we can fix this without doing this change

rockyhalo avatar Oct 16 '19 13:10 rockyhalo