I am using the same code on Java SE and Android project. The apps running in Java and Android connect to the same MQTT broker and exchange messages. The messages are encrypted/decrypted using AES. I have very little experience with Java Security Architecture, so my questions are:
1) What should I expect if I use the same Cipher algorithm, but from different providers (one on Java and another on Android)? Does using a different provider to decrypt a message encrypted with another provider automatically mean that the message won't be decrypted successfully?
2) What would be a recommended provider to use that would allow Java and Android applications to communicate correctly in this case? I have seen some answers online, but some are relatively old, so I'm not sure if they are still best answers.
Cipher.getInstance("AES");, but ratherCipher.getInstance("AES/CBC/PKCS5Padding");or even better authenticated encryption such as GCM or CCM which is provided by BouncyCastle.BouncyCastleon Java SE andSpongyCastleon Android. Same version.