MixinNetwork / mips

Messenger Improvement Proposals
https://mixin.one/mm
Apache License 2.0
2 stars 0 forks source link

E2EE for bot messages #8

Open cedricfung opened 4 years ago

cedricfung commented 4 years ago

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.

cedricfung commented 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)

crossle commented 3 years ago

The client needs to receive the entire messages or only receive the self-session message? Now client support parses the entire messages by session.

cedricfung commented 3 years ago

As we takes efforts to make the server know less about the conversation, the server should only acts as a relay for messages.