Hi,

I have a question regarding RSA encryption on the J2ME client side:-

My data flow is the server creates a public key and sends it to the client in HEX format in String. I need to use that public key to encrypt the content on the client side and sent it to the server, which will then decrypt it.

However where I am stuck is, the server sends the public key as a string, I am not able to create the RSAKeyParameters which the RSAEngine takes as an input to encrypt the content. How do I use the server-sent public key(in string format) to create the RSAKeyParameters?

J2SE variant of BC provides RSAPublicKey to create the public key from the string, however the same class is not supported on the J2ME variant of BC.

Any help would be appreciated.