Re: [Cfrg] I-D Action: draft-irtf-cfrg-spake2-06.txt

"Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com> Mon, 03 December 2018 22:51 UTC

Return-Path: <sfluhrer@cisco.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6BC0F130DC3 for <cfrg@ietfa.amsl.com>; Mon, 3 Dec 2018 14:51:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.96
X-Spam-Level:
X-Spam-Status: No, score=-15.96 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RsdK9YlIWebD for <cfrg@ietfa.amsl.com>; Mon, 3 Dec 2018 14:51:33 -0800 (PST)
Received: from alln-iport-2.cisco.com (alln-iport-2.cisco.com [173.37.142.89]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 541F812426E for <cfrg@ietf.org>; Mon, 3 Dec 2018 14:51:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2808; q=dns/txt; s=iport; t=1543877493; x=1545087093; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=yrNrriJnRn0n8t+xUAZJMonC9W9FfNieb/nivQfiGNk=; b=QrYbPxZJBNi0jYZp7mk4M3Q2U2Tkwe7l9Zc+H8VkQ9H0OIy/jDLOi6lE SjtD3JuiiOtUzndOSHFeK2uKTULck+ICYvUdkuNJ2GjlWKNqm9ZKS6+n5 kVZRpyseU1D0FjUPD9IgbjlReHYCUMPGeGkGCtkYtJUb+kn4fFVfI5PaB I=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BCAACIsgVc/5hdJa1jDgsBAQEBAQEBAQEBAQEHAQEBAQEBgWWCBGaBAicKmiGZQgsBARgLhEkCg0ciOBIBAwEBAgEBAm0cDIU8AQEBAQIBAQElEzQLDAQCAQgRBAEBARgGECcLHQgCBAENBQiDGoF5CA+nADOELQGFegWKWoEkHheBQD+BEYMSgx4BgjGFDAKgQAkChn6KNCCRJokEhGWKXQIRFIEnNiGBVXAVO4JsgiYYg0qFFIUEO0ExiTiBCoEfAQE
X-IronPort-AV: E=Sophos;i="5.56,312,1539648000"; d="scan'208";a="208135989"
Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by alln-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2018 22:51:32 +0000
Received: from XCH-RTP-006.cisco.com (xch-rtp-006.cisco.com [64.101.220.146]) by rcdn-core-1.cisco.com (8.15.2/8.15.2) with ESMTPS id wB3MpVUW032464 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 3 Dec 2018 22:51:32 GMT
Received: from xch-rtp-006.cisco.com (64.101.220.146) by XCH-RTP-006.cisco.com (64.101.220.146) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 3 Dec 2018 17:51:31 -0500
Received: from xch-rtp-006.cisco.com ([64.101.220.146]) by XCH-RTP-006.cisco.com ([64.101.220.146]) with mapi id 15.00.1395.000; Mon, 3 Dec 2018 17:51:30 -0500
From: "Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com>
To: Nico Williams <nico@cryptonector.com>, Greg Hudson <ghudson@mit.edu>
CC: "cfrg@ietf.org" <cfrg@ietf.org>
Thread-Topic: [Cfrg] I-D Action: draft-irtf-cfrg-spake2-06.txt
Thread-Index: AQHUibpl2eAfqgtWU0SNonZdDUGWOqVqxZUAgAAYJgCAASVqAIAAJAEAgAHGMYD//63soA==
Date: Mon, 03 Dec 2018 22:51:30 +0000
Message-ID: <0e3c7af326de474e90325056335237f2@XCH-RTP-006.cisco.com>
References: <153434759643.14400.9943392813751876897@ietfa.amsl.com> <20180815154402.GP40887@kduck.kaduk.org> <20181201211038.GA15561@localhost> <c0799f2c-8079-c066-9a19-c9640f00c93e@mit.edu> <20181201233630.GB15561@localhost> <1a71a4a5-65a5-7504-f0a4-403d7e46629b@mit.edu> <20181202191531.GC15561@localhost> <20181203222107.GI15561@localhost>
In-Reply-To: <20181203222107.GI15561@localhost>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.98.2.57]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Outbound-SMTP-Client: 64.101.220.146, xch-rtp-006.cisco.com
X-Outbound-Node: rcdn-core-1.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/YZwJvmmuOayoL0mUgls43cJ9lIM>
Subject: Re: [Cfrg] I-D Action: draft-irtf-cfrg-spake2-06.txt
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Dec 2018 22:51:36 -0000

> -----Original Message-----
> From: Cfrg <cfrg-bounces@irtf.org> On Behalf Of Nico Williams
> Sent: Monday, December 03, 2018 5:21 PM
> To: Greg Hudson <ghudson@mit.edu>
> Cc: cfrg@ietf.org
> Subject: Re: [Cfrg] I-D Action: draft-irtf-cfrg-spake2-06.txt
> 
> On Sun, Dec 02, 2018 at 01:15:32PM -0600, Nico Williams wrote:
> > On Sun, Dec 02, 2018 at 12:06:40PM -0500, Greg Hudson wrote:
> > > On 12/01/2018 06:36 PM, Nico Williams wrote:
> > > >Can you explain this a bit more, that is, how hash-to-curve leaks a bit?
> > >
> > > I was looking at
> > > https://crypto.stackexchange.com/questions/51888/an-efficient-speke-
> > > protocol-with-curve25519 which notes that if you just hash to an x
> > > coordinate, an observer can see whether the chosen x coordinate is
> > > on the curve or the twist.  Of course using a proper hash-to-curve
> > > algorithm such as elligator2 avoids this problem.
> >
> > That post has an incorrect description of SPEKE, with H(P) as the
> > shared generator.
> 
> Ah, no, it was I who misremembered.
> 
> Indeed, in SPEKE/B-SPEKE the generator is H(P).  However, I think this
> construction works:
> 
> > A, B:  G' = G*H(P)
> > A->B:  X=G'*x
> > B->A:  Y=G'*y
> > A, B:  K_shared = Y*x == X*y  # (then bind in transcript, identities)
> 
> because g'=g*H(P) will be a point on the curve and will be usable as a
> generator for ECDH key agreement.  (One does have to check that g' is not
> 1.)

I do not believe that works as a PAKE, as it would allow an adversary to test multiple potential passwords from a single exchange.

Suppose B is the adversary with a dictionary of the possible password values, and A will be the first one to use the shared key in the protocol (e.g. use it to derive an encryption key and encrypt a message to B with it).

Then, what B can do is pick an arbitrary 'r', compute G*r, and send that as its 'Y' value.

A sends its X = G'*x = G*(x H(P)) value

A will then compute Y*x = G*(x r) and use that to derive the encryption key.

What B can do for every guess P' of the password in this dictionary, and compute X*(r H(P')^{-1} ); and use that to derive the encryption key, and attempt to decrypt the message with it.

We have X*(r H(P')^{-1}) = G*(x r H(P')^{-1} H(P)).  If P = P', then this simplifies to G*(x r), which is the same point that A derived as its K_shared, and so the decryption will succeed.  If P != P', then the encryption key will not work.

This allows the adversary to test every password in his dictionary with a single exchange.



> 
> Nico
> --
> 
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg