I'm developing a secure multiparty application, but I have a very big problem. The app runs over a BB device, and it connects to a java server running on a pc via sockets, in order to exchange several data. On the BB side, I create a RSAKeyPair and obviously I need to send the public key (RSAPublicKey) to the server, so it can encrypt data and so on... But, the infamous problem is that I'm not able to send the key, because there's not a stream which handles crypto objects like RSAPublicKey. I've tried to cast the key to a different type (String, int, etc.), but it doesn't work.
Someone can give me some advice, please?