Re: [kitten] draft-hansen-scram-sha256 and incorporating session hashing for channel binding

Nico Williams <nico@cryptonector.com> Thu, 28 May 2015 20:37 UTC

Return-Path: <nico@cryptonector.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 4B4EA1A8937 for <kitten@ietfa.amsl.com>; Thu, 28 May 2015 13:37:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
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 6V6eCEoQmYHu for <kitten@ietfa.amsl.com>; Thu, 28 May 2015 13:37:00 -0700 (PDT)
Received: from homiemail-a63.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id B8D391A8932 for <kitten@ietf.org>; Thu, 28 May 2015 13:36:58 -0700 (PDT)
Received: from homiemail-a63.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a63.g.dreamhost.com (Postfix) with ESMTP id 850B92F407A; Thu, 28 May 2015 13:36:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=xYkjfrGlYV3HNZ guXkpHN7Lp9Bw=; b=xj5pBiLM8iPf0GpJjPKaE8pYx6dwyH3MikEUC7eyHdp7Zc 3UKkmC6JuUMxbJCyYujQzl2wES9xRy5CD7nxkdbeT4mX+HxqI2qhAs/sUSJZHsjN ZUDc/lXUVmtqtMv1IL8AbOYgbqI0Fn4sJ0qaAWgkIy9hnAabn8QH3YNDMYZ2M=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a63.g.dreamhost.com (Postfix) with ESMTPA id 3A1492F4076; Thu, 28 May 2015 13:36:57 -0700 (PDT)
Date: Thu, 28 May 2015 15:36:56 -0500
From: Nico Williams <nico@cryptonector.com>
To: Simon Josefsson <simon@josefsson.org>
Message-ID: <20150528203654.GI1733@localhost>
References: <54ECABD8.3090902@att.com> <87zj82f1yj.fsf@latte.josefsson.org> <54F4B8B8.8090406@isode.com> <555FC6CF.5020306@att.com> <20150523162728.5b6b63cd@latte.josefsson.org> <5564F27D.70109@att.com> <20150526223206.GE27628@localhost> <20150528171122.2bceebb6@latte.josefsson.org> <20150528164000.GF1733@localhost> <20150528220142.374f2626@latte.josefsson.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20150528220142.374f2626@latte.josefsson.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/JUNUJJrQSOolsSIfxRAPKJaPACs>
Cc: "kitten@ietf.org" <kitten@ietf.org>
Subject: Re: [kitten] draft-hansen-scram-sha256 and incorporating session hashing for channel binding
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: Thu, 28 May 2015 20:37:01 -0000

On Thu, May 28, 2015 at 10:01:42PM +0200, Simon Josefsson wrote:
> > On Thu, May 28, 2015 at 05:11:22PM +0200, Simon Josefsson wrote:
> > > > > You then go on to say: "Personally, I would prefer to change to
> > > > > another mandatory channel binding that is secure for all TLS
> > > > > versions."
> > > > 
> > > > This is not really appropriate here because it's the applications
> > > > that need to do this, and we can't say anything here about this
> > > > that will force them to.
> > > 
> > > > A reference to TLS-SESSION-HASH of the same level (i.e., normative
> > > > or informative) as RFCs 5246 and 5929 would be nice.
> > > 
> > > I believe that what is required is
> > > 
> > >   1) scram-sha256 has a normative reference to tls-session-hash; or
> > > 
> > >   2) tls-session-hash uses an Update: that makes it applicapable to
> > > all TLS versions, and that it is clarified (if not already the
> > > case) that tls-session-hash must be used; or
> > 
> > And RFC5929.
> 
> That's not strictly necessary, is it?  5929 refer to TLS, so if
> tls-session-hash update TLS specs, 5929 indirectly refer too
> tls-session-hash.  At least that is how I would interprete it.  But
> I'm all for making things explicit.

Less not-strictly-necessary than the change you're proposing to SCRAM...

After all, it'd be useful if anyone reading RFC5929 saw that there's a
security consideration when using TLS w/o the session hash (namely: that
tls-unique is insecure when used with connections made by resuming
sessions).

> > My vote is for (2).  I don't mind (1) in addition, but I want (2).
> 
> There is precedent for that for TLS, several of the security fixes
> Update:'s all TLS RFCs.

Yes.

> > >   3) scram-sha256 uses a new channel binding that is secure with or
> > >   without tls-session-hash.
> > 
> > We disagree as to (3).  This is advice we can give to apps in the
> > security considerations section, not something we can force a SASL or
> > GSS mechanism to do because API-wise the mechanism doesn't get a
> > choice.
> 
> I don't understand this...

The mechanism is not in a position to use any one CB type or other.  The
application chooses the CB type.

> > > I believe 1) and 2) would be worse than 3) for the next ~5 years or
> > > so, and things being equal after that.  SASL libraries/applications
> > > rarely have any influence over TLS internals, but they directly
> > > influence the channel binding used.  Using another channel binding
> > > for [...]
> > 
> > No, they don't.  Certainly not GSS ones, and the SASL implementations
> > I'm familiar with don't either.
> > 
> > E.g., GSS_Init_sec_context() doesn't get a handle to a channel to bind
> > to, it only gets the channel binding as already extracted by the app.
> > Worse, GSS_Init_sec_context() doesn't even get the channel binding
> > type.
> 
> ...and I don't understand any of this.

I don't understand how you can't understand it.

GSS_Init_sec_context() doesn't have access to the TLS (or whatever)
channel, and therefore the mechanism can't be involved in getting the
channel binding.

> A new channel binding in SCRAM-SHA256 would work exactly the same way
> as tls-unique works in SCRAM-SHA1 today.
> 
> In my SASL library, the app has to provide the tls-unique channel
> binding (either upfront or in a callback) when SCRAM-SHA1 is used.  If
> I would implement SCRAM-SHA256, and assuming that document referred
> directly to tls-unique-prf, the app would need to supply the
> tls-unique-prf data upfront or in a callback when SCRAM-SHA256 is
> used.  I don't see any problem with this.  The channel binding type is
> hardcoded with the SASL mechanism name.

The CB type is NOT a part of the mechanism name.  The CB type name is
prefixed to the CB data in the SASL/GS2 case (but not in the non-SASL
GSS case).  The best SCRAM-SHA256 could do is detect that tls-unique is
used in the SASL/GS2 case and fail.

Nico
--