Re: [TLS] Selfie attack

Mohit Sethi M <> Tue, 08 October 2019 12:09 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 241191202A0 for <>; Tue, 8 Oct 2019 05:09:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id hDXXecq45hc1 for <>; Tue, 8 Oct 2019 05:09:23 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 5DCBF120077 for <>; Tue, 8 Oct 2019 05:09:22 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=NFa4NNxfK0xvjo80Hzc9gGhglQ0zjWSJQdgDEyvzI86ADmvCspQwyWJi6scJ/7I8Il0LK05ZvoaP4O33OUtN2teoay2vW75bX1RPwXSqI6C6BnT4QSnddYFvPxjxit0aOrS2/9xcMdqxvcqjgJuFi5nHL2maL+ufdrjEP3cmDyqRq/jj3TCgZylpAWgdxB7vTGxpDRAErzVhB5y8+ivxnWIBq/5T4YDrcX9Et9GAmfWtB17CHoN07GZ8gh8F+4pB0pAnL0fZmAFbriccygpzm6+V2nT1iOLAQpCawQD+qBhWLbQuhYbblz680i0QLqt7tl5VbROeVezFPBxsZOTcog==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h+HQa7LKNJXvwMYTWosAi3JvrJ/l3QJ/O70EIp3EK9o=; b=DnU6pwxm58+IpWvWo/IxpXHdtXkthH16otTWN6cjnB7b/BNCSuWQQMGySh50Z2FFIs+giQH1oC0uJm/mWTJa8nRcS7znK3PjUXQwwwiu1ob7JpDaaq0CdTq2hE+iG4LXGLOlMTziN3dHCsErPEvWGpk0fmmeznCKuB0BFB553zTYpq5tFTT8i+FEC/I/bVv0RMHHGtXAc2Kjt5TnONAiU0VIzsaavaokC3H/UBoZylzPXS7Qf3CiK04jg+mqzRfycdjQg38ujk21o4+R5nLoORmHtAjyTv5ngTDD7GF/2wVHpU2mPI1N6b+wqdl79fLy64+bABaiFK5hQwbebCg9YQ==
ARC-Authentication-Results: i=1; 1; spf=pass; dmarc=pass action=none; dkim=pass; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h+HQa7LKNJXvwMYTWosAi3JvrJ/l3QJ/O70EIp3EK9o=; b=nVZxEqFGUnNeZZ8v5cZOjrZ7C/0S+AtL60Ji2AJahvCJdMx99iOUWmSf1w5vFpICIgswlf8CGVQSrxuxp9Ykp9t56vU/FtXzL2U83D2BOMf8f35dnWvMN4BziMjhuKuMJXWPddSM3avNkASczM/bZriE/VOPXUA0rDgMyCbG+SQ=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.13; Tue, 8 Oct 2019 12:09:19 +0000
Received: from ([fe80::758a:12ec:c6d:e8a9]) by ([fe80::758a:12ec:c6d:e8a9%10]) with mapi id 15.20.2305.023; Tue, 8 Oct 2019 12:09:19 +0000
From: Mohit Sethi M <>
To: John Mattsson <>, Christopher Wood <>, "" <>
Thread-Topic: [TLS] Selfie attack
Thread-Index: AQHVfb6JZ9ydCGu6h0WNgLEAne6JU6dQhtYAgAAgF4A=
Date: Tue, 8 Oct 2019 12:09:18 +0000
Message-ID: <>
References: <> <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
authentication-results: spf=none (sender IP is );
x-originating-ip: [2001:14bb:140:26ac:193b:4683:69c6:f65d]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: e804162a-6e8b-4f67-2233-08d74be858e0
x-ms-traffictypediagnostic: HE1PR0701MB2507:
x-ms-exchange-purlcount: 8
x-microsoft-antispam-prvs: <>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 01842C458A
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(396003)(39860400002)(376002)(136003)(53754006)(13464003)(199004)(189003)(51444003)(65806001)(31686004)(65956001)(66946007)(606006)(186003)(46003)(64756008)(66556008)(66476007)(76116006)(71190400001)(14454004)(256004)(229853002)(71200400001)(25786009)(66446008)(316002)(6486002)(14444005)(6246003)(36756003)(6436002)(6116002)(236005)(99286004)(54896002)(81166006)(81156014)(486006)(8676002)(76176011)(102836004)(6506007)(5660300002)(6306002)(478600001)(446003)(2501003)(2906002)(53546011)(31696002)(6512007)(966005)(8936002)(476003)(7736002)(86362001)(11346002)(58126008)(2616005)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0701MB2507;; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None ( does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 1tmUeyRyylCu/exMIgixK9T6C5oaIL0ta2IykspCWuZiNSp03+nfR+Q3j/8gayte3QmsszciWYzCXD7rRuzWayyKcWhZ7+bkpxhKylZWe+ybviEdA6ERtKVAtfSuNjSa4uKGzBvUkBoZ+qmdIP4TM5PWt5R+Ombb/TL8n0VH/HZ7hkLisCjC+P7NhC6Q3Fkh1pcDbm1XSrC4ZH1ZAs5CiqiFyxtiVMuz4uEQ6CFGyYFuPZ7d6iPFSv8JyxUFrTzin7ZjuB5tTnjbpqcMOVsloraWnd5VoqtPR2r4N1nfUfyo6ZAKDmTp+A7RhQUqXmeYapTyz/XEb/ynOMHp0lGeIia0Foc7Zhf0khJImOJmPqm6Z/XZxLNAkzZJ6QsXXO5fyCspmOlLSs0X1RORtG2JxkNICqgnpHzGePYPpU5Eb4CwGjA5b73B/1gN9t9XvANsTV2aT0iWeGiIrZjW1O20Bg==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_3945c14b7e72808fec8c81c6f485adf6ericssoncom_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: e804162a-6e8b-4f67-2233-08d74be858e0
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2019 12:09:18.8565 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: j71Q/fg263NvBgZFCKFeR6MzIvjJfz/QgsryawIsWMi4KJmID1LQJm3vQ6/M/ZjZa+7dy1KatdZ5AXwUg3sjs9i6vjHgSQ3orXkO+MwPDFI=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2507
Archived-At: <>
Subject: Re: [TLS] Selfie attack
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 08 Oct 2019 12:09:27 -0000

Hi John,

On 10/8/19 1:14 PM, John Mattsson wrote:
Hi Mohit, that are good points.

> The reality however is that in most group PSK scenarios, the nodes don't have any strong identities that can be verified.
I assume blocking all identities that are not the nodes own identity would mitigate the attacks, but lead to availability problems as two nodes with the same chosen identity cannot talk to each other.
Well this is getting off-topic, but if identities are generated randomly and are long enough, collisions shouldn't be a problem. Some MAC address randomization implementations simply generate a new address if they detect a collision. But we will soon start discussing the problem of address squatting and want Cryptographically Generated Address (CGAs). So perhaps we can leave the identity collision and squatting problem to the actual deployment.

>What you should instead (or additionally) say in the text is that a node should check that the client_mac and server_mac (or any >other identities used) are never the same.

I think checking ClientHello.random is enough. Below is what we wrote in

On this, Drucker and Gueron's paper mentions that a possible solution is: "Every party (client or server) caches all the nonces that it generated, and rejects a connection from other parties if they use a cached nonce." and that it "involves the overhead of maintaining a cache and the overhead of sharing the cache between several processes on the same node.". The paper also describes a group scenario where nodes can inadvertently leak cache and memory information if something like this is implemented. So I think that ensuring non-equal client and server identities is easier and safer since this check can be performed before the TLS handshake begins (i.e. when the external PSK is transformed to ipskx).


  “If two nodes unintentionally initiate two simultaneous EDHOC message
   exchanges with each other even if they only want to complete a single
   EDHOC message exchange, they MAY terminate the exchange with the
   lexicographically smallest G_X.  If the two G_X values are equal, the
   received message_1 MUST be discarded to mitigate reflection attacks.
   Note that in the case of two simultaneous EDHOC exchanges where the
   nodes only complete one and where the nodes have different preferred
   cipher suites, an attacker can affect which of the two nodes'
   preferred cipher suites will be used by blocking the other exchange.”


From: TLS <><> on behalf of Mohit Sethi M <><>
Date: Tuesday, 8 October 2019 at 11:57
To: Christopher Wood <><>, ""<> <><>
Subject: Re: [TLS] Selfie attack

Hi Chris,

For the benefit of the list, let me summarize that the selfie attack is only relevant where multiple parties share the same PSK and use the same PSK for outgoing and incoming connections. These situations are rather rare, but I accept that TLS is widely used (and sometimes misused) in many places.

The Selfie attack only happens when an entity with the PSK acts maliciously. So I think the fact that you write in the draft: "each node must be trusted not to impersonate another node's role" does not take into account that there must be a malicious node for the selfie attack to happen in the first place.

Drucker and Gueron's paper recommends that "every participating party gets (during the setup of the network) a unique identity" and "the client and the server must verify the validity of the claimed identities.". The reality however is that in most group PSK scenarios, the nodes don't have any strong identities that can be verified.

What you should instead (or additionally) say in the text is that a node should check that the client_mac and server_mac (or any other identities used) are never the same. Without this check, the selfie attack would still be possible. And at least this does not require strong identity verification for preventing selfie attacks.

On 10/5/19 2:41 PM, Christopher Wood wrote:

Hi Feng,

For what it's worth, the latest version of the PSK importers draft includes a "context" field into which identity information can be fed:



On Tue, Sep 24, 2019, at 9:19 AM, Hao, Feng wrote:

Hi John,

Reflection attacks are indeed older, but the selfie attack is a bit

different. It's actually a variant of the unknown key share attack. A

typical example of the UKS attack is the one reported on MQV by Kaliski

in 2001 (see "An unknown key-share attack on the MQV key agreement

protocol" in ACM TISSEC 2001). In that example, the adversary plays

message between two users to cause confusion in the identity, but in

Selfie, the adversary plays message with only one user and uses another

instance of the user to cause confusion in the identity. When we

reported this variant of UKS in [3], we were not aware of anything like

that in the literature.



On 24/09/2019, 16:17, "John Mattsson" <><> wrote:


    I think these reflection attacks are much older than this. I quick

search for reflection attack security protocol gives a lot of old

results, The description of reflection attack in the following lecture

material from 2009 looks just like the "selfie attack" on TLS 1.3

    With multiple sections there are other things that change as well.

If two nodes unintentionally initiate simultaneous ClientHello to each

other, even if they only want a single secure connection (I have seen

live systems where this happens in practice), an attacker can select

which ClientHello to block (e.g. the one with the strongest

cryptographic parameters). The following security property would then

no longer hold :

      "Downgrade protection:  The cryptographic parameters should be the

          same on both sides and should be the same as if the peers had been

          communicating in the absence of an attack"

    (I have not looked at what the definitions in [BBFGKZ16] say).



    -----Original Message-----

    From: TLS <><> on behalf of "Hao, Feng"


    Date: Tuesday, 24 September 2019 at 16:09

    To: Mohit Sethi M <><>,

"Owen Friel (ofriel)" <><>, Jonathan Hoyland


    Cc: ""<> <><>

    Subject: Re: [TLS] Selfie attack was Re: Distinguishing between

external/resumption PSKs

        On 23/09/2019, 18:50, "TLS on behalf of Mohit Sethi M"

< on behalf of <>><> wrote:

            Hi all,

            On the topic of external PSKs in TLS 1.3, I found a

publication on the

            Selfie attack:

            Perhaps this was already discussed on the list. I thought

that sharing

            it again wouldn't hurt while we discuss how servers

distinguish between

            external and resumption PSKs.

        I just read the paper with interest. It occurs to me that the

selfie attack is consistent with the "impersonation attack" that we

reported on SPEKE in 2014; see Sec 4.1 [1] and the updated version with

details on how SPEKE is revised in ISO/IEC 11770-4 [2]. The same attack

can be traced back to 2010 in [3] where a "worm-hole attack" (Fig. 5,

[3]) is reported on the self-communication mode of HMQV. The essence of

these attacks is the same: Bob tricks Alice into thinking that she is

talking to authenticated Bob, but she is actually talking to herself.

In [3], we explained that the attack was missed from the "security

proofs" as the proofs didn't consider multiple sessions.

        The countermeasure we proposed in [1-3] was to ensure the user

identity is unique in key exchange processes: in case of multiple

sessions that may cause confusion in the user identity, an extension

should be added to the user identity to distinguish the instances. The

underlying intuition is that one should know "unambiguously" whom they

are communicating with, and perform authentication based on that. The

discovery of this type of attacks and the proposed solution are

inspired by the "explicitness principle" (Ross Anderson and Roger

Needham, Crypto'95), which states the importance of being explicit on

user identities and other attributes in a public key protocol; also see

[3]. I hope it might be useful to people who work on TLS PSK.





        TLS mailing list<>


TLS mailing list<>


TLS mailing list<>