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

"Matt Miller (mamille2)" <mamille2@cisco.com> Wed, 12 June 2013 14:28 UTC

Return-Path: <mamille2@cisco.com>
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 05E7C21F9B9B for <jose@ietfa.amsl.com>; Wed, 12 Jun 2013 07:28:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 pcopUyyQcX-O for <jose@ietfa.amsl.com>; Wed, 12 Jun 2013 07:28:13 -0700 (PDT)
Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by ietfa.amsl.com (Postfix) with ESMTP id ABB7421F9BAF for <jose@ietf.org>; Wed, 12 Jun 2013 07:28:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=9205; q=dns/txt; s=iport; t=1371047284; x=1372256884; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=sK4+b1XJZJMNsvUCimtplQ/TZXLv2D5p6Dve1spMQpY=; b=lda9nGDyfutBrRLM/VvilgZBHWLUu+u5bpleODQ94WHxj/MemngJz/2Y bDdUXRbVhvAdJvx6W4p3bMyRDaunnNwjBUoGjFEeZZWxPMnoaGLh7IJit p+HR3Gk+gJ5Fsbv9lL9IlhPnqGUC9y1aE+H29fiqVY+Tv2m94rB1D/lM/ 0=;
X-Files: smime.p7s : 4136
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AjgFAN6EuFGtJV2Y/2dsb2JhbABagwkwSb5YgQEWdIIkAQEEAQEBawsQAgEIIiQCJQslAgQOBQgGiAAMugCOEQp3MQeCf2EDkAGBLIc8iniFIYMPgXE2
X-IronPort-AV: E=Sophos; i="4.87,852,1363132800"; d="p7s'?scan'208"; a="218934585"
Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by rcdn-iport-9.cisco.com with ESMTP; 12 Jun 2013 14:27:38 +0000
Received: from xhc-aln-x07.cisco.com (xhc-aln-x07.cisco.com [173.36.12.81]) by rcdn-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id r5CERcYP024853 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 12 Jun 2013 14:27:38 GMT
Received: from xmb-aln-x11.cisco.com ([169.254.6.24]) by xhc-aln-x07.cisco.com ([173.36.12.81]) with mapi id 14.02.0318.004; Wed, 12 Jun 2013 09:27:38 -0500
From: "Matt Miller (mamille2)" <mamille2@cisco.com>
To: jose issue tracker <trac+jose@trac.tools.ietf.org>
Thread-Topic: [jose] #23: Make crypto independent of binary encoding (base64)
Thread-Index: AQHOZwAXKcNLuE7LHkStdGteSHNX/pkyd8qA
Date: Wed, 12 Jun 2013 14:27:37 +0000
Message-ID: <BF7E36B9C495A6468E8EC573603ED94115283F43@xmb-aln-x11.cisco.com>
References: <049.69ffc5ebf959c6eac7990651822fadf9@trac.tools.ietf.org> <064.e396e921644745f7bd339ad363a7d7f7@trac.tools.ietf.org>
In-Reply-To: <064.e396e921644745f7bd339ad363a7d7f7@trac.tools.ietf.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.129.24.59]
Content-Type: multipart/signed; boundary="Apple-Mail=_20838759-A7A4-43A1-A8A8-1742E0DF34AA"; protocol="application/pkcs7-signature"; micalg="sha1"
MIME-Version: 1.0
Cc: "<rlb@ipv.sx>" <rlb@ipv.sx>, "<draft-ietf-jose-json-web-encryption@tools.ietf.org>" <draft-ietf-jose-json-web-encryption@tools.ietf.org>, "<michael.jones@microsoft.com>" <michael.jones@microsoft.com>, "<jose@ietf.org>" <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 14:28:18 -0000

I did at first find it curious why the cryptographic operations were over the base64url-enccoded values, but I was also very focused on JWE, where I think the field separation problem is less of an issue (at least now).  For JWS, this would certainly cause problems without some manner of unambiguous field parameterization.

I will note that unescaped NULL is not valid in JSON, so it could be used as a separator between the encoded header and the payload.  I do find it interesting if JOSE could more easily and efficiently support other encodings.  However, I think that while this is an interesting thought experiment, it seems we're too far down the path to seriously consider it unless the current state were shown to be horribly broken.


- m&m

Matt Miller < mamille2@cisco.com >
Cisco Systems, Inc.

On Jun 11, 2013, at 6:01 PM, jose issue tracker <trac+jose@trac.tools.ietf.org> wrote:

> #23: Make crypto independent of binary encoding (base64)
> 
> 
> Comment (by michael.jones@microsoft.com):
> 
> For both serializations, you already need the base64url encoded versions
> of the JWS Header and the JWS Payload to preserve them in transmission, so
> computing them isn't an extra burden.  In the JWS Compact Serialization,
> you already need the concatenation of the Encoded JWS Header, a period
> character, and the Encoded JWS Payload, so computing that concatenation
> isn't an extra burden.  Given you already have that quantity, computing
> the signature over it is the easiest thing for developers to do, and it's
> been shown to work well in practice.  There's no compelling reason to make
> this change.
> 
> Even for the JSON Serialization, the only "extra" step that's required to
> compute the signature is the concatenation with the period character - to
> prevent shifting of data from one field to the other, as described by Jim
> Schaad in the e-mail thread.  So this step isn't actually "extra" at all -
> it's necessary.  It's also highly advantageous to use exactly the same
> computation for both serializations, which is currently the case.
> 
> Since there is no compelling reason to make this change, and since making
> it could enable the "shifting" problem identified by Jim, it should not be
> made.
> 
> -- 
> -------------------------+-------------------------------------------------
> Reporter:  rlb@ipv.sx   |       Owner:  draft-ietf-jose-json-web-
>     Type:  defect       |  encryption@tools.ietf.org
> Priority:  major        |      Status:  new
> Component:  json-web-    |   Milestone:
>  encryption             |     Version:
> Severity:  -            |  Resolution:
> Keywords:               |
> -------------------------+-------------------------------------------------
> 
> Ticket URL: <http://trac.tools.ietf.org/wg/jose/trac/ticket/23#comment:2>
> jose <http://tools.ietf.org/jose/>
> 
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose