Re: [KEYPROV] Giving up on XML DSig => JSON

Anders Rundgren <anders.rundgren@telia.com> Thu, 29 August 2013 12:27 UTC

Return-Path: <anders.rundgren@telia.com>
X-Original-To: keyprov@ietfa.amsl.com
Delivered-To: keyprov@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0F14221F9DDB for <keyprov@ietfa.amsl.com>; Thu, 29 Aug 2013 05:27:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.691
X-Spam-Level:
X-Spam-Status: No, score=-1.691 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_ILLEGAL_IP=1.908, RCVD_IN_DNSWL_LOW=-1]
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 pevxXVRPAhgz for <keyprov@ietfa.amsl.com>; Thu, 29 Aug 2013 05:27:10 -0700 (PDT)
Received: from smtp-out12.han.skanova.net (smtp-out12.han.skanova.net [195.67.226.212]) by ietfa.amsl.com (Postfix) with ESMTP id B9E6921F9DC7 for <keyprov@ietf.org>; Thu, 29 Aug 2013 05:27:09 -0700 (PDT)
Received: from [192.168.0.5] (2.68.138.51) by smtp-out12.han.skanova.net (8.5.133) (authenticated as u36408181) id 521DAB1700060CF6; Thu, 29 Aug 2013 14:26:57 +0200
Message-ID: <521F3E05.7010309@telia.com>
Date: Thu, 29 Aug 2013 14:26:45 +0200
From: Anders Rundgren <anders.rundgren@telia.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: Simon Josefsson <simon@josefsson.org>
References: <521EEFEE.9080302@telia.com> <20130829103542.7e22fea3@latte.josefsson.org> <521F32F3.9030107@telia.com> <20130829135537.6599b273@latte.josefsson.org>
In-Reply-To: <20130829135537.6599b273@latte.josefsson.org>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: keyprov@ietf.org
Subject: Re: [KEYPROV] Giving up on XML DSig => JSON
X-BeenThere: keyprov@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Provisioning of Symmetric Keys \(keyprov\)" <keyprov.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/keyprov>, <mailto:keyprov-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/keyprov>
List-Post: <mailto:keyprov@ietf.org>
List-Help: <mailto:keyprov-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/keyprov>, <mailto:keyprov-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Aug 2013 12:27:15 -0000

On 2013-08-29 13:55, Simon Josefsson wrote:

> You wrote:
> 
Hi Simon,

>>> If the latter, why not JWS?
>>
>> Because JWS is based on in-line signatures of base64-encoded payloads.
>> This would ruin the readability of the already complex KeyGen2
>> protocol and make the switch from XML look bad.
> 
> Why can't you hash the data you want to sign, and then use JWS to sign
> the hash?

Such a thing would still require most of what I have done anyway,
wouldn't it?  I mean, "Reference", canonicalization etc.

Existing JSON parsers probably don't support canonicalization since
this hasn't been an issue until now.  By building-in all that from
the beginning you get a cool and rather smallish system as well.


> Then you get readability and don't have to invent something new.

I actually enjoy inventing new things.  Don't you like my brand new octagonic wheel? :-)

To be a bit more serious: I'm not overly convinced that clinging on
to standards always is the best solution.  I have don my clinging
with XML DSig now and it turned out to be a mistake :-(

It is like PKCS #11 and on-line provisioning; it will never work although
the OASIS PKCS11 TC claims that. Why? Because PKCS #11 wasn't designed for
a remote SO and that is a bit hard to add as an afterthought, not to
mention getting all drivers up-to-date.  IMO - Simply undoable.

> However, your example blob in the PDF is hardly readable, so I
> don't fully follow the argument about readability to begin with.

There are blobs but they at least have labels.

Here is the XML version of KeyGen2:

http://webpki.org/papers/keygen2/keygen2.junit.run.html

It is rather pretty (IMO...).  The JSON version will be _almost_
as nice but but only use 1/3 as much code (including third-party
libraries and all).

Cheers
Anders

> 
> /Simon
>