Understanding end-to-end encryption, I ran into an issue which I wasn't able to find a solution for.
Given three parties: Alice, Bob, the chat endpoints, and the server party owned by Eve. The server party allows Alice and Bob to communicate.
Let's say Alice and Bob wanna start an encrypted chat session with each other. How do they prevent Eve from gaining and replacing the encryption keys (performing the MiTM attack) and compromising the whole session?
A meeting in person to share the secret is not an option.
I have read about OTR and Double Ratchet Algorithm. They claim to be secure and OTR claims to use the Socialist millionaire protocol, which, as I understand, should prevent the conversation to be compromised. But I don't quite understand how it works.
The main question is, is there a way for two parties establish a completely private conversation though a compromised server without using an outside channel?