Re: [jose] canonical JSON

Daniel Holth <dholth@gmail.com> Tue, 19 February 2013 13:56 UTC

Return-Path: <dholth@gmail.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 34EF521F8BF6 for <jose@ietfa.amsl.com>; Tue, 19 Feb 2013 05:56:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.598
X-Spam-Level:
X-Spam-Status: No, score=-3.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SqngBNUdALjf for <jose@ietfa.amsl.com>; Tue, 19 Feb 2013 05:56:17 -0800 (PST)
Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by ietfa.amsl.com (Postfix) with ESMTP id A38A521F88EA for <jose@ietf.org>; Tue, 19 Feb 2013 05:56:17 -0800 (PST)
Received: by mail-wi0-f182.google.com with SMTP id hi18so4799328wib.3 for <jose@ietf.org>; Tue, 19 Feb 2013 05:56:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=/WkESzci04ieON7VgSL/yb9r1tZtGdpFVPWw9vqg8AA=; b=xI2UTkASIbSuo3FB+fmX4C9/yBFUPu3MK4VcgGV++ScCK5qTxCsOX4op2nGwT9T6W3 mJP2JfIwHLk+HYx/MtaSiJviaAD0x4+PjRToKSahs8I6MWmoXRvXOx8zSrtDukwjUXDw ngkRGlfEBdl36ibLNg7CBjt6OVvg4K0qP4HFxkeXB5/+D+BeOmihg+V1wbHCWfQX68Ps A4lDsgGROE62YIamvip+dvNvk80L+y+9+knhf7g1MD7qsVgyrbk/7x+GznHvMBbENaA7 9hy/0FQW+jmk5sRCEv9VPBF+roRc5mIU0E7goxvEAZieduFDAhhcdIVyD5lC1+ZXWy6o ZwDA==
MIME-Version: 1.0
X-Received: by 10.181.13.175 with SMTP id ez15mr27326053wid.8.1361282176627; Tue, 19 Feb 2013 05:56:16 -0800 (PST)
Received: by 10.194.122.67 with HTTP; Tue, 19 Feb 2013 05:56:16 -0800 (PST)
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E1150757902D@WSMSG3153V.srv.dir.telstra.com>
References: <CAG8k2+4xaAUBPs=Kw-=eBHZNyOMs6VYByPEb1jnAv1aGjLupng@mail.gmail.com> <CABkgnnWzdoo6b0ZymF0cv_v9zOjJKTWuUhkWuxiA-cM9qgu0jg@mail.gmail.com> <CAG8k2+47GQXHhWBdqd82UEAPZUfAigYE-vwxpaMJm4F5i8098A@mail.gmail.com> <CAL02cgQ3Oh1D9qHW7XWAZqzmfnE5T6-FjNydjpMEMhaHf2d7Xw@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E1150757902D@WSMSG3153V.srv.dir.telstra.com>
Date: Tue, 19 Feb 2013 08:56:16 -0500
Message-ID: <CAG8k2+5mVYJ6TgQHJ9juXEaWkfMteG6gV8w_dCoShP4-9fPqMA@mail.gmail.com>
From: Daniel Holth <dholth@gmail.com>
To: "Manger, James H" <James.H.Manger@team.telstra.com>
Content-Type: multipart/alternative; boundary=f46d0434bea693b23204d61434dc
Cc: Richard Barnes <rlb@ipv.sx>, jose <jose@ietf.org>
Subject: Re: [jose] canonical JSON
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: Tue, 19 Feb 2013 13:56:19 -0000

On Tue, Feb 19, 2013 at 1:57 AM, Manger, James H <
James.H.Manger@team.telstra.com> wrote:

> A canonical form of JSON might be fairly easy, but the one you quote (
> http://wiki.laptop.org/go/Canonical_JSON) can’t handle floating point
> numbers (or very large integers), and produces invalid JSON if a string
> includes a tab! Fix those (escaping control chars [\u0000-\u001f]; use
> normalized scientific notation for numbers) and it might be worth
> considering.****
>
> ** **
>
> Defining JOSE calculations in terms of 1 or more byte arrays, the first of
> which is a UTF-8-encoded JSON header, would be useful. It can then be
> packaged as dot-separated base64url-encoded segments to be
> HTTP-header-friendly, or packaged as a single JSON object to be
> programmer-friendly, or packaged as raw bytes to be efficient.
>

I am only proposing a key fingerprinting specification that does not employ
DER encoding. JWKs do not contain tabs or floating point numbers.