We are using PBE for the messages in the secure chat ( you can choose whether to start a normal chat or a secure one ).
The encryption is done on the client side, so the message going through the network ,storing on the server are all encrypted. Only when you type the correct password then you can decrypt the message.