I have a android project and used the RSA encryption, and it works ok between the android client and java server. The public key and private key was generated using android API. Now i want to use the same RSA on the IOS project and use the same keys. Unfortunately it doesn't work well. I can encrypt and decrypt just on the IOS client, and it right. When decrypted on the java server, it got error. Using kSecPaddingPKCS1 for encrypting, and RSA/NONE/OAEPWithSHA1AndMGF1Padding for decrypting.
reference: 1.RSA: encrypt in iOS, decrypt in Java 2.RSA implementations in Objective C
Can anyone help, thank you.