Re: [OAUTH-WG] Signature crypto

"Richard L. Barnes" <rbarnes@bbn.com> Wed, 09 December 2009 05:57 UTC

Return-Path: <rbarnes@bbn.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 0B4343A6ABA for <oauth@core3.amsl.com>; Tue, 8 Dec 2009 21:57:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HTML_MESSAGE=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 GdRJxHfB5vZw for <oauth@core3.amsl.com>; Tue, 8 Dec 2009 21:57:45 -0800 (PST)
Received: from smtp.bbn.com (smtp.bbn.com [128.33.1.81]) by core3.amsl.com (Postfix) with ESMTP id 39D653A6AB9 for <oauth@ietf.org>; Tue, 8 Dec 2009 21:57:45 -0800 (PST)
Received: from [128.89.254.31] (helo=[192.168.1.45]) by smtp.bbn.com with esmtp (Exim 4.63) (envelope-from <rbarnes@bbn.com>) id 1NIFYJ-00016a-AK; Wed, 09 Dec 2009 00:57:33 -0500
Message-Id: <226241E8-907C-4CC2-88F2-C20C77717605@bbn.com>
From: "Richard L. Barnes" <rbarnes@bbn.com>
To: Breno <breno.demedeiros@gmail.com>
In-Reply-To: <f98165700912081909y5dfa45cam3a3062fea83d5fef@mail.gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail-2-710692814"
Mime-Version: 1.0 (Apple Message framework v936)
Date: Wed, 09 Dec 2009 00:57:30 -0500
References: <90C41DD21FB7C64BB94121FBBC2E72343785183009@P3PW5EX1MB01.EX1.SECURESERVER.NET> <90C41DD21FB7C64BB94121FBBC2E7234378529369B@P3PW5EX1MB01.EX1.SECURESERVER.NET> <f98165700912041048s7f1f53bs27ec2b78f7f44c8b@mail.gmail.com> <90C41DD21FB7C64BB94121FBBC2E723437852936BC@P3PW5EX1MB01.EX1.SECURESERVER.NET> <daf5b9570912041112h71c0644dm8c908478dbff2e9a@mail.gmail.com> <f98165700912041120k2b13eed2l4b51f6b22e35824e@mail.gmail.com> <90C41DD21FB7C64BB94121FBBC2E723437852936D7@P3PW5EX1MB01.EX1.SECURESERVER.NET> <f98165700912041146w2d543b25l9b1e7ec8df0ef8a0@mail.gmail.com> <90C41DD21FB7C64BB94121FBBC2E72343785293745@P3PW5EX1MB01.EX1.SECURESERVER.NET> <21D4FB55-A8EF-4619-8C5F-5F7E1E54CB8A@bbn.com> <f98165700912081909y5dfa45cam3a3062fea83d5fef@mail.gmail.com>
X-Mailer: Apple Mail (2.936)
Cc: "OAuth WG (oauth@ietf.org)" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Signature crypto
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Dec 2009 05:57:47 -0000

We're not talking about using the same key with multiple MACs (that's  
an issue of how the keys are managed).  Rather, we're trying to figure  
out a taxonomy of signing algorithms according to some practical  
criteria.  "Arbitrary bit-string" vs. "Algebraically meaningful" for a  
key seems to be an important distinction for this protocol (since  
there's a question as to what the protocol should use for a signing  
key), but it doesn't imply that you would use the same protocol for  
all signing algorithms of a given class -- this idea is clearly  
ridiculous for asymmetric algorithms, and has some risks, as you say,  
for symmetric algorithms.

--Richard



On Dec 8, 2009, at 10:09 PM, Breno wrote:

>
>
> On Tue, Dec 8, 2009 at 4:17 PM, Richard Barnes <rbarnes@bbn.com>  
> wrote:
> This isn't quite right.  First of all, you're not constraining the  
> types of *tokens*, you're constraining the types of token *secrets*  
> (the private part, not the public part; the key, not the key label).
>
> Good security practice indicates that a key (the secret part) should  
> be used with a single algorithm. Different algorithm --> different  
> key.
>
>
> Second, there's basically only two classes of signature/secret  
> anyway, symmetric and asymmetric.  MAC algorithms generally take any  
> string of bytes as a key (possibly with a length constraint), since  
> they're just going to XOR it with data anyway.  Public-key  
> algorithms require the secret key to have an relationship to its  
> public half.  The practical implication is that you can use your  
> tokens as MAC keys if you want, but you might need to carry tokens  
> separately if you're using an asymmetric signature algorithm.
>
> While MAC algorithms take any type of key, it is not good practice  
> to use a key with two different MAC algorithms. So while technically  
> it will work, it is not advised practice.
>
>
>
> Net of all that, I'll agree with Brian's earlier claim that OAuth  
> 1.0 had this basically right by having the server advertise what  
> algorithms it supports, with  the one major change that we probably  
> should use the same base string for all algorithms.
>
> --Richard
>
>
>
> On Dec 4, 2009, at 3:35 PM, Eran Hammer-Lahav wrote:
>
>> We have been to some extent talking part each other. Breno and I  
>> spend some time talking about this off line and reached a better  
>> understanding of our positions.
>>
>> We have been approaching this from the wrong direction.
>>
>> The server should not be broadcasting what types of algorithms it  
>> supports. Instead it should be listing what kind of *tokens* it  
>> supports. Since a token secret issued for use with HMAC-SHA1 should/ 
>> may be different from that used with HMAC-SHA512, it is the token  
>> class that determines what it can be used with.
>>
>> The server should indicate the kinds of tokens supported for a  
>> given resource/realm. When obtaining such tokens, the client will  
>> be provided with a new attribute indicating the token type (which  
>> will dictate how it should use it to sign/etc. the canonicalized  
>> request.).
>>
>> The server should indicate in the WWW-Authenticate header which  
>> canonicalizations it supports (with bearer token being a special  
>> case).
>>
>> The authentication scheme should specify how to take the raw  
>> signature and encode it into the Authentication header.
>>
>> This means *are* going to pick a few token types to standardize  
>> which will include the crypto used, and allow extensions by  
>> publishing an RFC + registration.
>>
>> EHL
>>
>>
>>
>>
>> From: Breno [mailto:breno.demedeiros@gmail.com]
>> Sent: Friday, December 04, 2009 11:46 AM
>> To: Eran Hammer-Lahav
>> Cc: Brian Eaton; OAuth WG (oauth@ietf.org)
>> Subject: Re: [OAUTH-WG] Signature crypto
>>
>> I am not sure I buy this. For instance, RSA-SHA1 is _not_ a  
>> signature scheme, PKCS#11 does establish a signature scheme based  
>> on RSA + SHA-1.
>>
>> So to delve beyond the level of abstraction of 'authentication  
>> mechanism name' you need to point to a separate spec for both  
>> signing and verification.
>>
>> I am not sure how much one needs to do beyond defining the byte  
>> representation of what needs to be signed.
>>
>> Some MACs require random pads in addition to keys. Those won't fit  
>> into this abstraction but I don't think we need absolute generality  
>> here.
>>
>> On Fri, Dec 4, 2009 at 11:25 AM, Eran Hammer-Lahav <eran@hueniverse.com 
>> > wrote:
>> Point where?
>>
>> I didn’t mean new spec for the algorithm, just for how it is used  
>> with the OAuth authentication scheme.
>>
>> EHL
>>
>> From: Breno [mailto:breno.demedeiros@gmail.com]
>> Sent: Friday, December 04, 2009 11:20 AM
>> To: Brian Eaton
>> Cc: Eran Hammer-Lahav; OAuth WG (oauth@ietf.org)
>>
>> Subject: Re: [OAUTH-WG] Signature crypto
>>
>> There is no need to publish a new spec for a new MAC algorithm. MAC  
>> algorithms typically go through certification (e.g., NIST) and have  
>> detailed specs, including test vectors for interoperability.
>>
>> For OAuth, if you want to explicitly support a new MAC algorithm  
>> you will not need to change the transport and you just have to  
>> point to the particular spec that defines the MAC algorithm.
>>
>> On Fri, Dec 4, 2009 at 11:12 AM, Brian Eaton <beaton@google.com>  
>> wrote:
>> On Fri, Dec 4, 2009 at 11:10 AM, Eran Hammer-Lahav <eran@hueniverse.com 
>> > wrote:
>> > I am trying to avoid the need to publish a specification every  
>> time you want
>> > to add a new MAC-based algorithm.
>>
>> People are going to end up needing to write new code every time they
>> want to add a new MAC-based algorithm.
>>
>> Cheers,
>> Brian
>>
>>
>>
>> -- 
>> Breno de Medeiros
>>
>>
>>
>>
>> -- 
>> Breno de Medeiros
>>
>> _______________________________________________
>>
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>
>
>
>
> -- 
> Breno de Medeiros
>