Re: [kitten] SPAKE preauth: generation of SPAKE2 secret input

Simo Sorce <simo@redhat.com> Mon, 18 May 2015 10:17 UTC

Return-Path: <ssorce@redhat.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5CE3D1A887F for <kitten@ietfa.amsl.com>; Mon, 18 May 2015 03:17:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.511
X-Spam-Level:
X-Spam-Status: No, score=-1.511 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 SN2NHhToWGFs for <kitten@ietfa.amsl.com>; Mon, 18 May 2015 03:17:30 -0700 (PDT)
Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D08621A887E for <kitten@ietf.org>; Mon, 18 May 2015 03:17:30 -0700 (PDT)
Received: from zmail17.collab.prod.int.phx2.redhat.com (zmail17.collab.prod.int.phx2.redhat.com [10.5.83.19]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4IAHSGI026380; Mon, 18 May 2015 06:17:28 -0400
Date: Mon, 18 May 2015 06:17:26 -0400 (EDT)
From: Simo Sorce <simo@redhat.com>
To: Nico Williams <nico@cryptonector.com>
Message-ID: <1093182203.442448.1431944246604.JavaMail.zimbra@redhat.com>
In-Reply-To: <20150514154721.GC7287@localhost>
References: <x7dk2wd6355.fsf@equal-rites.mit.edu> <20150512214740.GT7287@localhost> <1431525091.3260.26.camel@redhat.com> <CACsn0cm9AEG+oi8S+trhvyHpFFLF=-tG4Qazp5e6SgnS037K+Q@mail.gmail.com> <20150513160549.GV7287@localhost> <CACsn0cnO0To1a77x0Tp+Qk414Zv_yqnoC-wuS4vgJbQN+mV+7Q@mail.gmail.com> <20150514154721.GC7287@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [10.4.164.1, 10.5.100.50]
X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF37 (Linux)/8.0.6_GA_5922)
Thread-Topic: SPAKE preauth: generation of SPAKE2 secret input
Thread-Index: /spYlvA/dkjSrHFqQ7PlKqQi4xSIQA==
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/AUReV6HfzpnW1Ev3pCBITKknIsw>
Cc: kitten@ietf.org
Subject: Re: [kitten] SPAKE preauth: generation of SPAKE2 secret input
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 May 2015 10:17:32 -0000


----- Original Message -----
> From: "Nico Williams" <nico@cryptonector.com>
> To: "Watson Ladd" <watsonbladd@gmail.com>
> Cc: kitten@ietf.org
> Sent: Thursday, May 14, 2015 5:47:22 PM
> Subject: Re: [kitten] SPAKE preauth: generation of SPAKE2 secret input
> 
> On Wed, May 13, 2015 at 09:15:19PM -0700, Watson Ladd wrote:
> > On May 13, 2015 9:05 AM, "Nico Williams" <nico@cryptonector.com> wrote:
> > > > w is not distributed uniformly: far from it. The question of how far
> > >
> > > That depends on how its salted.  For our purposes, in practice it's not.
> > 
> > Not true: w comes from a much smaller list of values. If it was
> > uniformly distributed over a wide range, we could use it as a key
> > directly.
> 
> For Kerberos (the context in which we're discussing SPAKE2) w would be
> derived from user principal long-term keys, which are basically a
> PBKDF2() application to the password and salt.  The salt can in
> principle be uniformly distributed and randomly chosen, but it is
> public, so w has no more entropy than the password, but w can be as
> uniformly distributed as the salt.
> 
> In practice the salt is not chosen randomly but derived from the user's
> principal name.  So w does not (will not) be uniformly distributed.

This is not so clear cut, and depend on deployments.
A truly random "special" salt can be used (and in fact we use it in FreeIPA),
and there is also the sad situation with the RC4-HMAC key that is not salted
at all ...

This is just nitpicking, but hows that we have a wide range of different keys
we may end up using in deployments and we cannot assume uniformity even if in
some cases we may get quite close.

Simo.

> In any case, there's a big difference between "uniformly distributed"
> and "difficult to guess".  We want a PAKE precisely because user
> principal long-term keys are derived from simple passwords and used to
> encrypt messages which are then subject to off-line dictionary attacks.
> 
> Nico
> --
> 
> _______________________________________________
> Kitten mailing list
> Kitten@ietf.org
> https://www.ietf.org/mailman/listinfo/kitten
> 

--

-- 
Simo Sorce * Red Hat, Inc. * New York