Open cedricfung opened 4 years ago
version || salt || cipher || tag || nonce || sender public key || encrypted message key for receiver session 1 || encrypted message key for receiver session 2 || encrypted message key for receiver session 3 || .......
cipther, tag = AESGCM(plain, message key, salt, nonce)
encrypted message key for receiver session = session id || AESCBC(message key, shared secret key, salt, nonce)
shared secret key = ECDH(sender private key, receiver session public key)
The client needs to receive the entire messages or only receive the self-session message? Now client support parses the entire messages by session.
As we takes efforts to make the server know less about the conversation, the server should only acts as a relay for messages.
Only bot related messages are plain now, we should also make them E2EE. To make it easy for developers, we plan to develop a new protocol for bot messages, because Signal is too complicated to make with good performance and accuracy.