[Cfrg] Comments on draft-irtf-cfrg-curves-11

John Mattsson <john.mattsson@ericsson.com> Wed, 13 January 2016 12:36 UTC

Return-Path: <john.mattsson@ericsson.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 188FB1ACDAE for <cfrg@ietfa.amsl.com>; Wed, 13 Jan 2016 04:36:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.8
X-Spam-Level:
X-Spam-Status: No, score=-4.8 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, GB_I_LETTER=-2, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham
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 GG5OAr3NQLsP for <cfrg@ietfa.amsl.com>; Wed, 13 Jan 2016 04:36:05 -0800 (PST)
Received: from sesbmg23.ericsson.net (sesbmg23.ericsson.net [193.180.251.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0B3191ACD9A for <cfrg@irtf.org>; Wed, 13 Jan 2016 04:36:04 -0800 (PST)
X-AuditID: c1b4fb25-f797e6d000007600-26-569644b2738b
Received: from ESESSHC002.ericsson.se (Unknown_Domain [153.88.183.24]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id 8D.4B.30208.2B446965; Wed, 13 Jan 2016 13:36:03 +0100 (CET)
Received: from ESESSMB307.ericsson.se ([169.254.7.51]) by ESESSHC002.ericsson.se ([153.88.183.24]) with mapi id 14.03.0248.002; Wed, 13 Jan 2016 13:36:02 +0100
From: John Mattsson <john.mattsson@ericsson.com>
To: "cfrg@irtf.org" <cfrg@irtf.org>
Thread-Topic: Comments on draft-irtf-cfrg-curves-11
Thread-Index: AQHRTf72O6V570kotkWVAhvIF03dFQ==
Date: Wed, 13 Jan 2016 12:36:02 +0000
Message-ID: <D2BC0343.42C14%john.mattsson@ericsson.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.5.8.151023
x-originating-ip: [153.88.183.20]
Content-Type: text/plain; charset="utf-8"
Content-ID: <B14B8EFE15D8D14EBABF9BD3079533A5@ericsson.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRmVeSWpSXmKPExsUyM2K7hO5ml2lhBm9b2C26fxxkcmD0mLzx MFsAYxSXTUpqTmZZapG+XQJXxq3NbewFXToVc9e3MDcw/tDqYuTkkBAwkZjyookNwhaTuHBv PZDNxSEkcJhR4vXFThYIZzGjxI83H8Gq2AQMJObuaQCyOThEBJQlPn+UAAkLC+hJ7Jp2iB3E FhEwlphzfhcjRImexI3jQiBhFgFViYOnvjOB2LwC5hJT1zwCK2cE2vv91BqwOLOAuMStJ/OZ IO4RkFiy5zwzhC0q8fLxP1YQWxRo5MFPK1kh4ooSV6cvZwJZxSygKbF+lz7EGGuJ2/M+sEHY ihJTuh+yQ6wVlDg58wnLBEbRWUi2zULonoWkexaS7llIuhcwsq5iFC1OLU7KTTcy1kstykwu Ls7P08tLLdnECIySg1t+q+5gvPzG8RCjAAejEg/vhr1Tw4RYE8uKK3MPMUpwMCuJ8J43nBYm xJuSWFmVWpQfX1Sak1p8iFGag0VJnDdJpjFMSCA9sSQ1OzW1ILUIJsvEwSnVwBg52y6z4uqd tXZfN3wSr9YLZnK8+3/W/lPJ7cFf3Zslfsn92iyrMOnhkXP1W5cUn/j6P6HkUDqXT9/p7p3u jZx+mXa5c1sCZTecCL8i6Pu3epfD/r/M0YdOSs/9toc9UMsgO4v/y16bNd46D/3dX6yzt1m6 L73S2ulkbv2x9uqTKoe/uMXvtFJiKc5INNRiLipOBADD8PCjjgIAAA==
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/quN_1zSECaYtioauk3RuDaeK0vM>
Subject: [Cfrg] Comments on draft-irtf-cfrg-curves-11
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
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: Wed, 13 Jan 2016 12:36:08 -0000

Hi,

I took some time during Christmas to review draft-irtf-cfrg-curves-11.
Very good. I have some comments, mostly editorial:

- Sec 1: The equation “y^2 = x^3 + A*x^2 + x” is used in Section 1 and A
even though the notation in section 3 says that x, y are coordinates on
Edwards curves. Shouldn’t this be “v^2 = u^3 + A*u^2 + u”?

-Sec 3: The notation ‘P’ for the generator base point is not used except
in ‘X(P)’ and ‘Y(P)’, I think you should either use the ‘P’ notation or
drop it.

- Sec 3: I do not see the point of the ‘X(P)’ and ‘Y(P)’ notations. It is
only used twice. Why not just say that “The base point is x =
1511222134953540...., y = 46316835694926478169...”?

- Sec 4: You should point out that the ‘order’ is the order of the
prime-order subgroup and not the order of E(F_p). It would also be good to
point out that this subgroup has prime order. In appendix A, the notation
‘r’ is used for the order of the prime-order subgroup. Furthermore in the
findCurve function, ‘order’ means #E(F_p) and in the findBasepoint
function ‘order’ means point order. Would be good with some clearer
notation for the different orders.

- Sec 4.1, 4.2, I think it would be good with some indention or
subsubsections to make the separation of e.g. curve25519 and edwards25519
clearer.

- Sec 5: “MUST mask the most-significant bit in the final byte”
I think the ‘mask’ operation should be explained.

- Sec 5: The heading capitalization is different in section 5, i.e. the
first letters in “functions”, “considerations”, “vectors” are non-capital.

- Sec 6.1: “key-derivation function that includes K, K_A and K_B to derive
a key”
Probably helpful for some readers to specify that the key is a “symmetric
key”, 

- Sec 6.1: “the co-factor , h”
The spelling “cofactor” is used in the rest of the document and the
notation ‘h’ is not used anywhere else.

- Sec 6.1: Calling Bob’s private key ‘g’ may confuse some readers as ‘g’
is very often used to denote the generator in Diffie-Hellman protocols.
I.e. here Bob computes 5^g and not g^5.

- Sec 6.1: If implementors must calculate the ORing of all the bytes, it
might be good to force them to do so by recommend the ORing of all the
bytes to be an input to the KDF.

- Sec 6.1: “The check for the all-zero value results from the fact that
the X25519 function produces that value if it operates on an input
corresponding to a point with order dividing the co-factor, h, of the
curve”.
Am I missing something or doesn’t X25519 only produce the all-zero value
if the point order divides the input scalar? In this case the text should
say something like “may produce” or “produces with high probability”.

- App A: the variable ‘r’ (order of the basepoint/order prime order
subgroup) is not defined. The variable ‘k’ (embedding degree) has already
been used to denote a scalar in section 5.

- Unclear why some values are given in hex and others in decimal. E.g. the
order Sec. 4,1 and 4,2 is given in hex, while the base point is given in
decimal. Some hex values use the ‘0x’ prefix, others do not.

- Most of the document seem to have adopted the style of having space
around ‘+’ and ‘-’, but this is not followed in a few places e.g.
s4.1: “2^255-19” -> “2^255 - 19”
s4.1: “1+y” -> “1 + y”
s4.2: “2^448-2^224-1” -> “2^448 - 2^224 - 1”

Cheers,
John



 

JOHN MATTSSON
MSc Engineering Physics, MSc Business Administration and Economics
Ericsson IETF Security Coordinator
Senior Researcher, Security

Ericsson AB
Ericsson Research
Färögatan 6
SE-164 80 Stockholm, Sweden
Phone +46 10 71 43 501
SMS/MMS +46 76 11 53 501
john.mattsson@ericsson.com
www.ericsson.com <http://www.ericsson.com/>


 <http://www.ericsson.com/>
 
This Communication is Confidential. We only send and receive email on the
basis of the terms set out atwww.ericsson.com/email_disclaimer
<http://www.ericsson.com/email_disclaimer>