I have two applets. One does:
RSAPrivateKey sKey = getPrivateKey(keyFile);
Cipher cipher = Cipher.getInstance("RSA/None/OAEPWithSHA512AndMGF1Padding");
cipher.init(Cipher.DECRYPT_MODE, sKey);
sKey
is 2048 bits long.
the other one:
byte[] kSession= fileToBytes(kSessionFile);
SecretKeySpec skeySpec = new SecretKeySpec(kSession, "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
kSession
is 32 Bytes long
I am aware of the need to install extended JCE Unlimited Strength Jurisdiction Policy files for some cryptographic operations, as noted here.
My question is, when these jars are not installed, why does encryption throw the same exception while decryption does not?