Re: [Acme] ACME signature mechanics

Richard Barnes <rlb@ipv.sx> Tue, 16 December 2014 16:27 UTC

Return-Path: <rlb@ipv.sx>
X-Original-To: acme@ietfa.amsl.com
Delivered-To: acme@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8ED681A1BDF for <acme@ietfa.amsl.com>; Tue, 16 Dec 2014 08:27:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 rtOI7vlM4Bon for <acme@ietfa.amsl.com>; Tue, 16 Dec 2014 08:27:45 -0800 (PST)
Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0312C1A1BDB for <acme@ietf.org>; Tue, 16 Dec 2014 08:27:39 -0800 (PST)
Received: by mail-vc0-f170.google.com with SMTP id hy4so6595643vcb.29 for <acme@ietf.org>; Tue, 16 Dec 2014 08:27:39 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TX8baUFQ/XGmsvWiz89pupzG3CazRODvtRNUIkdz0vM=; b=RL2D1RWstkQ8sxKYsGrOc4QKfsYionjkS6ZhcCNFxtlZi/91PooyaGyN8j5K6cTd8b POrAX0TD24B3OL2V10CisFnMfux571VYSlAQScPXzBjgAJFv6DKzlrNL+OLheowVXX/g M36goC4/vCIBXZXHlXCVYaHUXfdpZ7Zq+lH5IATnE1Q60OAqHgoSZQg4Y+wrqg9ToK44 G6z8tDvpjUYFEarcqviCuCEZq/1CpoWaxTgq9PXBHKpsQEl26tp79Xdfirl35tHvEAJ3 oYycZogwW11iVo8Q78bC7/LMOjL5Df/NSXf2pEAnUcU6jorlsBfx33LiVjakB6PWpwSh prkg==
X-Gm-Message-State: ALoCoQlupXnw3Wqif3i0j9PhEe1o2qoRhaFqV2YTFjUSMGPyQbcxeqsatiucHFPaEPtmm02vHo0P
MIME-Version: 1.0
X-Received: by 10.52.252.3 with SMTP id zo3mr19477284vdc.51.1418747259058; Tue, 16 Dec 2014 08:27:39 -0800 (PST)
Received: by 10.31.139.9 with HTTP; Tue, 16 Dec 2014 08:27:39 -0800 (PST)
In-Reply-To: <548FF9E3.1020703@gmail.com>
References: <548FF9E3.1020703@gmail.com>
Date: Tue, 16 Dec 2014 11:27:39 -0500
Message-ID: <CAL02cgT9iYqtX2Ui5XQYnj=yeF_QnSkKn-jE0D5d56WMzB5bBg@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Content-Type: multipart/alternative; boundary="001a1133e3b867109a050a57d6cc"
Archived-At: http://mailarchive.ietf.org/arch/msg/acme/r4-d0uGKfm4Zmiq6C41M7m-9ZVs
Cc: "acme@ietf.org" <acme@ietf.org>
Subject: Re: [Acme] ACME signature mechanics
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Automated Certificate Management Environment <acme.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/acme>, <mailto:acme-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/acme/>
List-Post: <mailto:acme@ietf.org>
List-Help: <mailto:acme-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/acme>, <mailto:acme-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 16 Dec 2014 16:27:49 -0000

I think there might be a middle way here.  I've been musing about making a
"Content-Signature" header that just carries a JWS signature over the
payload (no HTTP headers).  Since HTTP has to carry the payload bit-exact,
there's no c14n nonsense, so this could be much simpler than other HTTP
signing proposals.  It's sort of like JCS, except that there is actually a
guarantee that the payload stays the same ;)

That said, if your concern is really human readability, I don't think it's
a tragedy to make someone copy/paste into a base64 decoder.

On Tue, Dec 16, 2014 at 4:22 AM, Anders Rundgren <
anders.rundgren.net@gmail.com> wrote:
>
> When the transition to JWS has been made, human-readable ACME messages like
>
>    {
>      "type": "certificateRequest",
>      "csr": "5jNudRx6Ye4HzKEqT5...FS6aKdZeGsysoCo4H9P",
>      "signature": {
>        "alg": "RS256",
>        "nonce": "h5aYpWVkq-xlJh6cpR-3cw",
>        "sig": "KxITJ0rNlfDMAtfDr8eAw...fSSoehDFNZKQKzTZPtQ",
>        "jwk": {
>          "kty":"RSA",
>          "e":"AQAB",
>          "n":"KxITJ0rNlfDMAtfDr8eAw...fSSoehDFNZKQKzTZPtQ"
>   }  }  }
>
> will rather look like
>
> {
>   "payload":"<base64>",
>   "protected":"<base64>",
>   "header":<base64>,
>   "signature":"<base64>"
> }
>
> Which apart from being ugly JWS also requires a JSON schema validator (or
> similar
> mechanism) to work on separate, unpacked parts of the message.
>
> Although I don't expect this to change, you may (or may not) want to know
> that
> clear-text JSON signatures (without the complexity of XML DSig), is not
> black magic,
> you only have to use JSON parsers that doesn't "manipulate" input data:
> https://openkeystore.googlecode.com/svn/resources/
> trunk/docs/jcs.html#Sample_Signature
>
> Cheers
> AndersR
>
> _______________________________________________
> Acme mailing list
> Acme@ietf.org
> https://www.ietf.org/mailman/listinfo/acme
>