
Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5S8Afwh017811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 28 Jun 2007 01:10:41 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id l5S8Af6N017810; Thu, 28 Jun 2007 01:10:41 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-sasl@mail.imc.org using -f
Received: from brmea-mail-2.sun.com (brmea-mail-2.Sun.COM [192.18.98.43]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5S8AdlP017798 for <ietf-sasl@imc.org>; Thu, 28 Jun 2007 01:10:40 -0700 (MST) (envelope-from Chris.Newman@Sun.COM)
Received: from fe-amer-03.sun.com ([192.18.108.177]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l5S8AceL016775 for <ietf-sasl@imc.org>; Thu, 28 Jun 2007 08:10:39 GMT
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006)) id <0JKC00M016GYK000@mail-amer.sun.com> (original mail from Chris.Newman@Sun.COM) for ietf-sasl@imc.org; Thu, 28 Jun 2007 02:10:38 -0600 (MDT)
Received: from [10.0.1.21] (216-165-236-126.championbroadband.com [216.165.236.126]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006)) with ESMTPSA id <0JKC002P16POLME0@mail-amer.sun.com>; Thu, 28 Jun 2007 02:10:38 -0600 (MDT)
Date: Thu, 28 Jun 2007 01:10:36 -0700
From: Chris Newman <Chris.Newman@Sun.COM>
Subject: Re: SCRAM-04 questions
In-reply-to: <467424D9.3AA5@xyzzy.claranet.de>
To: Frank Ellermann <nobody@xyzzy.claranet.de>, ietf-sasl@imc.org
Message-id: <D42381CB82D2149FD38D3234@446E7922C82D299DB29D899F>
MIME-version: 1.0
X-Mailer: Mulberry/3.1.6 (Mac OS X)
Content-type: text/plain; format=flowed; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
References: <467424D9.3AA5@xyzzy.claranet.de>
Sender: owner-ietf-sasl@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-sasl/mail-archive/>
List-ID: <ietf-sasl.imc.org>
List-Unsubscribe: <mailto:ietf-sasl-request@imc.org?body=unsubscribe>

Frank Ellermann wrote on 6/16/07 19:58 +0200:
> Hi, I tried to implement SCRAM-04 based on MD5.  Some problems:
>
> 1 - The I-D uses B64 as specified in RFC 2045, but the example
>     strings s=PxR/wv+epq and c=QWBv+XbwcaI/wp are "ambiguous",
>     compare RFC 4648.
>
>     Do you mean s=PxR/wv+epqA= and c=QWBv+XbwcaI/wpA= ?
>
>     For n= and a= names the I-D encodes '=' as '=3D', and maybe
>     you tried to avoid B64 '=' padding using the UTF-7 version.
>
>     IMO you could just use hex. instead B64 for s=, c=, p=, and
>     v= (at least for p= and v= the encoded length is irrelavant).

The examples are placeholders and don't contain valid data yet.  This is fairly 
preliminary -- more about circulating the idea than "implement now" level.  I'm 
hoping it will merge with the HEXA proposal and add channel bindings.  But that 
decision will be made by the primary editor (not me).

> 2 - The terms in the algorithm overview confused me.  There's a
>     StoredKey = H( ClientKey ) with ClientKey = H( SaltedPw ),
>     but the server needs ServerKey = HMAC( SaltedPw, salt ).  So
>     apparently the server has to "store" the SaltedPw, while a
>     client likely doesn't store any password at all, it gets the
>     original password as input.
>
>     If that's correct I propose to rename the terms:
>
>     StoredKey := Hi( HMAC( password, salt )) /* was SaltedPw */
>     ClientKey := H( StoredKey )
>     ServerKey := HMAC( StoredKey, salt )
>     ServerSig := HMAC( ServerKey, Msg )

An attacker who gets the saltedPw has the ability to impersonate the client, so 
having the server store that would remove a nice security property of SCRAM. 
The server should instead store the quad { username, salt, H(ClientKey), 
ServerKey} (ServerKey is only necessary if mutual authentication is performed). 
The ClientKey can't be derived from that quad so the stored information can't 
be used to impersonate the client by itself.  This is a difference from 
DIGEST-MD5 where the server stored information is plaintext equivalent and 
sufficient to impersonate the client in that realm.

> 6 - As always annotated examples with a known password will help.

Agreed.

>     Before I try to tackle v= I'd like to know if the following
>     result for p= is still correct (using MD5 as hash):

MD5 is sufficiently broken that it's unwise to use in new protocols.

                - Chris



Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5GI1wgU023203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 16 Jun 2007 11:01:58 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id l5GI1vMM023202; Sat, 16 Jun 2007 11:01:57 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-sasl@mail.imc.org using -f
Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5GI1tNd023169 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for <ietf-sasl@imc.org>; Sat, 16 Jun 2007 11:01:56 -0700 (MST) (envelope-from gis-ietf-sasl-560@gmane.org)
Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Hzcar-000471-MO for ietf-sasl@imc.org; Sat, 16 Jun 2007 20:01:49 +0200
Received: from dialin-145-254-033-064.pools.arcor-ip.net ([145.254.33.64]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <ietf-sasl@imc.org>; Sat, 16 Jun 2007 20:01:49 +0200
Received: from nobody by dialin-145-254-033-064.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <ietf-sasl@imc.org>; Sat, 16 Jun 2007 20:01:49 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: ietf-sasl@imc.org
From: Frank Ellermann <nobody@xyzzy.claranet.de>
Subject:  SCRAM-04 questions
Date:  Sat, 16 Jun 2007 19:58:49 +0200
Organization:  <URL:http://purl.net/xyzzy>
Lines: 69
Message-ID:  <467424D9.3AA5@xyzzy.claranet.de>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: dialin-145-254-033-064.pools.arcor-ip.net
X-Mailer: Mozilla 3.0 (OS/2; U)
Sender: owner-ietf-sasl@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-sasl/mail-archive/>
List-ID: <ietf-sasl.imc.org>
List-Unsubscribe: <mailto:ietf-sasl-request@imc.org?body=unsubscribe>

Hi, I tried to implement SCRAM-04 based on MD5.  Some problems:

1 - The I-D uses B64 as specified in RFC 2045, but the example
    strings s=PxR/wv+epq and c=QWBv+XbwcaI/wp are "ambiguous",
    compare RFC 4648.

    Do you mean s=PxR/wv+epqA= and c=QWBv+XbwcaI/wpA= ?

    For n= and a= names the I-D encodes '=' as '=3D', and maybe
    you tried to avoid B64 '=' padding using the UTF-7 version.

    IMO you could just use hex. instead B64 for s=, c=, p=, and
    v= (at least for p= and v= the encoded length is irrelavant).

2 - The terms in the algorithm overview confused me.  There's a
    StoredKey = H( ClientKey ) with ClientKey = H( SaltedPw ),
    but the server needs ServerKey = HMAC( SaltedPw, salt ).  So
    apparently the server has to "store" the SaltedPw, while a
    client likely doesn't store any password at all, it gets the
    original password as input.

    If that's correct I propose to rename the terms:

    StoredKey := Hi( HMAC( password, salt )) /* was SaltedPw */
    ClientKey := H( StoredKey )
    ServerKey := HMAC( StoredKey, salt )
    ServerSig := HMAC( ServerKey, Msg )

3 - Likewise the term ClientSignature in the draft confused me,
    what's sent is ClientProof = ClientKey XOR ClientSignature.

    How about using one term integrating the intermediate steps:

    ClientSig := ClientKey XOR HMAC( H( ClientKey ), Msg )

4 - The definition of the "signed" Message apparently allows to
    omit the first client and server messages.  It's clearer if
    that's not allowed, also getting rid of the "[ ]" operator:

    Msg        := FirstClientMsg + "," +
                  FirstServerMsg + "," + FinalClientMsgExcludingP

5 - The v=WxPv/siO5l+qxN4 calculation in the I-D isn't explained,
    I guess it's the B64 encoded ServerSignature.  Even if that's
    not the idea, v= can't be the same as p=WxPv/siO5l+qxN4.

6 - As always annotated examples with a known password will help.
    Before I try to tackle v= I'd like to know if the following
    result for p= is still correct (using MD5 as hash):

    MX = SCRAM( 1, 'Chris Newman', 'ClientNonce' )
    M1 = 'r=ClientNonce,n=Chris Newman'

    SALT = B64.I( 'PxR/wv+epqA=' )     /* fixed s= in scram-04 */

    MX = SCRAM( 2, M1, 128, SALT, 'ServerNonce' )
    M2 = 'r=ClientNonceServerNonce,i=128,s=PxR/wv+epqA='

    BIND = B64.I( 'QWBv+XbwcaI/wpA=' ) /* fixed c= in scram-04 */
    PASS = 'test'
    WANT = 'LYjXouG9hmwjCozUNmJViA=='

    MX = SCRAM( 3, M1, M2, BIND, PASS )
    M3 = 'r=ClientNonceServerNonce,c=QWBv+XbwcaI/wpA=,p=' || WANT

    Is WANT = 'LYjXouG9hmwjCozUNmJViA==' the correct result ?

Frank




Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5FMbuMk093499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Jun 2007 15:37:56 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id l5FMbuJ3093498; Fri, 15 Jun 2007 15:37:56 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-sasl@mail.imc.org using -f
Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5FMbteB093483 for <ietf-sasl@imc.org>; Fri, 15 Jun 2007 15:37:55 -0700 (MST) (envelope-from Nicolas.Williams@sun.com)
Received: from centralmail4brm.central.Sun.COM ([129.147.62.198]) by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l5FMbs7u013399 for <ietf-sasl@imc.org>; Fri, 15 Jun 2007 22:37:54 GMT
Received: from localhost.Central.Sun.COM (dhcp-uaus08-128-213.Central.Sun.COM [129.153.128.213]) by centralmail4brm.central.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l5FMbs74009603 for <ietf-sasl@imc.org>; Fri, 15 Jun 2007 16:37:54 -0600 (MDT)
Received: from localhost.Central.Sun.COM (localhost [127.0.0.1]) by localhost.Central.Sun.COM (8.14.1+Sun/8.14.1) with ESMTP id l5FMb0EL021293; Fri, 15 Jun 2007 17:37:00 -0500 (CDT)
Received: (from nw141292@localhost) by localhost.Central.Sun.COM (8.14.1+Sun/8.14.1/Submit) id l5FMax2N021292; Fri, 15 Jun 2007 17:36:59 -0500 (CDT)
X-Authentication-Warning: localhost.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Fri, 15 Jun 2007 17:36:59 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Michael B Allen <mba2000@ioplex.com>
Cc: Martin Rex <Martin.Rex@sap.com>, kitten@ietf.org, jhildebrand@jabber.com, linuxwolf@outer-planes.net, ietf-sasl@imc.org
Subject: Re: domain-based service names redux
Message-ID: <20070615223659.GB20623@Sun.COM>
Mail-Followup-To: Michael B Allen <mba2000@ioplex.com>, Martin Rex <Martin.Rex@sap.com>, kitten@ietf.org, jhildebrand@jabber.com, linuxwolf@outer-planes.net, ietf-sasl@imc.org
References: <466DCFBA.9020001@jabber.org> <200706122103.l5CL3B2W029985@fs4113.wdf.sap.corp> <20070615194612.GO19770@Sun.COM> <20070615174014.04105aa7.mba2000@ioplex.com> <20070615222651.GU19770@Sun.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20070615222651.GU19770@Sun.COM>
User-Agent: Mutt/1.5.7i
Sender: owner-ietf-sasl@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-sasl/mail-archive/>
List-ID: <ietf-sasl.imc.org>
List-Unsubscribe: <mailto:ietf-sasl-request@imc.org?body=unsubscribe>

To clarify, (1) means "run each service with a separate keytab (and
rcache) with entries only for the principals that you want the service
to be able to accept as."



Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5FJxV3C047869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Jun 2007 12:59:31 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id l5FJxV2Q047868; Fri, 15 Jun 2007 12:59:31 -0700 (MST) (envelope-from owner-ietf-sasl@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-sasl@mail.imc.org using -f
Received: from brmea-mail-3.sun.com (brmea-mail-3.Sun.COM [192.18.98.34]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id l5FJxUgY047861 for <ietf-sasl@imc.org>; Fri, 15 Jun 2007 12:59:30 -0700 (MST) (envelope-from Nicolas.Williams@sun.com)
Received: from centralmail4brm.central.Sun.COM ([129.147.62.198]) by brmea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l5FJxTPG022828 for <ietf-sasl@imc.org>; Fri, 15 Jun 2007 19:59:29 GMT
Received: from localhost.Central.Sun.COM (dhcp-uaus08-128-213.Central.Sun.COM [129.153.128.213]) by centralmail4brm.central.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l5FJxSPs003596 for <ietf-sasl@imc.org>; Fri, 15 Jun 2007 13:59:29 -0600 (MDT)
Received: from localhost.Central.Sun.COM (localhost [127.0.0.1]) by localhost.Central.Sun.COM (8.14.1+Sun/8.14.1) with ESMTP id l5FJwZ1k021127 for <ietf-sasl@imc.org>; Fri, 15 Jun 2007 14:58:35 -0500 (CDT)
Received: (from nw141292@localhost) by localhost.Central.Sun.COM (8.14.1+Sun/8.14.1/Submit) id l5FJwZXn021126 for ietf-sasl@imc.org; Fri, 15 Jun 2007 14:58:35 -0500 (CDT)
X-Authentication-Warning: localhost.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Fri, 15 Jun 2007 14:55:59 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Martin Rex <Martin.Rex@sap.com>
Cc: Peter Saint-Andre <stpeter@jabber.org>, kitten@ietf.org, jhildebrand@jabber.com, linuxwolf@outer-planes.net, sasl@ietf.org
Subject: Hostbased service names (Re: domain-based service names redux)
Message-ID: <20070615195559.GQ19770@Sun.COM>
Mail-Followup-To: Martin Rex <Martin.Rex@sap.com>, Peter Saint-Andre <stpeter@jabber.org>, kitten@ietf.org, jhildebrand@jabber.com, linuxwolf@outer-planes.net, sasl@ietf.org
References: <466DCFBA.9020001@jabber.org> <200706122103.l5CL3B2W029985@fs4113.wdf.sap.corp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200706122103.l5CL3B2W029985@fs4113.wdf.sap.corp>
User-Agent: Mutt/1.5.7i
Sender: owner-ietf-sasl@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-sasl/mail-archive/>
List-ID: <ietf-sasl.imc.org>
List-Unsubscribe: <mailto:ietf-sasl-request@imc.org?body=unsubscribe>

On Tue, Jun 12, 2007 at 11:03:11PM +0200, Martin Rex wrote:
> The most sensible and infrastructure-independent approach (i.e. independent
> of how load-balancing is done within the backend and where within
> the backend the secure communication is terminated) for traditional
> Kerberos authentication would be to standardize the user2user
> authentication exchange and use that (no use of _hostbased_
> service names).

Well, no.  The ideal thing to do (as opposed to the *pragmatic* thing to
do) is to add a new krb5 mech or extension to the existing mech that
uses three tokens, with an option for user-to-user[*], so as to get rid
of the need for a replay cache.

That has nothing to do with also deprecating the user of hostbased
service names.  Apps will still need a way to name non-human entities
running on specific hosts.  And whether we drop the _service_ part of
hostbased service names is also an other story.

[*]  With RFC4120 as it is it is not quite possible to do a three-token
     user-2-user mechanism; four tokens are required.  That's because
     the initiator has to be the one sending the AP-REQ, but it can't
     make an AP-REQ until it has obtained the acceptor's Ticket (which
     has got to be sent no earlier than in the second token since in the
     GSS-API the initiator always sends the first token).

     A user-2-user three-token mechanism is possible however, but the
     spec for it would have to update RFC4120.


Nico
-- 


