Before I ask my question, let me say that I don't know the math behind OTR, so I don't know if the process of authentication in OTR is any similar to this.
- Alice and Bob have exchanged keys using Diffie-Hellman key exchange
- There's a man-in-the-middle - Eve.
- This is the encryption "circuit":
Alice -- e_alice -- Eve -- e_bob -- Bob
- Both Alice and Bob use
eto express the encryption key they use.
- Thus in conditions where there is no MitM,
- Alice wants to verify that there is no MitM, so uses a verification question (and an answer) (like OTR in XMPP):
Do you have a cat?
Note: Obviously use strong values for
A. Don't ask about the presence of a cat, but rather cat's name (ideally if it's a unique name containing numbers and special characters) :P
- Alice sends Q to Bob
- Bob sends
hashis any safe hashing algorithm,
e_bobis the encryption key Bob uses, and
Ais the answer, salt in this context.
- Alice compares
received == hash(e_alice+A). In case this is true, there is no MitM.
In this context:
- The hashing algorithm for zero-knowledge-proof
- The encryption keys are a pre-shared (by the key exchange) secret
- The answer is used as salt (while being another pre-shared secret), so Eve can't think: "Oh look, that's a sha1 hash. Let's try to crack it. Oh look it's our encryption key -- that's a no-go"
- Possibly add additional encoding like base64 to minimize chance of hashed contents being in wordlists. (
Question: Are there any serious vulnerabilities, or would this work for authentication for insecure encrypted channels?