Re: [jose] At a glance: JWS vs "in-object" ES6/JSON signatures

Anders Rundgren <anders.rundgren.net@gmail.com> Thu, 29 October 2015 13:09 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6F9BF1A1B6B for <jose@ietfa.amsl.com>; Thu, 29 Oct 2015 06:09:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dgQP7AlfkSK4 for <jose@ietfa.amsl.com>; Thu, 29 Oct 2015 06:09:36 -0700 (PDT)
Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 72D4D1A1B67 for <jose@ietf.org>; Thu, 29 Oct 2015 06:09:36 -0700 (PDT)
Received: by wmff134 with SMTP id f134so24659446wmf.0 for <jose@ietf.org>; Thu, 29 Oct 2015 06:09:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=JHpRa/m8ln6UnZyRlbGipOg+Op28xaKFaUA8reyzf3A=; b=IbK93/8ywWjfBzu3hCapiaInv2g6YmZ7YOZQ/cJkBHrVXLApD+35ZMZfKeyNDOVPEG 0keB76k/kuoYMhnnjwiKtweRwhtaoEMh3KEF3aa5lVowOqwZUvgVc1naHktxpjmakXA7 p4WLZGrl627YTPjJK02zeoHoJPfZ5qlHWcTTJOD901XBM8J7YlLEbtEKNdo5LjDF62P8 qSCN0ohVets8rH017Ejx/bLXF1lPBVhTngt6DBryO43oix+nce2Hs1AmWr+QAh9Y+TxU fWCGO7PxiJWs2FDSSOD//2unqOTefqrSl418tZ9paXNXuUO4SIjc5/5DzBHVACdyEv1k KE+w==
X-Received: by 10.28.16.132 with SMTP id 126mr6326498wmq.86.1446124175017; Thu, 29 Oct 2015 06:09:35 -0700 (PDT)
Received: from [192.168.1.79] (148.198.130.77.rev.sfr.net. [77.130.198.148]) by smtp.googlemail.com with ESMTPSA id l186sm9142421wmg.19.2015.10.29.06.09.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2015 06:09:34 -0700 (PDT)
To: Jim Schaad <ietf@augustcellars.com>, jose@ietf.org
References: <5631BF2A.70109@gmail.com> <007201d1123f$a68579e0$f3906da0$@augustcellars.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <56321A87.7020105@gmail.com>
Date: Thu, 29 Oct 2015 14:09:27 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <007201d1123f$a68579e0$f3906da0$@augustcellars.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/jose/8sWl6kcplKgadROLXCeuqriuJbo>
Subject: Re: [jose] At a glance: JWS vs "in-object" ES6/JSON signatures
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.15
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: <https://mailarchive.ietf.org/arch/browse/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: Thu, 29 Oct 2015 13:09:38 -0000

On 2015-10-29 12:47, Jim Schaad wrote:
> Is there any reason to believe that other JSON libraries are going to
> implement the ES6 standard?  For example, what should one expect either a
> hand rolled version or a C# version do?

I can only speak for myself.  I'm currently upgrading my Java-tools
to support ES6 number serialization.  The rest already supports a
superset of ES6 (with respect to JSON processing NB).

Anyway, since JavaScript is the mother of JSON, it seems logical that
the off-springs adapt as well :-)

Anders

>
>
>> -----Original Message-----
>> From: jose [mailto:jose-bounces@ietf.org] On Behalf Of Anders Rundgren
>> Sent: Wednesday, October 28, 2015 11:40 PM
>> To: jose@ietf.org
>> Subject: [jose] At a glance: JWS vs "in-object" ES6/JSON signatures
>>
>> ES6-compliant in-object JS/JSON signature:
>>
>>     var inObjectSignedData =
>>       {
>>           // Object data expressed as JS properties
>>           "device": "Pump2",
>>           "value": 1e-18,
>>
>>           // Object signature
>>           "signature": {
>>               ...Protected headers + Signature value expressed as JS
> properties...
>>           }
>>       };
>>
>> JavaScript's JSON.parse() and JSON.stringify() suffice for
> "canonicalization"
>> purposes.
>>
>>
>> Converting the above to JWS JSON Serialization you would get:
>>
>> var signedData =
>>     {
>>         // Object data in a coded format
>>         "payload":"<payload contents>",
>>
>>         // Protected headers wrapped in Base64URL
>>         "protected":"<integrity-protected header contents>",
>>
>>         // Signature in a unique format
>>         "signature":"<signature contents>"
>>     }
>>
>> ES6 was released in June 2015 so this opportunity is actually quite new.
>>
>> Cheers,
>> Anders
>>
>>
> http://webpki.org/ietf/draft-rundgren-predictable-serialization-for-json-too
> ls-
>> 00.html#rfc.section.3.3
>>
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
>