Re: [IPsec] PAKE selection: SPSK

Dennis Kügler <dennis.kuegler@bsi.bund.de> Tue, 01 June 2010 13:18 UTC

Return-Path: <dennis.kuegler@bsi.bund.de>
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 8FDFF28C117 for <ipsec@core3.amsl.com>; Tue, 1 Jun 2010 06:18:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.748
X-Spam-Level:
X-Spam-Status: No, score=-2.748 tagged_above=-999 required=5 tests=[AWL=-0.600, BAYES_50=0.001, HELO_EQ_DE=0.35, J_CHICKENPOX_14=0.6, J_CHICKENPOX_37=0.6, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
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 Jdp7tXvR3z8F for <ipsec@core3.amsl.com>; Tue, 1 Jun 2010 06:18:18 -0700 (PDT)
Received: from m3-bn.bund.de (m3-bn.bund.de [77.87.228.75]) by core3.amsl.com (Postfix) with ESMTP id 09D3028C11D for <ipsec@ietf.org>; Tue, 1 Jun 2010 06:18:16 -0700 (PDT)
Received: from m3.mfw.bn.ivbb.bund.de (localhost [127.0.0.1]) by m3-bn.bund.de (8.13.8/8.13.8) with ESMTP id o51DI2UF005407 for <ipsec@ietf.org>; Tue, 1 Jun 2010 15:18:02 +0200 (CEST)
Received: (from localhost) by m3.mfw.bn.ivbb.bund.de (MSCAN) id 4/m3.mfw.bn.ivbb.bund.de/smtp-gw/mscan; Tue Jun 1 15:18:02 2010
X-Virus-Scanned: by amavisd-new at bsi.bund.de
From: Dennis Kügler <dennis.kuegler@bsi.bund.de>
Organization: BSI Bonn
To: Dan Harkins <dharkins@lounge.org>
Date: Tue, 01 Jun 2010 15:17:44 +0200
User-Agent: KMail/1.9.10 (enterprise35 20100401.1112527)
References: <3ed604c92cb4ccc78ffaf0486db97ff7.squirrel@www.trepanning.net> <201005261418.56567.dennis.kuegler@bsi.bund.de> <b04b32d1deae1ee28a02e89a982347d8.squirrel@www.trepanning.net>
In-Reply-To: <b04b32d1deae1ee28a02e89a982347d8.squirrel@www.trepanning.net>
X-KMail-QuotePrefix: >
MIME-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <201006011517.44654.dennis.kuegler@bsi.bund.de>
X-AntiVirus: checked by Avira MailGate (version: 3.1.2; AVE: 8.2.1.242; VDF: 7.10.7.208; host: sgasmtp2.bsi.de); id=32241-G3AdRA
Cc: ipsec@ietf.org
Subject: Re: [IPsec] PAKE selection: SPSK
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: Tue, 01 Jun 2010 13:18:19 -0000

Hi Dan,

Let's have a closer look at the patent.

>   You don't mention any specific claim from the SPEKE patent so let me
> address the first independent claim (there are many claims dependent on
> that one). The patent I'm referring to is US 6,792,533 dated Sept 14, 2004.
> The claim says:
>
>   "A cryptographic method for providing authentication, comprising:

What's claimed is a method comprising four parts. All of them are contained in 
SPSK.


>      providing a password-based value to a first party and a second party;

A value derived from the password is given to (calculated by) both parties. 
This is clearly the case in SPSK as psk is derived from the password.


>      selecting a parameter based on said password-based value, said
>         parameter defining one of a plurality of unauthenticated key
>         distribution techniques;

SPSK selects a parameter, SKE, from the password-based value psk. SKE is then 
used as the generator for a (masked) Diffie-Hellman key agreement. Due to the 
group generator SKE, a pluralty of key distribution techniques is defined - 
one for each possible (and secret) value of SKE.


>      generating by said first party, in cooperation with said second party,
>         a cryptographic key based on said one of the plurality of
>         unauthenticated key distribution techniques, wherein said second
>         party cooperates in generating said cryptographic key by using
>         said one of the plurality of unauthenticated key distribution
>         techniques defined by said first value; and

The derived shared secret ss is a cryptographic key derived from a masked 
Diffie-Hellman key agreement based on the secret group generator SKE.

>      providing authentication of said first party to said second party
>         based on said cryptographic key."

This is the calculation of the Tag using the cryptographic key ss.

>
>   Now first of all, that is very broadly worded. Every password-based
> protocol provides a password to the first party and second party. But
> there's more to this claim so SPEKE doesn't cover every single protocol
> that distributes and uses passwords.

Actually, in contrast to other patents this one is rather clear. It describes 
exactly a key distribution mechanism based on a parameter derived from a 
password. This is what SPSK does similarly.

>
>   The next part talks about selecting a parameter based on the password
> value and dragonfly certainly does that but the important part of this
> portion of the claim, and the following part of the claim, is the
> "plurality of unauthenticated key distribution techniques". What is that?

See above. By selecting an alternative group generator (SKE instead of g) and 
using an anonymous (and masked) Diffie-Hellman key exchange a plurality of 
unauthenticated key distribution techniques is defined.

>
>   There are different kinds of public key distribution systems where there
> is a "private key" and a "public key" which is based on the "private
> key". Earlier in the descriptive portion of the patent (which is not
> part of a claim but can be used to interpret a claim) it says "SPEKE can
> also use other unauthenticated public-key distribution systems, such as
> the Modified Diffie-Hellman" and goes on to show an example of that. I
> don't believe that the Modified D-H alone comprises a "plurality of
> unauthenticated key distribution techniques." I would also imagine that
> a static-ephemeral D-H or a static-static D-H that used a password-derived
> parameter to perform that particular type of unauthenticated key
> distribution technique would probably be covered.

I don't get your point. This is probably to make clear that e.g. a masked 
Diffie-Hellman is also covered by the patent???

>
>   What is common on all these unauthenticated key distribution
> techniques is how a public key based on the private key is distributed
> to the other party. The private key is communicated in an obfuscated
> form based on the discrete logarithm problem-- e.g. pub = g^priv mod p.
> That is not done in dragonfly.

There are two general approaches: The first approach is to "scramble" the 
public key (EKE) and to keep the private key unaltered and the other approach 
is to send the public key in clear but to indirectly alter the private by 
modifying the parameters.

>
>   In dragonfly the private key is obfuscated by adding it to a random
> number modulus the order of the group. The random number is unmasked
> in a fashion that gives the private key to the second party in a form
> that does not let it know the private key. Such a technique is new and
> novel and not part of any known "plurality of unauthenticated key
> distribution techniques".

The obfuscation is cryptographically not sound. As you transmit both Scalar = 
(private + mask) and Element = SKE^(-mask) simultaneously anyone can compute 
the public key SKE^private = Element*SKE^Scalar (in which case we're back to 
SPEKE). This construction however unnecessarily risks to leak the private 
key, as any bias in the random number generation will reveal information on 
the private key. Especially when computing random numbers modulo a prime 
preventing a bias is not trivial.


>
>   So it is my contention that for this claim to apply then both a
> password-based parameter must be used AND that password-based parameter
> must be used with a known technique of unauthenticated key distribution.
> It is not and this claim does not apply to dragonfly.

I disagree. It does very well apply to SPSK/dragonfly.

>
>   If it was not claim 1 that you were referring to above then please
> say exactly what claim in the SPEKE patent you are talking about.
>
> > - "Dragonfly is secure and has received cryptographic review". Please
> > provide
> > a reference to the cryptographically reviewed document.
>
>   Both the IEEE 802.11 TGs Draft and the EAP-pwd variant have been
> reviewed.

So nothing has been published and has been reviewed by the cryptographic 
community?

>
> > - The construction used for computing the group generator is susceptible
> > to
> > side channel (timing) attacks and may leak the shared password. I'd
> > therefore
> > recommend to replace the randomized search algorithm by a deterministc
> > algorithm.
>
>   I had a discussion about that. The IEEE 802.11 TGs Draft had a password
> element created based on the password before the exchange started
> (it was computed a configuration time when a particular group was
> selected). Then, when the exchange started the identities of the two
> parties were run through the random function and used in the "scalar-op"
> to derive a pair-wise unique element with which to do dragonfly. This
> would foil the side channel attack. But I was convinced that this was not
> so important and eliminated the extra step to provide ease of analysis.
> If you think this is important the SPSK draft could certainly introduce
> this technique to get around a side channel attack.

I think that should be addressed.

>
>   I'm not so sure how important that is though (basically I was convinced
> it's not so important). If you know I can find a solution to the curve the
> first time you can eliminate some passwords from the pool of potential
> passwords but you don't know which ones unless you have run them all
> through the algorithm beforehand. And even if you have run all possible
> password through the algorithm it certainly doesn't leak the shared
> password, it just allows the attacker to eliminate some passwords from
> the pool of potential passwords. And to do so this attack has to be
> mounted and that is not a trivial attack.

If the attacker can eleminate only a few passwords every time you execute the 
protocol he's done with the attack quickly.

Best regards,

Dennis