Edit readme text

This commit is contained in:
Alan Friedman 2016-01-26 15:14:07 -05:00
parent 323c7a903d
commit 9c9c08b29c

View File

@ -26,11 +26,11 @@ Here's an overview of a chat between Alice and Bob (also applies to group chats)
2. Alice joins the room and also creates primary and signing public/private key pairs. She is sent Bob's two public keys and she sends Bob her two public keys.
3. When Bob goes to send a message, two things are created: a session key (AES-CBC) and an initialization vector (these are generated every time a new message is sent).
4. Bob's message is encrypted with the session key and initialization vector, and a signature is created using his private signing key.
5. The session key is encrypted with each recipient's public key (in this case only Alice, but in a group chat multiple).
5. The session key is encrypted with each recipient's primary public key (in this case only Alice, but in a group chat multiple).
6. The encrypted message, initialization vector, signature and encrypted session key are sent to all recipients (in this case just Alice) as a package.
7. Alice receives the package and decrypts the session key using her private key. She decrypts the message with the decrypted session key and vector, and verifies the signature with Bob's public signing key.
7. Alice receives the package and decrypts the session key using her primary private key. She decrypts the message with the decrypted session key and vector, and verifies the signature with Bob's public signing key.
Group chats work the same way because in step 5 we encrypt the session key with everyone's public key. When a message is sent out, it includes encrypted keys for everyone in the room, and the recipients then pick out the ones for them based on their user ID.
Group chats work the same way because in step 5 we encrypt the session key with everyone's primary public key. When a message is sent out, it includes encrypted keys for everyone in the room, and the recipients then pick out the ones for them based on their user ID.
### [Man-in-the-middle attacks](https://en.wikipedia.org/wiki/Man-in-the-middle_attack)