Maggie P2P encrypted IM module
Maggie APP has a built-in encrypted IM module, which is based on PKI encryption mechanism and third-party IM service provided by Easemob. This project contains correlative object-C code.
As a social platform with attributes of strong authentication and high privacy, Maggie has designed an encrypted IM mechanism to fully protect user’s privacy.
User’s private key, which is the most important for privacy, will be generated and stored only at user’s cellphone. Private key will never be sent to server and has to be kept by user himself just like in a **block chain system**. For example, in iOS, user’s private key and certificate will kept in the Keychain, which has a higher secure level than other application storages.
Maggie will generate a symmetric key and transfer it between two users for their encrypted P2P session, using **PKI** encryption mechanism.
An encrypted P2P IM process is accomplished in Maggie APP as below:
User A sends a request for encrypted IM with B
User B accepts the request
A sends request to server to apply for the public key of B
A gets B’s public key, generates a symmetric session key, and encrypts it with public key of B
A signs a verification information with his private key, and send it to B
B receives the encrypted session key and verification information, decrypts the session key with his private key, and verifies the signed information with A’s public key
User A and B both enter encrypted IM and start a chat