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

Andrey Jivsov <> Tue, 09 April 2013 00:20 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 3D57921F8D2C for <>; Mon, 8 Apr 2013 17:20:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.437
X-Spam-Status: No, score=-0.437 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_NET=0.611, RDNS_NONE=0.1]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id w7BE95nw3U7N for <>; Mon, 8 Apr 2013 17:20:13 -0700 (PDT)
Received: from ( [IPv6:2001:558:fe2d:44:76:96:27:227]) by (Postfix) with ESMTP id A916721F8A85 for <>; Mon, 8 Apr 2013 17:20:13 -0700 (PDT)
Received: from ([]) by with comcast id MZtv1l00B1u4NiLACcLDQt; Tue, 09 Apr 2013 00:20:13 +0000
Received: from [] ([]) by with comcast id McLC1l0092g33ZR8hcLC9D; Tue, 09 Apr 2013 00:20:13 +0000
Message-ID: <>
Date: Mon, 08 Apr 2013 17:17:43 -0700
From: Andrey Jivsov <>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2
MIME-Version: 1.0
To: "Scott Fluhrer (sfluhrer)" <>
References: <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=q20121106; t=1365466813; bh=bJ9h16yAtKjQvCBABUthKB8q/h165Y256udUehPGvIY=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=geryYoswRwsP/1liGsbp5DJELrqxc4HPshj0XzT3b6vJDNJpEZFESLq7pLFn6WQyY FuMrJb6heBPWzAYviE45kA2aNQ5WDXAu1toGE1Gnvs4vAdLuTCZ3gHiYnp+/Xr4inO Wrj4mYCmhkNBr+athnvTFUIhziVIL3O2OaZPJ10CfZRdEPf26SYDEmvt1AolxyRbyL 9FGjzxOl8ybYX2z4cTbBeryW0GoP2EbOUl24Mlj3ZeO3LTIUjWpisY1LKG7aA0GhOS HmaObfC3uueZrUhuzfE8KAbgg5FffWYhcA+y+gEBkjTltwJ3KOUviQRiUHQybGHRuZ Gwxwq4loYVhgw==
Cc: "" <>
Subject: Re: [IPsec] NUDGE: WG Last Call for draft-ietf-ipsecme-dh-checks
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of IPsec protocols <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 09 Apr 2013 00:20:14 -0000

Sorry, I was scanning too quickly.

I meant section 2.1 primes, the primes in the form (renaming my earlier 
definition) p = k*2+1.

Wouldn't receiving g^k be as much of a problem as receiving 1 for the 
public value? No matter what my private exponent is, the shared secret 
will be either of the two values.

On 04/08/2013 04:15 PM, Scott Fluhrer (sfluhrer) wrote:
>> -----Original Message-----
>> From: [] On Behalf
>> Of Andrey Jivsov
>> Sent: Monday, April 08, 2013 6:46 PM
>> To:
>> 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
>>> 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 mailing list
>> _______________________________________________
>> IPsec mailing list