Greetings.
I have constructed a chat application. Server conveys messages to all clients for the main <<wall>> of the chat. The rest happens via peer to peer connection between the clients. There is a final step i shall have to take in order to finalize this project. I need to add a good degree of security in the messages. The passwords are secured via message digest so im covered there. Have tried 3des and i think it can work if some issues are fixed. If i manage to have a key saved somehow and use it both in the server and clients it could work. Have tried for a couple of weeks but my pursue was unfruitful. If anyone has a solution for this problem i would really appreciate the help.

Summary : I need a way to secure the communications in my chat with a standard key for both client and server.

Thank you