Re: [Cfrg] J-PAKE and Schnorr NIZK for informational RFCs

Feng Hao <> Tue, 15 November 2016 17:50 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9A0C712953F for <>; Tue, 15 Nov 2016 09:50:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.221
X-Spam-Status: No, score=-4.221 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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 f92e49QlM0g5 for <>; Tue, 15 Nov 2016 09:50:09 -0800 (PST)
Received: from ( []) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 5F87F1294E8 for <>; Tue, 15 Nov 2016 09:50:08 -0800 (PST)
Received: from ([] by with esmtp (Exim 4.63) (envelope-from <>) id 1c6hrz-00013n-Ds; Tue, 15 Nov 2016 17:50:07 +0000
Received: from ( by ( with Microsoft SMTP Server (TLS) id; Tue, 15 Nov 2016 17:49:52 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1-newcastle-ac-uk; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=li7OJ3iEVNwV0qhWExYMgVDpjDBom3kwyPsA14fiD+c=; b=GZx0akAj9JoxX/MqNcwxA+tr2rpb/Ptut638BnYat2Q2PFRoPGIl0uDmyzW9nwX5zVYTK8hu0QRv00txq0Fw3S0ffokTk50g96aIPIk1vHzwrGUyVutgxRdAMgSOHEaZK+nMdzsoCtUgADBl3eooXFulS5O4rw0R+5oHdrq0hRA=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.2; Tue, 15 Nov 2016 17:49:50 +0000
Received: from ([]) by ([]) with mapi id 15.01.0734.004; Tue, 15 Nov 2016 17:49:50 +0000
From: Feng Hao <>
To: Watson Ladd <>
Thread-Topic: [Cfrg] J-PAKE and Schnorr NIZK for informational RFCs
Date: Tue, 15 Nov 2016 17:49:50 +0000
Message-ID: <>
References: <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-GB, en-US
Content-Language: en-US
authentication-results: spf=none (sender IP is );
x-originating-ip: []
x-microsoft-exchange-diagnostics: 1; DB5PR0701MB1927; 7:hwbmBZqAltmjrU14MXixwjZDd7lW0U87MwcQ1WppadB1+DdlZhR201lnOCe+19CF0axQdxmm4mLQb1RhCjhK9DgJCpIEg9kcJeZDLRIx64xjFGOCxTUW3r6P0aI1fS1PRCt87PN9BQyx7nMUPaOwV7VciT6oKqbfksus6LBIrUEk7zCWrL3ViJeftpUWs54p9UALyEHJyaYzZtwa/8pMn+UNPSKrjlWzwlqYJbG3U9tiwNQ5d5fp1WY02SLohyOz4jaUWSSFscJ6C4UC25g27vKgaHGjIPO27QS/eJ3ZbVWQi+7S40SPrZJhuJ+0cGlyVjpjyw6+jKgG2nOelaTJuNFVb57kKGwKHWv/K8sJFQg=
x-ms-office365-filtering-correlation-id: ee3e66ce-a5c5-4058-71cc-08d40d7fcc3d
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DB5PR0701MB1927;
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(120809045254105)(192374486261705)(266576461109395);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6060326)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6061324); SRVR:DB5PR0701MB1927; BCL:0; PCL:0; RULEID:; SRVR:DB5PR0701MB1927;
x-forefront-prvs: 012792EC17
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(69234005)(377424004)(377454003)(199003)(189002)(13464003)(24454002)(229853002)(110136003)(42882006)(7696004)(2950100002)(6916009)(7736002)(74316002)(7846002)(305945005)(122556002)(1411001)(93886004)(81166006)(2900100001)(8936002)(9686002)(77096005)(68736007)(92566002)(87936001)(81156014)(5660300001)(105586002)(106356001)(8676002)(102836003)(86362001)(3846002)(2906002)(76576001)(551544002)(50986999)(6116002)(76176999)(66066001)(3660700001)(4001150100001)(54356999)(3280700002)(97736004)(33656002)(4326007)(101416001)(74482002)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0701MB1927;; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None ( does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2016 17:49:50.2177 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9c5012c9-b616-44c2-a917-66814fbe3e87
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0701MB1927
Archived-At: <>
Cc: "" <>
Subject: Re: [Cfrg] J-PAKE and Schnorr NIZK for informational RFCs
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Crypto Forum Research Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 15 Nov 2016 17:50:12 -0000

Hi Watson,

>-----Original Message-----
>From: Watson Ladd []
>Sent: 15 November 2016 15:20
>To: Feng Hao <>
>Subject: Re: [Cfrg] J-PAKE and Schnorr NIZK for informational RFCs
>On Tue, Nov 15, 2016 at 4:05 AM, Feng Hao <>
>> Hi Watson,
>> From: Watson Ladd []
>> Sent: 15 November 2016 07:25
>> To: Feng Hao <>
>> Subject: Re: [Cfrg] J-PAKE and Schnorr NIZK for informational RFCs
>> On Nov 14, 2016 2:56 PM, "Feng Hao" <> wrote:
>>>> Hi Watson,
>>>> Can you be specific what alternative you are talking about?
>>>> In [1], J-PAKE is compared with EKE and SPEKE, which are widely
>>>> considered the simplest and the most efficient balanced PAKEs. It is
>>>> shown that the computational efficiency of J-PAKE is about the same
>>>> as EKE and SPEKE in the finite field setting. J-PAKE is better in
>>>> the EC setting because: 1) EKE in EC is unspecified (a
>>>> straightforward implementation of EKE in EC will trivially leak
>>>> information about the password); 2) SPEKE in EC requires an
>>>> additional primitive of hashing a password to a random point on the
>>>> curve (which is a non-trivial problem on its own). J-PAKE needs 2
>>>> rounds instead of one, which is a downside and is acknowledged in the
>paper. But security is never perfect; it is always a trade-off.
>>>If only there existed one round PAKEs that could work on elliptic curves.
>Oh wait, there are several proposals, some with security proofs.
>> Again, can you be specific what PAKEs you are talking about? We can then
>have a concrete side-by-side comparison.
>Let's just say SPAKE2 for specificity, but it's clear that Dragonfly has many of
>the same properties.
>>>> Two points are worth reminding:
>>>> 1. There is an unfortunate misconception in quite a number of PAKE
>>>> papers in the literature that merely count the number of
>>>> exponentiations as the computational cost without considering the
>>>> specific group settings required by the protocol (e.g., if the
>>>> protocol accommodates short or long exponents). See Section 2.2 in [1]
>for a full discussion.
>>>This cost model is correct for ECC. In the finite field we have already lost
>all the performance already.
>> What do you mean by “lost all the performance”? Can you elaborate?
>Easy: if you care about performance, don't use finite field Diffie-Hellman.

How is the finite field Diffie-Hellman relevant to this discussion? It's a different protocol and has different requirements for implementation.

Also note that finite field is just one choice for implementing a cryptographic protocol, so is the ECC. Not every device supports ECC.

>People who actually care about performance are going to use efficient
>groups. It is not the case that a small subgroup of a large prime order-field's
>multiplicative group has a faster exponentiation then an elliptic curve group
>of the same size. That's on top of the fact that the IETF has mostly not
>standardized these subgroups due to the risk of small subgroup confinement
>attacks: the use of p=2q+1 ensures that a Jacobi symbol computation
>completely protects people.

First, small subgroup confinement can be prevented if you have proper validation in place. This is part of the protocol specification if you design it properly.

Second, even with the use of p=2q+1, small subgroups still exist and you still need to watch out for the small subgroup confinement attack. The use of safe prime makes the exponentiation significantly more expensive. 

I think you may have mixed your understanding of costs for Diffie-Hellman key exchange and J-PAKE. 

>>> Furthermore, your section 2.2 of 1 is not a full discussion: an actual
>analysis of the exponentiations done by each party and the size of the
>values they use would have been a good idea to include to model the cost in
>terms of group additions.
>> Sorry, I don’t understand this. The analysis in the paper uses one specific
>example of 1024-bit modulus since this is the parameter used in the EKE and
>SPEKE papers. The example is mainly to illustrate the different cost of
>performing exponentiation with long/short exponent that one
>exponentiation in SPEKE (and EKE) is 6-7 times more expensive than one
>exponentiations in J-PAKE.  It’s trivial to generalize that for other bit-length
>modulus (the cost difference is 2047/224 = 9 times for 2048-bit modulus).
>It doesn't go ahead and discuss the cost of JPAKE in comparison. By my
>calculation they come out comparable, but that might be wrong.  Of course,
>this conversation ignores the fact that you need groups to be used which are

If you read on, the comparison is presented in Section 5 of the J-PAKE paper [1].

>>>> 2. There is also a category of PAKE protocols that assume a trusted
>>>> setup to define the randomness in the group setting: in particular,
>>>> to define a pair of generators whose discrete logarithm must be
>>>> unknown. SPAKE2 (which I understand you¹re working on for an IEFT
>>>> submission) is only one example. Other examples include KOY [2],
>>>> Jiang-Gong [3] and Gennaro-Lindell [4]. Implementing such as trusted
>>>> set up (i.e., the common reference model if you¹re a fan of jargon)
>>>> is a tricky task. The most concrete advice in terms of
>>>> implementation that you may find is probably from Gennaro and
>>>> Lindell [4]: ³An example of where it is reasonable to assume a
>>>> common reference string is when a large organization wishes to
>>>> implement secure login for its employees. In this case, the
>>>> organization is trusted to choose the common reference string
>>>> properly, and this string can then be hardwired into the software code.²
>As an example we can have Google to define a trusted setup, which will be
>trusted by its employees.
>>>> However, it will limit the PAKE application to the internal use
>>>> within that organization. EKE, SPEKE and SPEKE do not have this issue.
>>> Some readers would interpret the above to say JPAKE doesn't depend on
>a CRS. It depends on a stronger (in some sense) random oracle assumption.
>> This CRS vs random oracle is one of the ideological arguments that is only
>of interest to theoreticians. I don’t think it’s an appropriate place to discuss
>that here.
>You are saying that the CRS is a problem for SPAKE2, when in actual fact it
>isn't. Anyone reading your email would conclude that SPAKE2 is like an IBE
>scheme which necessarily has a trusted setup phase. This is wrong.

I don't know how one would draw that conclusion - IBE is a completely different thing

The suggested implementation of CRS is quoted from the GL paper [4]. You may want to check with the original authors if you think that's incorrect.

>> FYI - the original Abdalla-Poincheval paper states that the security of
>SPAKE2 is in the random oracle model; it also depends on a CRS of course.
>>> In practice the CRS for SPAKE2 can be computed no problem from a
>random oracle. The draft has lagged in part due to accurately specifying this:
>will do sometime.
>> This is not specified in the original SPAKE2 paper. And this is not specified
>in any of the KOY, Jiang-Gong and Gennaro-Lindell papers (that assume a
>CRS) which I sent earlier. If you propose to change specification, you need to
>produce a proof to show it doesn’t contradict the original proofs.
>The CRS in SPAKE2 is two points on an elliptic curve. I don't understand this
>last sentence. What needs to be checked is that the setup satisfies the
>conditions on the points M and N, which it does.
>Are you asserting that it doesn't in fact?

OK. I meant to say the proofs in this kind CRS-based designs are motivated by removing random oracle. This is why those papers don't specify using hash to generate the CRS. If you propose to use random oracle to set CRS, you need to prove that your change doesn't contradict the original proofs, or to produce new proofs.

In practical terms, when you use hash to generate M and N. You have the freedom to decide what's the input to the hash and in what format (in effect there are endless possibilities). There is an implied trust that whoever defines this setup doesn't precompute M and N such that it gives him an advantage in knowing some relationship between M and N. This is why in CRS-based PAKE papers, the authors state that the setup should be done by "a trusted party". 

>>>> Note that I¹m not objecting PAKE protocols that rely on a common
>>>> reference string; they are one category of PAKE designs and are
>>>> useful in specifically identified scenarios. I¹m merely highlighting
>>>> that there are diversified PAKE designs with different assumptions
>>>> and properties. Having the diversity is a good thing in the research
>>>> field. However, disparaging some without noting the
>>>> weaknesses/merits of others in the context of that diversity is not fair.
>>>The great thing about standards is there are so many to pick from. This
>has doomed PAKEs forever.
>> Again, I don’t understand. What’s your argument?
>We need to chop out many of the proposals that are in the air. This
>multiplicity of choices is one of the reason no one uses PAKES.
>>> At some point we have to realize that a protocol with 14 exponentations
>and two rounds is not competitive with a 1 round, 2 exponentiation
>protocol, and this holds regardless of the group. I do not understand what
>advantages JPAKE provides, although its symmetry is occasionally useful for
>some protocols.
>> By 1 round, 2 exponentiations, you mean SPEKE? Did you read Sec 2.2
>before you respond to this? If you have any specific technical questions,
>doubts or disagreement, I'm happy to discuss. However, criticisms that are
>too general and abstract don't help.
>Yes I did. Here is the very specific criticism that I think anyone could have
>read in the previous email: On elliptic curve groups J-PAKE is far less
>performant than alternatives like SPAKE2 or Dragonfly, does not have better
>security, requires more shoehorning into protocols then the alternatives,
>and is just not attractive for IETF use as a result.

OK. Previously you used J-PAKE as an example to go against Dragonfly, and now you do it in the reverse order?

All these PAKE techniques, EKE, SPEKE, Dragonfly, SPAKE2, J-PAKE etc, are examples of the diversity in the research field. They are designed with different considerations and have different trade-offs. It's important to understand the differences, but also the differences should be tolerated and respected. There is no need to use some to trump others. A developer can choose what suits their application requirements best. 

>>>> Regards,
>>>> Feng
>>>> [1] J-PAE:
>>>> [2] J. Katz, R. Ostrovsky, M. Yung, ³Efficient
>>>> password-authenticated key exchange using human-memorable
>>>> passwords², Advances in Cryptology, LNCS 2045, pp. 475-494, 2001.
>>>> [3] S.Q. Jiang, G. Gong, ³Password based key exchange with mutual
>>>> authentication,² Selected Area in Cryptography, LNCS 3357, pp.
>>>> 267-279,
>>>> 2004
>>>> [4] R. Gennaro, Y. Lindell, ³A framework for password-based
>>>> authenticated key exchange,² Eurucrypt¹03, LNCS, No. 2656, pp. 524-543,
>>>> On 14/11/2016 15:14, "Watson Ladd" <> wrote:
>>>> >I'm sad to see J-PAKE continue to have legs given its terrible
>>>> >performance compared to alternatives. What's the point?
>>>> >
>>>> >On Mon, Nov 14, 2016 at 3:53 AM, Feng Hao
>>>> ><>
>>>> >wrote:
>>>> >> Hi,
>>>> >>
>>>> >> Recently I submitted J-PAKE and Schnorr NIZK to IETF for
>>>> >>"informational RFC". Both drafts are currently under review in the
>>>> >>independent submission stream.
>>>> >>
>>>> >> As per the reviewers' comments, I've revised the drafts to
>>>> >>clarify a few points.
>>>> >>
>>>> >> Schnorr draft
>>>> >>  * Clarify the parameters for the finite field and elliptic
>>>> >>curves. The DSA/ECDSA parameters are used only as an example;
>>>> >>other groups can also be used.
>>>> >>  * Clarify the requirement for the hash function. It needs to be
>>>> >>collision-resistant in a practical realisation with recommended
>>>> >>hash functions given.
>>>> >>
>>>> >> J-PAKE draft
>>>> >>  * Clarify that key confirmation can be implicit or explicit, and
>>>> >>that explicit key confirmation is recommended in a practical
>>>> >>implementation of J-PAKE.
>>>> >>
>>>> >> The latest drafts are below:
>>>> >>
>>>> >> Name:           draft-hao-schnorr
>>>> >> Revision:       05
>>>> >> Title:          Schnorr NIZK Proof: Non-interactive Zero Knowledge
>>>> >>Proof for Discrete Logarithm
>>>> >> Document date:  2016-11-14
>>>> >> Group:          Individual Submission
>>>> >> Pages:          11
>>>> >> URL:
>>>> >>
>>>> >> Status:
>>>> >> Htmlized:
>>>> >> Diff: 
>>>> >>
>>>> >> Name:           draft-hao-jpake
>>>> >> Revision:       05
>>>> >> Title:          J-PAKE: Password Authenticated Key Exchange by Juggling
>>>> >> Document date:  2016-11-14
>>>> >> Group:          Individual Submission
>>>> >> Pages:          14
>>>> >> URL:
>>>> >>
>>>> >> Status:
>>>> >> Htmlized:
>>>> >> Diff: 
>>>> >>
>>>> >> Your comments are most welcome!
>>>> >>
>>>> >> Cheers,
>>>> >> Feng
>>>> >>
>>>> >> _______________________________________________
>>>> >> Cfrg mailing list
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> >
>>>> >--
>>>> >"Man is born free, but everywhere he is in chains".
>>>> >--Rousseau.
>"Man is born free, but everywhere he is in chains".