Re: [Cfrg] My review of the four balanced PAKE (SPAKE2, SPEKE, CPACE, J-PAKE)

"Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com> Tue, 10 September 2019 22:55 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 15A0112006B for <cfrg@ietfa.amsl.com>; Tue, 10 Sep 2019 15:55:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=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 header.b=MyAjIwb4; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=GN/zI74z
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 gdRdcwEO4TJs for <cfrg@ietfa.amsl.com>; Tue, 10 Sep 2019 15:55:22 -0700 (PDT)
Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E3BFB120019 for <cfrg@irtf.org>; Tue, 10 Sep 2019 15:55:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=13990; q=dns/txt; s=iport; t=1568156121; x=1569365721; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=H+Fsr5t3VdBBZAefGB7Ev3HiX2/fZGo0yLH+irtddLc=; b=MyAjIwb4YUz2pHnvY18dTzv4QKZ5E4cLURMR8AQWSIyv33qAXuJuJtaO rXGVwoUR5ca3p6IHxK3EAXgZvUV4O5B5hIGAFdj1fl4Slnv9rs5MAskzn l4OVE4T8fxmzy+8UNBsH3vWZSPcvJhvK70KZJbUTTrX9DeVRJfXVDqws7 Y=;
IronPort-PHdr: 9a23:TiufpxQB536LU+ZZDqiw96U57Npsv++ubAcI9poqja5Pea2//pPkeVbS/uhpkESXBNfA8/wRje3QvuigQmEG7Zub+FE6OJ1XH15g640NmhA4RsuMCEn1NvnvOjc0GNlCTlJ/13q6KkNSXs35Yg6arw==
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0C6AABGKXhd/5JdJa1cCRoBAQEBAQIBAQEBBwIBAQEBgWeBRVADgUMgBAsqCodeA4p8TYIPl3CBQoEQA1QJAQEBDAEBLQIBAYFLgnQCgkkjOBMCAwkBAQQBAQECAQYEbYUuDIVKAQEBAQIBEi4BASMVCwQCAQgRBAEBARgWMh0IAQEEARIIGoRrAw4PAZ1OAoE4iGGCJYJ9AQEFhQcYghYJgTSJL4EGgUMYgUA/gRFGgh4uPoQIBA4ECh5Ngm6CJoxCDAg5iFOBMpRJBmgKgiGMDoYyglKCNIdAjxaNf4E4k1mDXQIEAgQFAg4BAQWBaSGBWHAVO4JsgkILAReDT4pTc4EpjCwBIgIHgQQBgSIBAQ
X-IronPort-AV: E=Sophos;i="5.64,491,1559520000"; d="scan'208";a="629035656"
Received: from rcdn-core-10.cisco.com ([173.37.93.146]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 10 Sep 2019 22:55:20 +0000
Received: from XCH-RCD-016.cisco.com (xch-rcd-016.cisco.com [173.37.102.26]) by rcdn-core-10.cisco.com (8.15.2/8.15.2) with ESMTPS id x8AMtKB2013998 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 10 Sep 2019 22:55:20 GMT
Received: from xhs-rtp-002.cisco.com (64.101.210.229) by XCH-RCD-016.cisco.com (173.37.102.26) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 10 Sep 2019 17:55:19 -0500
Received: from xhs-rcd-001.cisco.com (173.37.227.246) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 10 Sep 2019 18:55:18 -0400
Received: from NAM05-BY2-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-001.cisco.com (173.37.227.246) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 10 Sep 2019 17:55:18 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iwpmjFl4yKPDVsJYQAST4I2XqOShc+leIh/cxuqjIESce5pF3eziCZ1NP42gO3ENLffEega+julvtQiHfYjKpdeXx13F29SWDkVv6HM2ZUUc0fubWE2EFooh6EejLj8vDgEywJ+ShQM7lg7g+ukES6chZ2MgbTl1qSt6MuJPp5WzFro2cJU1A7pNj1Za9lP95nFo75Qd7WiR0hNdjPrvSivuBJ1LFimTrtvM5v34TEn1cXtyiIJEYTFEthMYwMymVFPOAQDOEos8zC6+3n98PRZ/W2xvur6UP7xaU1hEfJDMpk0Fn472UFepboSEHWoZo5z5kKHeMR+3UVvyhyinFw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mGrrOG6CNr+1oQ6KYaK+dB8A31YJY8uX7v7X+0K+wD4=; b=FGYS2XZWG30hezX8gSNmsNDpCL2R96ts9V0xbUTLmb/qpV4a0k9H4Dqd//JEIIaQDH3TGiX6Y8aWBT2+HLSKCT6kc/jYxTHdRhBIdHjrp/tKC7nETMZGW3xU2F9gH2vQO294rfW/dGou03O8fKyAMfH2GFq1TbLwskf4ktFJKI5clLCI+eKmQFwsm5jP7Zda4S92893tS54JQvCyR+i6LD0XXWakL5vmiP7Oy7W//JWBKTWahBIVqY+dZBgothHQaSNXcV9zAgLFdD46VA+RJF1EeV8OGX59iWsxKynzHqYGNFhdTJrS58i5pCLMkYsmhGLgOQFuQaWCdkZ4/0sR7w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mGrrOG6CNr+1oQ6KYaK+dB8A31YJY8uX7v7X+0K+wD4=; b=GN/zI74zEzsmAojXgKFEtiTlVjEp80qMvpFiWWBcTOfDQZ0L34pwLDphceiHCnh26VMmh6Yx3zwqqLPCCPn4yxgg70ciwRfyTF9XzDtMOB5TmQjtD4xJpYjss5aJmIGi/nhpA6Im2MNB4bUB/+i9621j25Xcp0L8kXbptMqBbm8=
Received: from BL0PR11MB3172.namprd11.prod.outlook.com (10.167.182.222) by BL0PR11MB3505.namprd11.prod.outlook.com (20.177.205.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.20; Tue, 10 Sep 2019 22:55:17 +0000
Received: from BL0PR11MB3172.namprd11.prod.outlook.com ([fe80::de4:ce0b:65fc:5b12]) by BL0PR11MB3172.namprd11.prod.outlook.com ([fe80::de4:ce0b:65fc:5b12%4]) with mapi id 15.20.2241.018; Tue, 10 Sep 2019 22:55:17 +0000
From: "Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com>
To: Björn Haase <bjoern.m.haase@web.de>, "cfrg@irtf.org" <cfrg@irtf.org>
Thread-Topic: [Cfrg] My review of the four balanced PAKE (SPAKE2, SPEKE, CPACE, J-PAKE)
Thread-Index: AdVkF1zGWxIvxhLkQ1maNFJa+34IlAAymR6AAM+1QYA=
Date: Tue, 10 Sep 2019 22:55:16 +0000
Message-ID: <BL0PR11MB317295A3C52539094F9A7329C1B60@BL0PR11MB3172.namprd11.prod.outlook.com>
References: <BL0PR11MB31728AF40F9C9B7B65472AC1C1BB0@BL0PR11MB3172.namprd11.prod.outlook.com> <7db3abf1-6297-d003-df44-fc4fe1338bcf@web.de>
In-Reply-To: <7db3abf1-6297-d003-df44-fc4fe1338bcf@web.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=sfluhrer@cisco.com;
x-originating-ip: [173.38.117.87]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: df2f1e3e-e6ac-496a-bea3-08d73641f2f5
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BL0PR11MB3505;
x-ms-traffictypediagnostic: BL0PR11MB3505:
x-microsoft-antispam-prvs: <BL0PR11MB350582F2F18EA5A9643E7C34C1B60@BL0PR11MB3505.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 01565FED4C
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(39860400002)(366004)(136003)(396003)(346002)(189003)(199004)(13464003)(81156014)(66446008)(81166006)(66066001)(186003)(26005)(14454004)(102836004)(7696005)(6436002)(76176011)(6506007)(53546011)(5660300002)(476003)(99286004)(8936002)(256004)(14444005)(446003)(11346002)(25786009)(486006)(478600001)(305945005)(229853002)(7736002)(30864003)(64756008)(71190400001)(71200400001)(52536014)(74316002)(6116002)(3846002)(6246003)(53936002)(2906002)(55016002)(110136005)(9686003)(66574012)(33656002)(316002)(66556008)(66476007)(66946007)(76116006)(8676002)(86362001)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR11MB3505; H:BL0PR11MB3172.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: l2dNsUACXhRlzunJ9DC+qG/3JMBMieqjr29HSNDKGk79ekfVQezZarwDHSUJqaiGGYsblb0I8Y8CjaBkf+FjDLASvwciTia+05/y8QJu+7phTzObRwewLW+ZFrkjD57TZmLJanDKzSaM4dPSup/zbpecSaRU+X0NuSJmrCFpgaorA5iRzbATY0ToHR5QjPRdu1HHW1C13xrcwYC6f+CSC5j5ijK80LNUU6VGl249qbxtT+k3j8H3G8Ugaknia3pVFbf2xhu2a4thLYFnv6aQSXgvoVrX2nCmbZPTF53IOPuIwBN+7Tl2XLYLlcotmyPOZIW/ewxDZ/aaUhVrcng80eB/jzoA4qXBLl7lk/eM3T4Jtfm9BPXFiZWsgH2pAA0kco9IUFxCtukPZO4vO+DTOf971aCg+AFcnF7xG0lQGyc=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: df2f1e3e-e6ac-496a-bea3-08d73641f2f5
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2019 22:55:17.1421 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Lcc1e0VaeUedUSiXuYIpc2jJghC81dl9BgY4/pu1vQiYDBRe0jtm8I6IItl1YP3f0ByurXdFLrMBcktcl/CjWg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3505
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.26, xch-rcd-016.cisco.com
X-Outbound-Node: rcdn-core-10.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/SvGoQNiJEF_t1_6tvQDgpLL1JQA>
Subject: Re: [Cfrg] My review of the four balanced PAKE (SPAKE2, SPEKE, CPACE, J-PAKE)
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: Tue, 10 Sep 2019 22:55:25 -0000

> -----Original Message-----
> From: Cfrg <cfrg-bounces@irtf.org> On Behalf Of Björn Haase
> Sent: Friday, September 06, 2019 2:35 PM
> To: cfrg@irtf.org
> Subject: Re: [Cfrg] My review of the four balanced PAKE (SPAKE2, SPEKE,
> CPACE, J-PAKE)
> 
> Dear Scott,
> 
> I would like to thank you for your review. In you came up with some
> questions regarding CPace which I would like to answer. Secondly in a
> subsequent section, I would like to respond to your analysis.
> 
> You pointed out a weak point that you identified in the security proof.
> You will not be astonished
> to hear, that we believe that our proof holds. Still, in fact, we actually might
> agree on all essential aspects of your analysis!
> In our opinion, the essence of your result might actually point to the
> problems might come with the strongly idealizing assumptions regarding the
> concept of the random oracle that we did use in the proof.
> 
> I would appreciate your feedback regarding the point, wether our re-
> phrased version of your feedback that you will find below correctly captures
> your reasoning or not.
> 
> Yours,
> 
> Björn
> 
> 
> 1) Answers to the questions raised regarding CPace:
> 
>  > Scott Fluhrer wrote:
>  >In addition, it is also not clear whether an explicit mutual authentication
> step is a  >required part of CPACE.  That step is shown in Figure 4; however,
> that lists the AuCPace protocol  >(which is not reviewed here) which does
> the mutual authentication step as a pass after the  >"CPace substep"); figure
> 5 (which is specific to CPace) does not list it at all  >(on the other hand, it
> doesn't actually list any exchanged messages).
> 
> It is common for simulation-based proofs in the UC framework to specify the
> protocol in form of an algorithm running on interactive Turing machines
> which exchange messages by "send" operations.
> As such, the two protocol messages show up in figure 5 as "CPace initiator"
> and "CPace responder". As you see there, CPace is defined solely for implicit
> authentication.
> I.e. explicit key confirmation is out of the scope of both F_{pwKE} and CPace.
> 
> As a consequence figure 5 does not include any authenticator message and
> the ideal functionality does not provide any guarantees that might parties
> abort further communication in case that the authentication failed.
> 
> The AuCPace paper mainly focuses on presenting the augmented protocol
> and CPace was actually only a side-aspect. As such the "protocol boundaries"
> might benefit from some additional text.
> 
> 
> 2) Replies regarding your analysis.
> 
> First let me again thank you for your review. My perception is that we
> actually might have consensus regarding the most relevant points.
> 
>  > Scott Fluhrer wrote:
>  >The problem is that [in the proofs of SPAKE2, SPEKE and CPace] these
> simulations have a model  >of what the adversary is allowed to do, and I
> >managed to find potential actions that an adversary might try to accomplish
> that is not accounted  >for by the simulator's adversary model (and hence
> the security proof would not be valid when facing  >such an adversary).
> 
>  > [...]
> 
>  >The major issue is the security proof [of CPace], which would appear to be
> invalid.
>  >It's a simulation-based proof; but I don't see how they cover cases where
> the adversary  >doesn't play by the rules the simulator assumes.
> 
> Actually in the proof we did not make any assumption regarding the
> adversary's strategy. In the wording of the UC framework we show
> "simulability when facing dummy adversaries".
> Note that properly handling the UC dummy adversary was at the core of the
> "proof update" that you did mention.
> (BTW: Thank you Björn Tackmann, for your careful reading and advice and for
> providing your preliminary review of AuCPace that allowed us to fix this
> topic.).
> Note that the example that you gave also does not refer to a specific attack
> strategy of the adversary but to the properties of the hash function that she
> uses.
> 
> What we, however actually do is that we base our proof on strong
> assumptions regarding the properties of the *cryptographic primitives* that
> we use as a building block in our protocol.
> Specifically we had to model the hash function as a programable random
> oracle.
> 
>  >For example, in G2, they switch the standard hash/mapping function with
> one where they  >know the discrete log (and note that this does not change
> the observed distribution),  >and so later assume that the simulator knows
> the discrete logs.
> 
>  >However, the adversary is not bound to using the standard hash/mapping
> function with his accesses,  >and so the simulator might not know the
> discrete log.  It is not clear how the simulator is  >supposed to proceed in
> such a case, and hence the indistinguishability results from the  >various
> simulators may be invalid.
> 
> What we indeed do in G2 is that we replace the real-world hash function with
> a programable random oracle.
> 
> This is true and we agree that this could be a problem.
> We program the hash value to chosen values that are indistinguishable from
> random values for the observing environment Z.
> 
> So regarding this part of your analysis we disagree in that we think that we
> did not actually make any assumption on "how the adverary is playing the
> game". Your main point, however, might rather an aspect on which we will
> agree.

Let me try to rephrase my objection: in the protocol, legitimate parties will always invoke Map2Point(H(something)) to generate a point; hence when dealing with legitimate parties, it is totally reasonable in G3 to replace H with something where you always know the dlog of the point generated.

However, with a PAKE, we can't limit the adversary to only using points of the form Map2Point(H(something)); they can pick anything (see my repeated pleas to "please do input checking", because inserting things which aren't points at all can really mess things up).  My concern was that if you assumed you always knew the discrete log, well, the adversary can forbid that.

Now, going over the proof again, I do see where you try to deal with this, I'd need to review this further.

On the other hand, I did manage to find a counterexample to Theorem 1 (as stated); the protocol is broken if:
	- We're on a curve where the DDH problem is easy
	- H2 is the identity function (or otherwise doesn't hide the value K); theorem 1 makes no assumptions on H2.

The attack is fairly straight-forward:
-	 The honest initiator transmits G^y (for password-dependent G, secret y)
-	The adversary responds with H (for an arbitrary point H)
-	The honest initiator computes H^y, and output the sk (which includes H^y).
-	The adversary somehow hears the sk (and thus gets H^y)

Then, the attacker goes through his dictionary, and for each password, he computes the corresponding G', and then checks if (G', G^y, H, H^y) is a Diffie-Hellman set; for the correct password, it will be.

Now, this attack makes quite improbable assumptions (e.g. that H2 is the identity); however as far as I can see, everything it does is pedantically within the assumptions of Theorem 1; and so there's something there that could use a bit of tightening up.  I haven't gone through the proof myself to track down where it fails in this case; I don't expect that to cause a major change in your proof...

> 
> Possibly your objection could be re-phrased using the wording
> 
> "The issue of the security proof of CPace is that the authors did base the
> analysis on the idealized assumption of availability of a programable random
> oracle (PRO). The proof requires the simulator to be given the power to
> program the output of the hash function to chosen values that could not be
> distinguished from random values. The simulator makes specific choices that
> give it access to secret exponents. This cannot happen in the real-world,
> because the hash-functions don't behave like random oracles. Without the
> RO-assumption it cannot be proven that real-world adversaries are given no
> more capabilities than what they were permitted in the ideal-world
> protocol."?
> 
> If this re-phrased sentence captures the essence of your review, we have
> consensus.
> 
> Note that the awareness with respect to the many problems related to
> random oracles as idealization of hash functions is one of the two aspects
> which made us choose the 256-bit-security-level hash SHA512 in conjunction
> with the 128-bit-security-level primitives used elsewhere in our reference
> implementation AuCPace25519.
> We thought that it might be wise to be particularly conservative with respect
> to the choice of the hash, specifically due to the risks associated with the RO
> idealization.
> (The second reason was: "When using Curve25519, it is likely that
> Ed25519 is interresting
> and then SHA512 might be required anyway.")
> 
>  > Scott Fluhrer wrote
>  > The specified CPACE protocol involves a Verify() function to validate points
> received from the  > other side; however I believe that function is
> underspecified.
>  > They try to be more general (see the last paragraph in section 3.4);
> however, it would  > appear unlikely that an average implementor would be
> able to cover all cases.
> 
> I agree on this. We did fully specify how to run Verify() for x-coordinate-only
> implementations on curves with a secure twist. For any other case we only
> have defined the requirements for the Verify() primitive. As such, the paper
> is not sufficient for an implementation spec. but "only" a scientific paper
> presenting a proof with one specific reference implementation example.
> 
>  > I believe that it would be cleaner if we mandated that we support only
> curves with twist  > security (e.g. Curve25519 and Curve448), and that we
> exchange only the X coordinate  > (and that the Verify(X) function is precisely
> the check that hX is not the neutral element  > (where h is the cofactor -
> specifically, the lcm of the cofactors of the curve and the twist).
> 
> I agree that it would have been cleaner and simpler. Still, there might be use-
> cases where implementers might be forced to using other curves. Imagine
> for instance the case of american/french/german/chinese government
> applications which require their own favorite choice of curves. Also there
> might be legacy hardware-accellerators or CC/FIPS-certified software
> libraries which only cover some short-weierstrass curves. You might be
> loosing FIPS/CC approvals :-(.

Actually, X25519 is NIST approved (and CC follows FIPS in terms of the crypto primitives), and so FIPS/CC should be fine.

> 
> For this reason, we see the use-case and need for dealing also with the
> somehwat more complex case of Short-Weierstrass curves. (Note that I also
> see the need for this requirement from a crypto-agility point of view).

In that case, if you transmit (x, y) coordinates (possibly compressed), you really need to check them against the curve equation (if they're not on the curve, they can be of any order); you really need to mandate this (as well as checking hP != 0).

> 
>  > Note that, unlike SPAKE-2, the validity checking does not have to check
> whether points are on the twist, 
> as twisted points cannot yield any
> additional information to the attacker.
> Yes. In my opinion, this is one of the advantages of CPace.
> 
>  > The paper does mention the possibility of using other curves (such as short
> Weierstrass curves),  > I would suggest that we disallow those curves, as they
> would require alternative validity checking  > (such as checking the received
> x, y coordinates into the curve equation),  > and while this is not difficult, it is
> a change, without (as far as I can see) any  > compensating benefit.
> 
> Again I agree. Security-wise adding support for short-weierstrass might
> actually even increase the risk of implementation pitfalls. Still, I strongly
> believe that we should not strictly disallow this choice, specifically when
> considering secure element chips designed for specific short-weierstrass,
> curves only.

Fair enough.  Just make sure you specify everything...

> 
> As you noted for short-weierstrass curves, Verify() would boil down to what
> we do at various places today ("Verify that the point is on the right curve.")
> and doing this might be easily merged with a point decompression. So, for
> short-weierstrass, there might actually be no benefit of using the x-
> coordinate-only approach.

Well, it does save one byte of bandwidth :-)

>  > In addition, the protocol is defined only at a fairly high level; any real
> definition will need to  > specify a number of things (the curves that we work
> in, the format of the identifiers sid, Pi, Pj,  > the actual hash and method to
> convert these identifiers and the password into the value G, the  > format of
> the exchanged messages [...].
> 
> Yes. As mentioned. The AuCPace paper was meant to be a scientific paper
> discussing the need of PAKE in real-world settings together with the proof
> and an optimized reference implementation example.
> As such it is yet not sufficiently specific as to allow for writing inter-operable
> implementations.
> However we believe that this step would be somewhat straight-forward.

Still needs to be done (and reviewed; It's astonishing how many devils there are in the details)