[messaging] Key comparison [TextSecure]

Linus Lotz linus at lotz.li
Tue Sep 1 04:41:17 PDT 2015

Hash: SHA256

I just reread your message and saw that I missed that the attacker knows
B_priv. In this case he could decrypt the message but has to reencrypt
it for Bob, for which he would need to know one of Bobs private
original ephemeral keys or the private Identity Key of Alice:
HASH( DH(A_pub, B0_priv) || DH(A0_pub, B_priv) || DH(C0_priv, B0_pub) )
HASH( DH(A_priv, B0_pub) || DH(A0_pub, B_priv) || DH(C0_priv, B0_pub) )

Best Regards,

Am 01.09.2015 um 13:17 schrieb Linus Lotz:
> Hi, You should have a look at the 3 way DH in the axolotl
> ratchet[1]: 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 
> ephemeral keys. 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.
> Best Regards, Linus
> [1]https://github.com/trevp/axolotl/wiki
> Am 01.09.2015 um 09:54 schrieb N A:
>> Hi,
>> I have a question regarding the comparison of key fingerprints
>> in the context of TextSecure. According to [1] 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 obvious?
>> Many thanks in advance for your answers!
>> --- [1] "How secure is TextSecure" 
>> [https://eprint.iacr.org/2014/904.pdf] 
>> _______________________________________________ Messaging
>> mailing list Messaging at moderncrypto.org 
>> https://moderncrypto.org/mailman/listinfo/messaging
> _______________________________________________ Messaging mailing
> list Messaging at moderncrypto.org 
> https://moderncrypto.org/mailman/listinfo/messaging

Version: GnuPG v2


More information about the Messaging mailing list