Re: [IPsec] Question about RFC 5114
"Kaz Kobara" <kobara_conf@m.aist.go.jp> Fri, 26 March 2010 22:28 UTC
Return-Path: <kobara_conf@m.aist.go.jp>
X-Original-To: ipsec@core3.amsl.com
Delivered-To: ipsec@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 60E343A6C41 for <ipsec@core3.amsl.com>; Fri, 26 Mar 2010 15:28:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.04
X-Spam-Level: *
X-Spam-Status: No, score=1.04 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, DNS_FROM_OPENWHOIS=1.13, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P-uRgylgQqXy for <ipsec@core3.amsl.com>; Fri, 26 Mar 2010 15:28:59 -0700 (PDT)
Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by core3.amsl.com (Postfix) with ESMTP id 06F203A6B69 for <ipsec@ietf.org>; Fri, 26 Mar 2010 15:28:57 -0700 (PDT)
Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id o2QMRjls017931; Sat, 27 Mar 2010 07:27:45 +0900 (JST) env-from (kobara_conf@m.aist.go.jp)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=m.aist.go.jp; s=aist; t=1269642466; bh=vwwJRfsunJQZVN+3DQNfpOzYx43UyKshxCLxCUDzpaQ=; h=From:Date:Message-ID; b=pNdhWlvQc421D1ytQx/RzeoAyV6Pqogo3bmtz9qJYaW+d9TBNszrKAvEIeOL8UG6K 8eLD40ffR16p/SXRS2Wp0Y10xVdghL+Z8q57WF/F9WVtqyfIW1Da0wn5bZMu5iXSHc n8+FYyXjmm6RjksOVFg8hUBHNAPK6iK93KA76/7I=
Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id o2QMRjqG016070; Sat, 27 Mar 2010 07:27:45 +0900 (JST) env-from (kobara_conf@m.aist.go.jp)
Received: by smtp3.aist.go.jp with ESMTP id o2QMRgPl024021; Sat, 27 Mar 2010 07:27:42 +0900 (JST) env-from (kobara_conf@m.aist.go.jp)
From: Kaz Kobara <kobara_conf@m.aist.go.jp>
To: latten@austin.ibm.com, mlepinski@bbn.com, kent@bbn.com
Date: Sat, 27 Mar 2010 07:27:47 +0900
Message-ID: <019801cacd33$9129c3a0$b37d4ae0$@aist.go.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcrNLd2v1FtQCtn+Toyd9NY0qei8ZgAAiiWgAADYLcA=
Content-Language: ja
Cc: ipsec@ietf.org, avagarwa@redhat.com
Subject: Re: [IPsec] Question about RFC 5114
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ipsec>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Mar 2010 22:28:59 -0000
Hi Joy When one uses a subgroup like defined in RFC 5114, q (and (p-1)/2q ) must be chosen carefully. Precisely: 1. q must be a prime number of 2k or more bits where k is a security parameter. 2. q must be a divisor of ((p - 1) / 2). 3. Every factors of (p - 1) / (2q) must also be primes comparable to or greater than q in size. p corresponding such q is called a "secure prime." X is simply to shift the range of 0 to q-2 to 1 to q-1 to exclude 0 (since g^0 mod p = 1). Kaz > -----Original Message----- > From: ipsec-bounces@ietf.org [mailto:ipsec-bounces@ietf.org] On Behalf Of > Joy Latten > Sent: Saturday, March 27, 2010 6:25 AM > To: mlepinski@bbn.com; kent@bbn.com > Cc: ipsec@ietf.org; avagarwa@redhat.com > Subject: [IPsec] Question about RFC 5114 > > Hi, > > I am looking to implement modp groups 22, 23, and 24 into IKE but have a > question. > > RFC 5114 gives the prime, p, the generator, g and a subgroup, q, with a > specific size... > > Because prior rfcs for modp groups did not specify a "q", I was not sure > if this was a new constant or just stating a size requirement? > So I took a look at NIST 800-56A. In particular, > > 5.6.1 Private/Public Key Pair Generation > > 5.6.1.1 FFC Key Pair Generation > For the FFC schemes, each static and ephemeral private key and public > key shall be generated using an Approved method and the selected valid > domain parameters (p, q, g{, SEED,pgenCounter}) (see Appendix B of FIPS > 186-3). > ... > > I then took a look at FIPS 186-3, Appendix B, which documents 2 methods > for finite field cryptography (FFC) key pair generation. > For example, one method is "Key Pair Generation Using Extra Random > Bits". It actually states that "q" is an input and it is used to do an > additional computation to compute "x". > > I am somewhat confused, are the modp groups 22, 23 & 24 suppose to use > one of these new methods and that is why "q" is given in rfc 5114? > Or am I to ignore this and just continue with existing way > where "q" is not used and there aren't any additional computations > to compute x. > > I am not even sure this is correct place to ask, but any advice > would be welcome. > > regards, > Joy > > > (Cut-n-paste from FIPs 186-3 below to show input and process) > > Input: > (p, q, g) The subset of the domain parameters that are used > for this process. p, q and g shall either be > provided as integers during input, or shall be > converted to integers prior to use. > > Process: > 1. N = len(q); L = len(p). Comment: Check that the (L, N) pair > is specified in Section 4.2. > 2. If the (L, N) pair is invalid, then return an ERROR indicator, > Invalid_x, and Invalid_y. > 3. requested_security_strength = the security strength associated > with the (L, N) pair; see SP 800-57. > 4. Obtain a string of N+64 returned_bits from an RBG with a security > strength of requested_security_strength or more. If an ERROR > indication is returned, then return an ERROR indication, > Invalid_x, and Invalid_y. > 5. Convert returned_bits to the (non-negative) integer c (see > Appendix C.2.1). > 6. x = (c mod (q–1)) + 1. Comment: 0 ≤ c mod (q–1) ≤ q–2 and > implies that 1 ≤ x ≤ q–1. > 7. y = gx mod p. > 8. Return SUCCESS, x, and y. > > _______________________________________________ > IPsec mailing list > IPsec@ietf.org > https://www.ietf.org/mailman/listinfo/ipsec
- [IPsec] Question about RFC 5114 Joy Latten
- Re: [IPsec] Question about RFC 5114 Kaz Kobara
- Re: [IPsec] Question about RFC 5114 Dan Harkins
- Re: [IPsec] Question about RFC 5114 Scott Fluhrer (sfluhrer)
- Re: [IPsec] Question about RFC 5114 Kaz Kobara
- Re: [IPsec] Question about RFC 5114 Scott Fluhrer (sfluhrer)
- Re: [IPsec] Question about RFC 5114 Joy Latten
- Re: [IPsec] Question about RFC 5114 Richard Barnes
- Re: [IPsec] Question about RFC 5114 Joy Latten