mike vas wrote:Hi guys,
If I encrypt a message using a keystore with RSA and provider SunJCE in java version 6, could someone who's using java version 1.3 and the same keystore etc. decrypt the message?
Mike
No, because direct encryption of data with RSA is not supported in versions prior to ... 1.5 I think, certainly not before 1.4.2
Is JCE 6 backward compatible with other versions and vice versa?
Yes, but that doesn't mean what I suspect you want it to mean. The JCE is a set of classes, for example the Cipher class, as well as a set of abstract service provider classes. What is not part of the JCE are the service provider implementation classes. These classes provide the actual Cipher, Signature, MessageDigest, etc. algorithms implementations. You get an instance of one these implementations through the various getInstance() methods. The default Java runtimes for various versions include different Sun providers. Over time these providers implement more and newer algorithms, so these algorithms will not be available in earlier versions. But a robust bit of code like
should work in any version in the sense that you will either get the algorithm you asked for or get an exception that the algorithm is not available, but there are early providers that do not have AES.