[messaging] Key comparison [TextSecure]
linus at lotz.li
Tue Sep 1 04:17:14 PDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
You should have a look at the 3 way DH in the axolotl ratchet:
master_key = HASH( DH(A, B0) || DH(A0, B) || DH(A0, B0) )
Where 'A' and 'B' are the identity keys and 'A0', 'B0' are the
For Textsecure the prekey is just the ephemeral key of the recipient.
Now let's assume an attacker Charlie can exchange the public prekey B0
with his prekey C0, but does not modify any of the identity keys
(since this would be detected by comparing the fingerprints). Now if
Alice(A) wants to write Bob(B) a message, she would generate the
master_key as follows:
HASH( DH(A_priv, C0_pub) || DH(A0_priv, B_pub) || DH(A0_priv, C0_pub) )
If Charlie now intercepted a message that is encrypted with a key
derived from this master_key he could not decrypt it, since he does
not know B_priv or A0_priv:
HASH( DH(A_pub, C0_priv) || DH(A0_pub, B_priv) || DH(A0_pub, C0_priv) )
(A0_pub would be attached to the message)
And Bob cannot decrypt it either, because he does not know C0_priv.
So in order to do the MitM attack Charlie has to get either get the
private ephemeral key from Alice or modify the identity keys.
Am 01.09.2015 um 09:54 schrieb N A:
> I have a question regarding the comparison of key fingerprints in
> the context of TextSecure. According to  TextSecure offers the
> ability for two users to compare fingerprints of their identity key
> out of band to detect a man in the middle attack. I was wondering
> why the prekey which was used to start the session is not part of
> the fingerprint? If the identity key of a user is compromised,
> prekeys on the server could be replaced with forged ones by an
> attacker who possesses the complete identity key. The comparison of
> identity key fingerprints would not be able to detect this.
> Including the prekey during key comparison would ensure that users
> know for sure that―even in the presence of compromised identity
> keys―no one posed as a man in the middle. Am I missing something
> Many thanks in advance for your answers!
> ---  "How secure is TextSecure"
> _______________________________________________ Messaging mailing
> list Messaging at moderncrypto.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the Messaging