Re: [OAUTH-WG] signatures, v2

Nat Sakimura <sakimura@gmail.com> Wed, 21 July 2010 18:22 UTC

Return-Path: <sakimura@gmail.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 B5F653A68A3 for <oauth@core3.amsl.com>; Wed, 21 Jul 2010 11:22:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
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 6in+sWl0LxUC for <oauth@core3.amsl.com>; Wed, 21 Jul 2010 11:22:11 -0700 (PDT)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id DB9823A6946 for <oauth@ietf.org>; Wed, 21 Jul 2010 11:22:08 -0700 (PDT)
Received: by gxk1 with SMTP id 1so3993756gxk.31 for <oauth@ietf.org>; Wed, 21 Jul 2010 11:22:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=WX2Rk3w59TkMfT0DK8L5MdaHkirxrYNPZ1EykbNKiTs=; b=itfeIa1n69qKPHL+wOZbGqzfcH47HgsnnJ8gGKzNp9X3o03Gcx/ZBJitCu42+uhdtI o8nELOm/aP8HV6tNJdw44xxLfcBItZ4LENZYfJffXLR3kQeyt++oH888dOEDQnVHFMtZ s3HUC0w1TZe3re/U8X9qm2xgAfdDsWIqxZZQ4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Uc46cnVQt2TSA0TGZf0I20DeAaIGEUFV7aAFVQiG4GuA79+fT6+dWGwdfL4Ee44I1G rrqsVkqIQZO3s+ZBdeRN7VfNdyEGp0k8+Hh3Dfuke7X0oXJUevCqCZah90kfxSs91ADx qP3R0skkPRtm+xEW38vI9N09bgtsHGnTubuLU=
MIME-Version: 1.0
Received: by 10.101.170.3 with SMTP id x3mr668203ano.142.1279736533169; Wed, 21 Jul 2010 11:22:13 -0700 (PDT)
Received: by 10.231.158.67 with HTTP; Wed, 21 Jul 2010 11:22:13 -0700 (PDT)
In-Reply-To: <AANLkTiksmTe5OYC10RtKRWV=adqnBrnaRsnD5EhxfEx6@mail.gmail.com>
References: <AANLkTim7pvrLnQtz4WnDvYVRv0jbWgk3j8uMJj07CsM1@mail.gmail.com> <AANLkTiksmTe5OYC10RtKRWV=adqnBrnaRsnD5EhxfEx6@mail.gmail.com>
Date: Thu, 22 Jul 2010 03:22:13 +0900
Message-ID: <AANLkTinuRzUZoxyARXoNTLmXGPcjtQAF=KqpZnhZ9M_S@mail.gmail.com>
From: Nat Sakimura <sakimura@gmail.com>
To: Ben Laurie <benl@google.com>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] signatures, v2
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, 21 Jul 2010 18:22:14 -0000

On Wed, Jul 21, 2010 at 8:27 PM, Ben Laurie <benl@google.com> wrote:
> On 16 July 2010 01:43, Dirk Balfanz <balfanz@google.com> wrote:
>> Hi guys,
>> after reading through the feedback, we did a pass over the OAuth signature
>> proposals.
>> As a reminder, there are three documents:
>> - a document (called "JSON Tokens") that just explains how to sign something
>> and verify the signature:
>> http://docs.google.com/document/pub?id=1kv6Oz_HRnWa0DaJx_SQ5Qlk_yqs_7zNAm75-FmKwNo4
>>
>> - an extension of JSON Tokens that can be used for signed OAuth tokens:
>> http://docs.google.com/document/pub?id=1JUn3Twd9nXwFDgi-fTKl-unDG_ndyowTZW8OWX9HOUU
>> - a different extension of JSON Tokens that can be used whenever the spec
>> calls for an "assertion":
>> http://docs.google.com/document/pub?id=1s4kjRS9P0frG0ulhgP3He01ONlxeTwkFQV_pCoOowzc
>> (When used in the assertion flow, this last token can also be used to do
>> "2-legged" OAuth)
>>
>> A summary of the (scant) changes:
>> - we spelled out what we mean by RSA-SHA256. Ben Laurie - can you
>> double-check that that sounds good?
>
> Nearly missed this, somehow. Yes, looks good to me. A reference would
> be nice (RFC 3447, for example).

Magic Signatures is using EMSA-PKCS1-v1_5 instead of PSS because it has
wider library supports, I believe. For example, OpenSSL library
interface in PHP
does not seem to support PSS.

>
>> - we decided on unpadded websafe-base64 throughout.
>> - some changes to parameter names.
>> - some small changes I might be forgetting now...
>> As explained in my message to the previous thread, there is still no
>> envelope in there to help with encrypted tokens (b/c we don't understand
>> well enough what the envelopes for encrypted tokens would look like).

Perhaps http://tools.ietf.org/html/draft-sakimura-jsonenc-00 help?

>> One question: What's the deal with having the signature go first? If you can
>> explain to me why that is a good idea, I'm happy to oblige.

With Sign + Encrypt, you are signing the (almost) plain text, while
with Encrypt + Sign, you are sining the cypher text so you would have to
have full trust on the Encrypt process that it did not tamper the
original text.
Also, with Sign + Encrypt, you can store the decrypted text and still
verify the
integrity of the data at a later date, but with Encrypt + Sign, you cannot.
Thus, to me, Sign + Encrypt seem to be a better approach.



-- 
Nat Sakimura (=nat)
http://www.sakimura.org/en/
http://twitter.com/_nat_en