Re: Secure IM for mobile phones
[Originally posted by iain.shigeoka] Hi, Glad you enjoyed the book. If you have the time, please leave a review on Amazon.com for the book. The reviews really help new authors like myself. Server to server SSL encryption is possible but not widely available on most servers today. if you will be implementing the server solution on both sides (for everyone's domain that will need secure messaging) then it is possible (and relatively easy) to implement SSL on server connections. In fact, with SSL you won't need to use the dialback s2s authentication scheme that's used by most servers. If you can control the server on your user's side, but not on the recipient's server, then you can securely send unencrypted messages to your server (assuming you trust your server) and then have the server encrypt the messages before sending it to the recipient (I'll tell you how to do this below). This offloads the computationally intensive task of packet encryption to the server. Notice your terminal (terminal == mobile phone) will be doing SSL encryption of the data between the client and server so the data remains secure. Most phones that support SSL connections do it in hardware so it usually doesn't result in too large a performance impact. If you can't control any of the servers, then your terminal application will have to encrypt the packets. The only standard method for doing this is to use PGP. The details of doing this is provided in a Jabber standard (see www.jabber.org standards for details). However, most clients don't support packet encryption so it is unreliable to asusme that you can send an encrypted message to someone and they can read it. There's no good way to get around this problem other than to tell both users to use a client that understands secure Jabber or uses your custom client. If you know the other user has your custom client, then you can easily encrypt the packet data using any method you like. The simplest is to have the sender encrypt the data using the public key (in the public certificate) of the recipient. The recipient receives the message and decrypts the data using her private key. Java security provides the tools to run encryption algorithms although I'm not sure what J2ME profiles/configurations contain which Java security libraries. You'll have consult the J2ME library docs for the mobile phones you wish to support. Remember to wrap your encrypted data within a namespace in an x extension. An example would be: <message to='recipient@server.com'> <body>Encrypted message attached</body> <x xmlns='http://myserver.com/myencryption'>ab432498c244d2f...</x> </message> Hope this helps. If any of this is unclear, let me know. -iain
|