Re: [IPsec] NUDGE: WG Last Call for draft-ietf-ipsecme-dh-checks

"Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com> Mon, 08 April 2013 23:15 UTC

Return-Path: <sfluhrer@cisco.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C3AFC21F8E46 for <ipsec@ietfa.amsl.com>; Mon, 8 Apr 2013 16:15:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JH3lUi7Flxkp for <ipsec@ietfa.amsl.com>; Mon, 8 Apr 2013 16:15:03 -0700 (PDT)
Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by ietfa.amsl.com (Postfix) with ESMTP id 7DE2621F8DBF for <ipsec@ietf.org>; Mon, 8 Apr 2013 16:15:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4120; q=dns/txt; s=iport; t=1365462903; x=1366672503; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=40fP6OJePQTHbbTMTcBNxeJVq57MRawZEYhUn5hdc5E=; b=M6UNeiXCiwkL19AxCc/qOYHlRRRGUQX4iol2T2Cq7kuakf0HwK+uhB5l nJgFnyuM+osSPTAjbfBlUXYCaFdl7J9sPZE8S7CdGyIQuYTFgSpNzpBWK dC36+g5NaWlrF5CLhFio/51mrFLud96IWK7MeZYrhnAcoTf+ugtf8GD9M E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AiwFAIJOY1GtJV2Z/2dsb2JhbABRgwY2wTGBDBZ0gh8BAQEDAQEBARodNBcEAgEIDgMEAQEBChQJBycLFAkIAgQBEgiIBgYMvWCOciYSBl2BfWEDknI6hGmPbYJ+DYIo
X-IronPort-AV: E=Sophos;i="4.87,434,1363132800"; d="scan'208";a="196215528"
Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by rcdn-iport-1.cisco.com with ESMTP; 08 Apr 2013 23:15:03 +0000
Received: from xhc-rcd-x08.cisco.com (xhc-rcd-x08.cisco.com [173.37.183.82]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id r38NF2r0026816 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 8 Apr 2013 23:15:02 GMT
Received: from xmb-rcd-x04.cisco.com ([169.254.8.60]) by xhc-rcd-x08.cisco.com ([173.37.183.82]) with mapi id 14.02.0318.004; Mon, 8 Apr 2013 18:15:02 -0500
From: "Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com>
To: Andrey Jivsov <openpgp@brainhub.org>, "ipsec@ietf.org" <ipsec@ietf.org>
Thread-Topic: [IPsec] NUDGE: WG Last Call for draft-ietf-ipsecme-dh-checks
Thread-Index: AQHONKKDikpZdmEiWUOFvhKCnr1P7JjNQCMA//+s6WA=
Date: Mon, 8 Apr 2013 23:15:01 +0000
Message-ID: <A113ACFD9DF8B04F96395BDEACB34042090604F1@xmb-rcd-x04.cisco.com>
References: <9F821C79-A855-4060-A356-ED8E5C50048B@vpnc.org> <51634894.1030306@brainhub.org>
In-Reply-To: <51634894.1030306@brainhub.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.32.244.83]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [IPsec] NUDGE: WG Last Call for draft-ietf-ipsecme-dh-checks
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Mon, 08 Apr 2013 23:15:04 -0000

> -----Original Message-----
> From: ipsec-bounces@ietf.org [mailto:ipsec-bounces@ietf.org] On Behalf
> Of Andrey Jivsov
> Sent: Monday, April 08, 2013 6:46 PM
> To: ipsec@ietf.org
> Subject: Re: [IPsec] NUDGE: WG Last Call for draft-ietf-ipsecme-dh-checks
> 
> Sec 2.2:
> > It MUST check both that the peer's public value is in range (1 < r
> >       < p-1) and that r**q = 1 mod p (where q is the size of the
> >       subgroup, as listed in the RFC).
> 
> Would it make sense to specify a more economical test for strong prime
> groups?

"Strong groups", that is, groups with (p-1)/2 prime, are listed in section 2.1; and yes, the test there is considerably cheaper.

> 
> If q is meant to be p = q*2+1, there are only two possibilities for the value <
> p-1 received from the peer to be in the wrong subgroup. One of them is 1,
> which is ruled out by the check above. Another one is g^q.
> It's a fixed quantity for the given modp group. Seems like a memcmp with a
> fixed quantity g^q is the best way to address the problem.

Actually, g^q == 1; I don't think that's what you mean.

Now, there is certainly the possibility of the value being in the wrong subgroup; but there are far more than two possibilities.  Here's the entire list for strong groups:

1; that's rejected by the test in section 2.1
p-1; that's also rejected by the test in section 2.1
primitive elements; those are elements r which have order p-1.  These are not rejected by the test.

(in addition, there are KE values that don't correspond to actual group elements; 0 and values >= p; those are rejected too).

Now, there are q-1 different primitive elements; that's more than we could reasonably list.  We could specify a test to reject primitive elements; however, that test isn't cheap (it can be done cheaper than the full r**q==1 test, nevertheless, not cheaply.  In addition, an attacker injecting a primitive element could use it to deduce the lsbit of the private exponent; however that cannot deduce any more than that.  I don't believe that the expense of the full test is worth protecting one bit of the exponent.

> 
> On 04/08/2013 02:46 PM, Paul Hoffman wrote:
> > [[ So far, we have received only *one* review of this document, from
> > Tero. If we don't receive more reviews, the document might not
> > progress due to lack of interest. Please review this document within
> > the next week and contribute your review to the list. ]]
> >
> > Greetings. This is the start of the WG Last Call for
> > draft-ietf-ipsecme-dh-checks; the WG period will end in two weeks, on
> > April 15. The current draft is available at
> > http://tools.ietf.org/html/draft-ietf-ipsecme-dh-checks-01
> >
> > Given that this will be a Standards Track document, it is important for it to
> be reviewed by as many people as possible. Possible results of individual
> reviewing the document are:
> >
> > - "Looks fine, please publish"
> >
> > - "Looks fine, here are some comments"
> >
> > - "Has some problems, here they are"
> >
> > - Other things of that sort
> >
> > Many people on this mailing list are IPsec implementers but are mostly or
> completely silent on the mailing list. If you are one of those people, doing a
> WG Last Call review is a good way to participate usefully in the WG. Please
> strongly consider (a) reading the current draft and (b) sending a message to
> the list with your short or long review. If there are too few reviews on this
> document, we could get pushback from the IESG about the document.
> >
> > --Paul Hoffman
> > _______________________________________________
> > IPsec mailing list
> > IPsec@ietf.org
> > https://www.ietf.org/mailman/listinfo/ipsec
> >
> > _______________________________________________
> > IPsec mailing list
> > IPsec@ietf.org
> > https://www.ietf.org/mailman/listinfo/ipsec
> >
> 
> _______________________________________________
> IPsec mailing list
> IPsec@ietf.org
> https://www.ietf.org/mailman/listinfo/ipsec