Re: [jose] #23: Make crypto independent of binary encoding (base64)

Roland Hedberg <roland.hedberg@adm.umu.se> Wed, 12 June 2013 06:41 UTC

Return-Path: <roland.hedberg@adm.umu.se>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B365F21F9C14 for <jose@ietfa.amsl.com>; Tue, 11 Jun 2013 23:41:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.249
X-Spam-Level:
X-Spam-Status: No, score=-2.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_SE=0.35]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9LeEOKRrKRRO for <jose@ietfa.amsl.com>; Tue, 11 Jun 2013 23:41:22 -0700 (PDT)
Received: from mail.ad.umu.se (umdac-ch2.ad.umu.se [130.239.1.247]) by ietfa.amsl.com (Postfix) with ESMTP id ED58121F9BFB for <jose@ietf.org>; Tue, 11 Jun 2013 23:41:21 -0700 (PDT)
Received: from UMDAC-CCR1.ad.umu.se ([169.254.1.99]) by UMDAC-CH2.ad.umu.se ([130.239.1.247]) with mapi; Wed, 12 Jun 2013 08:40:42 +0200
From: Roland Hedberg <roland.hedberg@adm.umu.se>
To: John Bradley <ve7jtb@ve7jtb.com>
Date: Wed, 12 Jun 2013 08:41:18 +0200
Thread-Topic: [jose] #23: Make crypto independent of binary encoding (base64)
Thread-Index: Ac5nN8HYCVBz1bCaTZegrAh2UJbqXg==
Message-ID: <AA7739BD-285F-4C94-B503-A2F2C945CC3B@adm.umu.se>
References: <049.69ffc5ebf959c6eac7990651822fadf9@trac.tools.ietf.org> <CAHBU6isGzV1ZM1xczwK3v-rcusDwv6LHkag3KwX2QH+UFWGzpQ@mail.gmail.com> <637787CD-63D9-4FCC-8DFE-AF0692C262B3@ve7jtb.com>
In-Reply-To: <637787CD-63D9-4FCC-8DFE-AF0692C262B3@ve7jtb.com>
Accept-Language: en-US, sv-SE
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
acceptlanguage: en-US, sv-SE
Content-Type: multipart/mixed; boundary="_003_AA7739BD285F4C94B503A2F2C945CC3Badmumuse_"
MIME-Version: 1.0
Cc: Richard Barnes <rlb@ipv.sx>, "draft-barnes-jose-use-cases@tools.ietf.org" <draft-barnes-jose-use-cases@tools.ietf.org>, jose issue tracker <trac+jose@trac.tools.ietf.org>, Tim Bray <tbray@textuality.com>, jose <jose@ietf.org>
Subject: Re: [jose] #23: Make crypto independent of binary encoding (base64)
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Jun 2013 06:41:26 -0000

I'm completely behind John on this.
Also, being one that has a JWT library implementation I can support Tim in that this is a breaking change.
A change that I'm definitely against.

12 jun 2013 kl. 08:16 skrev John Bradley <ve7jtb@ve7jtb.com>:

> Changing what the integrity is calculated over is about a big breaking change.
> 
> I have personally considered alternate encodings for constrained environments (internet of things) however the format we have now has the advantage that it is hard for developers to get wrong, unlike xmldsig.
> 
> Jim made a good point that you have to encode the length of the parts or have a separator that cannot appear in the parts. 
> 
> I expect that escaping every "." in the JSON is not going to work very well. 
> 
> We know what we have works.  It is possible to have long debates over things that won't work.
> 
> The integrity has always been calculated this way,  It is not new.
> 
> John B.
> 
> 
> On 2013-06-12, at 6:20 AM, Tim Bray <tbray@textuality.com> wrote:
> 
>> I haven’t been following this closely, but someone who uses JWTs (there are a lot of them out there) asked me “Wouldn’t this break all the existing JWT libraries and software deployed in production?”  I’m not 100% sure, but it looks to me like the answer is yes.  Since i observe empirically that JWTs work very well in production for federated login and many other applications, and offer a level of security that is acceptable to some of the most paranoid security organizations in the world, I think this proposal is not remotely close to being cost-effective.
>> 
>> Forgive me if I’m wrong and this wouldn’t actually break JWTs.  -T
>> 
>> 
>> On Tue, Jun 11, 2013 at 10:58 AM, jose issue tracker <trac+jose@trac.tools.ietf.org> wrote:
>> #23: Make crypto independent of binary encoding (base64)
>> 
>>  The cryptographic operations that JOSE performs should not depend on the
>>  transfer encoding used for binary components.  The operations should work
>>  directly on the encoded byte strings, not on the encoded form.
>> 
>>  This is already true for content, IV, ciphertext, encrypted key, and
>>  authentication tag.  The only thing that needs fixing is the protected
>>  header value.  That's a little tricky, since the protected header value is
>>  JSON, which doesn't have a standard encoding.  But it's not that onerous
>>  just to convert it to UTF-8 -- in fact, senders are already required to
>>  convert the protected header to UTF-8.
>> 
>>  So the only change is to require recipients to convert the protected
>>  header to UTF-8 before using it.   This can be accomplished with two minor
>>  changes:
>> 
>>  <http://tools.ietf.org/html/draft-ietf-jose-json-web-
>>  signature-11#section-5.2>
>>  OLD: "The resulting JWS Protected Header MUST be a completely valid JSON
>>  object conforming to RFC 4627 [RFC4627]."
>>  NEW: "The resulting JWS Protected Header MUST be a completely valid JSON
>>  object conforming to RFC 4627 [RFC4627].  If the JWE Protected Header is
>>  valid, convert it to the UTF-8 encoding.  Otherwise, reject the JWE."
>> 
>>  <http://tools.ietf.org/html/draft-ietf-jose-json-web-
>>  encryption-11#section-5.2>
>>  OLD: "The resulting JWE Protected Header MUST be a completely valid JSON
>>  object conforming to RFC 4627 [RFC4627]."
>>  NEW: "The resulting JWE Protected Header MUST be a completely valid JSON
>>  object conforming to RFC 4627 [RFC4627].  If the JWE Protected Header is
>>  valid, convert it to the UTF-8 encoding.  Otherwise, reject the JWE."
>> 
>> --
>> -------------------------------------+-------------------------------------
>>  Reporter:  rlb@ipv.sx               |      Owner:  draft-barnes-jose-use-
>>      Type:  defect                   |  cases@tools.ietf.org
>>  Priority:  major                    |     Status:  new
>> Component:  draft-barnes-jose-use-   |  Milestone:
>>   cases                              |    Version:
>>  Severity:  -                        |   Keywords:
>> -------------------------------------+-------------------------------------
>> 
>> Ticket URL: <http://trac.tools.ietf.org/wg/jose/trac/ticket/23>
>> jose <http://tools.ietf.org/jose/>
>> 
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
>> 
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
>